From 14e2da6f435eff3145727ef18229772846f71e3b Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 30 Jul 2025 23:44:53 +0300 Subject: [PATCH 1/4] Delete pre-release directory --- pre-release/c100200277.lua | 81 ------------------ pre-release/c100201001.lua | 38 --------- pre-release/c100201002.lua | 31 ------- pre-release/c100201003.lua | 56 ------------ pre-release/c100348001.lua | 47 ---------- pre-release/c100348002.lua | 48 ----------- pre-release/c100348005.lua | 88 ------------------- pre-release/c100348032.lua | 114 ------------------------- pre-release/c100443001.lua | 78 ----------------- pre-release/c100443003.lua | 80 ----------------- pre-release/c100443005.lua | 39 --------- pre-release/c100443007.lua | 91 -------------------- pre-release/c100443010.lua | 67 --------------- pre-release/c100443101.lua | 101 ---------------------- pre-release/c100443102.lua | 62 -------------- pre-release/c100443103.lua | 66 -------------- pre-release/c100443104.lua | 76 ----------------- pre-release/c100443105.lua | 37 -------- pre-release/c100444101.lua | 19 ----- pre-release/c100444102.lua | 31 ------- pre-release/c100446001.lua | 82 ------------------ pre-release/c100446002.lua | 78 ----------------- pre-release/c100446003.lua | 84 ------------------ pre-release/c100446004.lua | 75 ---------------- pre-release/c100446005.lua | 69 --------------- pre-release/c100446006.lua | 91 -------------------- pre-release/c100446007.lua | 87 ------------------- pre-release/c100446009.lua | 95 --------------------- pre-release/c100446010.lua | 46 ---------- pre-release/c100446011.lua | 41 --------- pre-release/c101302004.lua | 77 ----------------- pre-release/c101302005.lua | 86 ------------------- pre-release/c101302006.lua | 91 -------------------- pre-release/c101302007.lua | 69 --------------- pre-release/c101302008.lua | 86 ------------------- pre-release/c101302009.lua | 76 ----------------- pre-release/c101302010.lua | 72 ---------------- pre-release/c101302011.lua | 98 --------------------- pre-release/c101302012.lua | 70 --------------- pre-release/c101302013.lua | 54 ------------ pre-release/c101302014.lua | 54 ------------ pre-release/c101302015.lua | 89 ------------------- pre-release/c101302016.lua | 69 --------------- pre-release/c101302017.lua | 65 -------------- pre-release/c101302018.lua | 108 ----------------------- pre-release/c101302019.lua | 96 --------------------- pre-release/c101302020.lua | 95 --------------------- pre-release/c101302021.lua | 120 -------------------------- pre-release/c101302022.lua | 81 ------------------ pre-release/c101302023.lua | 70 --------------- pre-release/c101302024.lua | 91 -------------------- pre-release/c101302025.lua | 88 ------------------- pre-release/c101302026.lua | 70 --------------- pre-release/c101302027.lua | 97 --------------------- pre-release/c101302028.lua | 102 ---------------------- pre-release/c101302029.lua | 88 ------------------- pre-release/c101302030.lua | 64 -------------- pre-release/c101302031.lua | 50 ----------- pre-release/c101302032.lua | 101 ---------------------- pre-release/c101302033.lua | 65 -------------- pre-release/c101302034.lua | 88 ------------------- pre-release/c101302036.lua | 65 -------------- pre-release/c101302037.lua | 78 ----------------- pre-release/c101302039.lua | 93 -------------------- pre-release/c101302040.lua | 90 ------------------- pre-release/c101302041.lua | 84 ------------------ pre-release/c101302042.lua | 65 -------------- pre-release/c101302044.lua | 95 --------------------- pre-release/c101302045.lua | 87 ------------------- pre-release/c101302046.lua | 79 ----------------- pre-release/c101302047.lua | 64 -------------- pre-release/c101302048.lua | 76 ----------------- pre-release/c101302050.lua | 74 ---------------- pre-release/c101302051.lua | 77 ----------------- pre-release/c101302052.lua | 104 ---------------------- pre-release/c101302053.lua | 72 ---------------- pre-release/c101302055.lua | 72 ---------------- pre-release/c101302056.lua | 75 ---------------- pre-release/c101302057.lua | 94 -------------------- pre-release/c101302058.lua | 115 ------------------------- pre-release/c101302059.lua | 72 ---------------- pre-release/c101302060.lua | 87 ------------------- pre-release/c101302061.lua | 84 ------------------ pre-release/c101302062.lua | 84 ------------------ pre-release/c101302063.lua | 97 --------------------- pre-release/c101302064.lua | 97 --------------------- pre-release/c101302065.lua | 85 ------------------ pre-release/c101302066.lua | 103 ---------------------- pre-release/c101302067.lua | 129 ---------------------------- pre-release/c101302068.lua | 90 ------------------- pre-release/c101302069.lua | 93 -------------------- pre-release/c101302070.lua | 78 ----------------- pre-release/c101302071.lua | 60 ------------- pre-release/c101302072.lua | 87 ------------------- pre-release/c101302074.lua | 96 --------------------- pre-release/c101302075.lua | 95 --------------------- pre-release/c101302076.lua | 122 -------------------------- pre-release/c101302077.lua | 55 ------------ pre-release/c101302078.lua | 57 ------------- pre-release/c101302079.lua | 69 --------------- pre-release/c101302080.lua | 58 ------------- pre-release/c101302101.lua | 78 ----------------- pre-release/c101302102.lua | 102 ---------------------- pre-release/c101302103.lua | 104 ---------------------- pre-release/c101302104.lua | 171 ------------------------------------- pre-release/c101302105.lua | 64 -------------- pre-release/c101302106.lua | 85 ------------------ pre-release/c101302107.lua | 70 --------------- pre-release/c101302108.lua | 81 ------------------ pre-release/c101302109.lua | 95 --------------------- 110 files changed, 8735 deletions(-) delete mode 100644 pre-release/c100200277.lua delete mode 100644 pre-release/c100201001.lua delete mode 100644 pre-release/c100201002.lua delete mode 100644 pre-release/c100201003.lua delete mode 100644 pre-release/c100348001.lua delete mode 100644 pre-release/c100348002.lua delete mode 100644 pre-release/c100348005.lua delete mode 100644 pre-release/c100348032.lua delete mode 100644 pre-release/c100443001.lua delete mode 100644 pre-release/c100443003.lua delete mode 100644 pre-release/c100443005.lua delete mode 100644 pre-release/c100443007.lua delete mode 100644 pre-release/c100443010.lua delete mode 100644 pre-release/c100443101.lua delete mode 100644 pre-release/c100443102.lua delete mode 100644 pre-release/c100443103.lua delete mode 100644 pre-release/c100443104.lua delete mode 100644 pre-release/c100443105.lua delete mode 100644 pre-release/c100444101.lua delete mode 100644 pre-release/c100444102.lua delete mode 100644 pre-release/c100446001.lua delete mode 100644 pre-release/c100446002.lua delete mode 100644 pre-release/c100446003.lua delete mode 100644 pre-release/c100446004.lua delete mode 100644 pre-release/c100446005.lua delete mode 100644 pre-release/c100446006.lua delete mode 100644 pre-release/c100446007.lua delete mode 100644 pre-release/c100446009.lua delete mode 100644 pre-release/c100446010.lua delete mode 100644 pre-release/c100446011.lua delete mode 100644 pre-release/c101302004.lua delete mode 100644 pre-release/c101302005.lua delete mode 100644 pre-release/c101302006.lua delete mode 100644 pre-release/c101302007.lua delete mode 100644 pre-release/c101302008.lua delete mode 100644 pre-release/c101302009.lua delete mode 100644 pre-release/c101302010.lua delete mode 100644 pre-release/c101302011.lua delete mode 100644 pre-release/c101302012.lua delete mode 100644 pre-release/c101302013.lua delete mode 100644 pre-release/c101302014.lua delete mode 100644 pre-release/c101302015.lua delete mode 100644 pre-release/c101302016.lua delete mode 100644 pre-release/c101302017.lua delete mode 100644 pre-release/c101302018.lua delete mode 100644 pre-release/c101302019.lua delete mode 100644 pre-release/c101302020.lua delete mode 100644 pre-release/c101302021.lua delete mode 100644 pre-release/c101302022.lua delete mode 100644 pre-release/c101302023.lua delete mode 100644 pre-release/c101302024.lua delete mode 100644 pre-release/c101302025.lua delete mode 100644 pre-release/c101302026.lua delete mode 100644 pre-release/c101302027.lua delete mode 100644 pre-release/c101302028.lua delete mode 100644 pre-release/c101302029.lua delete mode 100644 pre-release/c101302030.lua delete mode 100644 pre-release/c101302031.lua delete mode 100644 pre-release/c101302032.lua delete mode 100644 pre-release/c101302033.lua delete mode 100644 pre-release/c101302034.lua delete mode 100644 pre-release/c101302036.lua delete mode 100644 pre-release/c101302037.lua delete mode 100644 pre-release/c101302039.lua delete mode 100644 pre-release/c101302040.lua delete mode 100644 pre-release/c101302041.lua delete mode 100644 pre-release/c101302042.lua delete mode 100644 pre-release/c101302044.lua delete mode 100644 pre-release/c101302045.lua delete mode 100644 pre-release/c101302046.lua delete mode 100644 pre-release/c101302047.lua delete mode 100644 pre-release/c101302048.lua delete mode 100644 pre-release/c101302050.lua delete mode 100644 pre-release/c101302051.lua delete mode 100644 pre-release/c101302052.lua delete mode 100644 pre-release/c101302053.lua delete mode 100644 pre-release/c101302055.lua delete mode 100644 pre-release/c101302056.lua delete mode 100644 pre-release/c101302057.lua delete mode 100644 pre-release/c101302058.lua delete mode 100644 pre-release/c101302059.lua delete mode 100644 pre-release/c101302060.lua delete mode 100644 pre-release/c101302061.lua delete mode 100644 pre-release/c101302062.lua delete mode 100644 pre-release/c101302063.lua delete mode 100644 pre-release/c101302064.lua delete mode 100644 pre-release/c101302065.lua delete mode 100644 pre-release/c101302066.lua delete mode 100644 pre-release/c101302067.lua delete mode 100644 pre-release/c101302068.lua delete mode 100644 pre-release/c101302069.lua delete mode 100644 pre-release/c101302070.lua delete mode 100644 pre-release/c101302071.lua delete mode 100644 pre-release/c101302072.lua delete mode 100644 pre-release/c101302074.lua delete mode 100644 pre-release/c101302075.lua delete mode 100644 pre-release/c101302076.lua delete mode 100644 pre-release/c101302077.lua delete mode 100644 pre-release/c101302078.lua delete mode 100644 pre-release/c101302079.lua delete mode 100644 pre-release/c101302080.lua delete mode 100644 pre-release/c101302101.lua delete mode 100644 pre-release/c101302102.lua delete mode 100644 pre-release/c101302103.lua delete mode 100644 pre-release/c101302104.lua delete mode 100644 pre-release/c101302105.lua delete mode 100644 pre-release/c101302106.lua delete mode 100644 pre-release/c101302107.lua delete mode 100644 pre-release/c101302108.lua delete mode 100644 pre-release/c101302109.lua diff --git a/pre-release/c100200277.lua b/pre-release/c100200277.lua deleted file mode 100644 index 65c6173297..0000000000 --- a/pre-release/c100200277.lua +++ /dev/null @@ -1,81 +0,0 @@ ---熒焅聖 アレクゥス ---Alekus the Shining Stunner Saint ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If you control a face-up card in your Spell & Trap Zone, 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) - --Destroy both 1 face-up Spell/Trap you control and this card, then draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --Attach this card to 1 Xyz Monster you control - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.attachtg) - e3:SetOperation(s.attachop) - c:RegisterEffect(e3) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_STZONE,0,1,nil) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsSpellTrap() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsPlayerCanDraw(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+e:GetHandler(),2,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -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 tc:IsRelateToEffect(e) and Duel.Destroy(Group.FromCards(c,tc),REASON_EFFECT)==2 - and Duel.IsPlayerCanDraw(tp) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function s.attachfilter(c,mc,tp) - return c:IsType(TYPE_XYZ) and c:IsFaceup() and mc: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.attachfilter(chkc,c,tp) end - if chk==0 then return Duel.IsExistingTarget(s.attachfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.attachfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp) - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -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) - end -end \ No newline at end of file diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua deleted file mode 100644 index 3a49209cce..0000000000 --- a/pre-release/c100201001.lua +++ /dev/null @@ -1,38 +0,0 @@ ---契約を結びし竜の戦士 ---Dragonic Warrior -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Discard(s.spcostfilter)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.spcostfilter(c,e,tp) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua deleted file mode 100644 index 9b0c446078..0000000000 --- a/pre-release/c100201002.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アイン・ロイド ---Einroid -local s,id=GetID() -function s.initial_effect(c) - --Send 2 Level 4 or lower Machine monsters from your Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DESTROYED) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) -end -function s.tgfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,2,2,nil) - if #g==2 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua deleted file mode 100644 index 35f72f4627..0000000000 --- a/pre-release/c100201003.lua +++ /dev/null @@ -1,56 +0,0 @@ ---妖魔ヌリカベ ---Nurikabe -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCondition(aux.exccon) - e1:SetCost(Cost.PayLP(1000)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - for sc in Group.FromCards(c,tc):Iter() do - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(c) - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - sc:RegisterEffect(e1,true) - end - end - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100348001.lua b/pre-release/c100348001.lua deleted file mode 100644 index dd8bebde38..0000000000 --- a/pre-release/c100348001.lua +++ /dev/null @@ -1,47 +0,0 @@ ---フルスピード・ウォリアー ---Fullspeed Warrior ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Junk Synchron" or 1 Spell/Trap that mentions "Junk Warrior" from your Deck to your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.thtg) - e1a:SetOperation(s.thop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --Monsters you control that mention "Junk Warrior", and Synchro Monsters you control with "Warrior" in their original names, gain 900 ATK during your Battle Phase only - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCondition(function(e) return Duel.IsBattlePhase() and Duel.IsTurnPlayer(e:GetHandlerPlayer()) end) - e2:SetTarget(function(e,c) return c:ListsCode(CARD_JUNK_WARRIOR) or (c:IsType(TYPE_SYNCHRO) and c:IsOriginalSetCard(SET_WARRIOR)) end) - e2:SetValue(900) - c:RegisterEffect(e2) -end -s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR} -s.listed_series={SET_WARRIOR} -function s.thfilter(c) - return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsSpellTrap() and c:ListsCode(CARD_JUNK_WARRIOR))) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100348002.lua b/pre-release/c100348002.lua deleted file mode 100644 index d9f0f2da51..0000000000 --- a/pre-release/c100348002.lua +++ /dev/null @@ -1,48 +0,0 @@ ---アンカーボルト・ヘッジホッグ ---Anchorbolt Hedgehog ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card in Defense Position - 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_GRAVE) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={CARD_JUNK_WARRIOR,id} -function s.spconfilter(c) - return (c:IsCode(CARD_JUNK_WARRIOR) or c:ListsCode(CARD_JUNK_WARRIOR)) and not c:IsCode(id) -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,POS_FACEUP_DEFENSE) 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_DEFENSE) - 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,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:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100348005.lua b/pre-release/c100348005.lua deleted file mode 100644 index 23e979b7a2..0000000000 --- a/pre-release/c100348005.lua +++ /dev/null @@ -1,88 +0,0 @@ ---シンクロ・フェローズ ---Synchro Fellows ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Junk Synchron", and 1 monster that mentions "Junk Warrior" or "Stardust Dragon", from your Deck to your hand, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Decrease the Level of 1 Synchro Monster you control by 1 - 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_GRAVE) - e2:SetCondition(function(e,tp) return Duel.IsPlayerCanAdditionalSummon(tp) end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.lvtg) - e2:SetOperation(s.lvop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON} -s.listed_series={SET_SYNCHRON} -function s.thfilter(c) - return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsMonster() and c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON))) and c:IsAbleToHand() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsCode,1,nil,CARD_JUNK_SYNCHRON) and sg:IsExists(Card.ListsCode,1,nil,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) - if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) - end -end -function s.lvfilter(c) - return c:IsType(TYPE_SYNCHRO) and c:HasLevel() and c:IsLevelAbove(2) and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsPlayerCanSummon(tp) - and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelAbove(2) and not tc:IsImmuneToEffect(e) then - --Decrease its Level by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - Duel.BreakEffect() - --You can Normal Summon 1 "Synchron" monster during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYNCHRON)) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100348032.lua b/pre-release/c100348032.lua deleted file mode 100644 index 8af1adf8f5..0000000000 --- a/pre-release/c100348032.lua +++ /dev/null @@ -1,114 +0,0 @@ ---ジャンク・ウォリアー・エクストリーム ---Junk Warrior Extreme ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: "Junk Synchron" + 1+ non-Tuner monsters - Synchro.AddProcedure(c,s.tunerfilter,1,1,Synchro.NonTuner(nil),1,99) - --Special Summon as many Level 2 or lower monsters from your GY as possible - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.gysptg) - e1:SetOperation(s.gyspop) - c:RegisterEffect(e1) - --Special Summon 1 "Junk" Synchro Monster from your Extra Deck (this is treated as a Synchro Summon) - 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:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.bdocon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.exsptg) - e2:SetOperation(s.exspop) - c:RegisterEffect(e2) -end -s.material={CARD_JUNK_SYNCHRON} -s.listed_names={CARD_JUNK_SYNCHRON} -s.listed_series={SET_JUNK} -s.material_setcode=SET_SYNCHRON -function s.tunerfilter(c,lc,stype,tp) - return c:IsSummonCode(lc,stype,tp,CARD_JUNK_SYNCHRON) or c:IsHasEffect(20932152) -end -function s.gyspfilter(c,e,tp) - return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>0 then - local g=Duel.GetMatchingGroup(s.gyspfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - ft=math.min(ft,#g) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) - if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then - local og=Duel.GetOperatedGroup() - for sc in og:Iter() do - --They cannot activate their effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3302) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - end - end - --You can only Special Summon once 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:SetTarget(function(e,c,tp) return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)-e:GetLabel()>=1 end) - e1:SetLabel(Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_LEFT_SPSUMMON_COUNT) - e2:SetValue(s.countval) - Duel.RegisterEffect(e2,tp) -end -function s.countval(e,re,tp) - local label=e:GetLabel() - local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON) - if sp-label>=1 then - return 0 - else - return 1-sp+label - end -end -function s.exspfilter(c,e,tp,mc) - local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) - return #pg<=0 and c:IsSetCard(SET_JUNK) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.exsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.exspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end -end \ No newline at end of file diff --git a/pre-release/c100443001.lua b/pre-release/c100443001.lua deleted file mode 100644 index 963cbfcef7..0000000000 --- a/pre-release/c100443001.lua +++ /dev/null @@ -1,78 +0,0 @@ ---恋する乙女 ---Maiden in Love ---scripted by Naim -local s,id=GetID() -local COUNTER_MAIDEN=0x1090 -function s.initial_effect(c) - --Monsters your opponent controls that can attack must attack this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetRange(LOCATION_MZONE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) - e2:SetValue(function(e,c) return c==e:GetHandler() end) - c:RegisterEffect(e2) - --Cannot be destroyed by battle - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(1) - c:RegisterEffect(e3) - --Activate 1 of these effects at the end of the Damage Step, if this card battled an opponent's monster - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(s.effcon) - e4:SetTarget(s.efftg) - e4:SetOperation(s.effop) - c:RegisterEffect(e4) -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function s.controlfilter(c) - return c:HasCounter(COUNTER_MAIDEN) and c:IsControlerCanBeChanged() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_MAIDEN,1) - local b2=Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil) - local c=e:GetHandler() - if chk==0 then return c:IsLocation(LOCATION_MZONE) and c:IsRelateToBattle() and (b1 or b2) end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_COUNTER) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_MAIDEN) - elseif op==2 then - e:SetCategory(CATEGORY_CONTROL) - local g=Duel.GetMatchingGroup(s.controlfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Place 1 Maiden Counter on 1 face-up monster your opponent controls. - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) - local sc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_MAIDEN,1):GetFirst() - if sc then - sc:AddCounter(COUNTER_MAIDEN,1) - end - elseif op==2 then - --Take control of 1 opponent's monster with a Maiden Counter. - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local sc=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.GetControl(sc,tp) - end - end -end \ No newline at end of file diff --git a/pre-release/c100443003.lua b/pre-release/c100443003.lua deleted file mode 100644 index b1dacd544f..0000000000 --- a/pre-release/c100443003.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ユーカリ・モール ---Eucalyptus Mole ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Beast monster from your Deck in face-down Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.fdsptg) - e1:SetOperation(s.fdspop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Special Summon 1 "Koala" monster from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.koalasptg) - e3:SetOperation(s.koalaspop) - c:RegisterEffect(e3) -end -s.listed_series={SET_KOALA} -function s.fdspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) -end -function s.fdsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.fdspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,tp,POS_FACEUP_DEFENSE) -end -function s.fdspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.fdspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then - Duel.ConfirmCards(1-tp,g) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsAttackPos() then - Duel.BreakEffect() - Duel.ChangePosition(c,POS_FACEUP_DEFENSE) - end - end -end -function s.koalaspfilter(c,e,tp) - return c:IsSetCard(SET_KOALA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.koalasptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.koalaspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.koalaspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.koalaspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) - --Non-Effect Beast monsters you control gain ATK equal to their own original DEF - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsNonEffectMonster() and c:IsRace(RACE_BEAST) end) - e1:SetValue(function(e,c) return c:GetBaseDefense() end) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100443005.lua b/pre-release/c100443005.lua deleted file mode 100644 index 8a657b806a..0000000000 --- a/pre-release/c100443005.lua +++ /dev/null @@ -1,39 +0,0 @@ ---幻魔の扉 ---Illusion Gate -local s,id=GetID() -function s.initial_effect(c) - --Destroy as many monsters your opponent controls as possible, then you can Special Summon 1 monster from your opponent's GY to your field, ignoring its Summoning conditions - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(Cost.PayLP(1/2)) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if chk==0 then return not Duel.HasFlagEffect(tp,id) and #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,0,0,1) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100443007.lua b/pre-release/c100443007.lua deleted file mode 100644 index 0ffd8ecc80..0000000000 --- a/pre-release/c100443007.lua +++ /dev/null @@ -1,91 +0,0 @@ ---プリマの光 ---Prima Light ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Add 1 Warrior or Fairy "Cyber" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CYBER} -function s.tribfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.nsfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.CheckReleaseGroup(tp,s.tribfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) - local b2=Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Tribute 1 EARTH Warrior monster, and if you do, Special Summon 1 LIGHT Warrior monster from your hand or Deck - local rg=Duel.SelectReleaseGroup(tp,s.tribfilter,1,1,nil,tp) - if #rg>0 and Duel.Release(rg,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - elseif op==2 then - --Immediately after this effect resolves, Normal Summon 1 Warrior monster from your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end - end -end -function s.thfilter(c) - return c:IsRace(RACE_WARRIOR|RACE_FAIRY) and c:IsSetCard(SET_CYBER) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100443010.lua b/pre-release/c100443010.lua deleted file mode 100644 index c5890ee4ea..0000000000 --- a/pre-release/c100443010.lua +++ /dev/null @@ -1,67 +0,0 @@ ---魂の結束-ソウル・ユニオン ---Soul Union ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.atkfilter(c) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:HasNonZeroAttack() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - e:SetLabelObject(tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.fusconfilter(c) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsFaceup() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg~=2 then return end - local fc=e:GetLabelObject() - local gc=(tg-fc):GetFirst() - if fc:IsFaceup() and not fc:IsImmuneToEffect(e) then - --That monster on the field gains ATK equal to the ATK of that other monster in the GY until the end of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(gc:GetAttack()) - e1:SetReset(RESETS_STANDARD_PHASE_END) - fc:RegisterEffect(e1) - if not Duel.IsExistingMatchingCard(s.fusconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) then return end - local params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),matfilter=function(c) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() end,extrafil=s.fextra,extraop=Fusion.BanishMaterial} - if Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - Fusion.SummonEffOP(params)(e,tp,eg,ep,ev,re,r,rp) - end - end -end -function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil -end \ No newline at end of file diff --git a/pre-release/c100443101.lua b/pre-release/c100443101.lua deleted file mode 100644 index b4a1065c52..0000000000 --- a/pre-release/c100443101.lua +++ /dev/null @@ -1,101 +0,0 @@ ---超電導戦士 リニア・マグナム± ---Conduction Warrior Linear Magnum ± ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must first be Special Summoned (from your hand) by sending 2 "Magnet Warrior" monsters whose original Level is 4 or lower from your hand, Deck, and/or face-up field to the GY - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_HAND) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --Gains ATK equal to half of the ATK 1 other EARTH monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,1}) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --Add this card to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,2}) - e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_DESTROY) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MAGNET_WARRIOR} -function s.spconfilter(c) - return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsMonster() and c:GetOriginalLevel()<=4 - and c:IsAbleToGraveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,aux.ChkfMMZ(1),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) - if #g>0 then - g:KeepAlive() - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if not g then return end - Duel.SendtoGrave(g,REASON_COST) - g:DeleteGroup() -end -function s.atkfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:HasNonZeroAttack() -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,tc:GetAttack()//2) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - --Gains ATK equal to half of that monster's ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()//2) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100443102.lua b/pre-release/c100443102.lua deleted file mode 100644 index 6ed9b65020..0000000000 --- a/pre-release/c100443102.lua +++ /dev/null @@ -1,62 +0,0 @@ ---錬金釜-カオス・ディスティル ---Chaos Distill ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Any card sent to your GY is banished instead - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_ALL,0) - e1:SetValue(LOCATION_REMOVED) - e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) - c:RegisterEffect(e1) - --Activate 1 of these effects - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MACRO_COSMOS,id} -function s.macrofilter(c) - return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.monsterfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) - local c=e:GetHandler() - local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==2 then - Duel.Remove(c,POS_FACEUP,REASON_COST) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua deleted file mode 100644 index dfaf24888f..0000000000 --- a/pre-release/c100443103.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ヒーローズルール1 ファイブ・フリーダムス ---Hero's Rule 1: Five Freedoms ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish up to 5 cards from the GYs - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.rmvtg) - e1:SetOperation(s.rmvop) - c:RegisterEffect(e1) - --Special Summon 1 of your banished "Elemental HERO" monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.rmvfilter(c) - return c:IsAbleToRemove() and aux.SpElimFilter(c) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua deleted file mode 100644 index 6e4745de52..0000000000 --- a/pre-release/c100443104.lua +++ /dev/null @@ -1,76 +0,0 @@ ---デーモンズ・マタドール ---Archfiend Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Cannot be destroyed by battle, also you take no battle damage from battles involving this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - c:RegisterEffect(e3) - --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_names={100443105,id} --"Ritual of the Matador" -s.listed_series={SET_ARCHFIEND} -function s.thfilter(c) - return c:IsSetCard(SET_ARCHFIEND) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil) - if #g==2 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - --This card cannot attack for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3206) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua deleted file mode 100644 index 61c24806c2..0000000000 --- a/pre-release/c100443105.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マタドール降臨の儀式 ダーク・パセオ ---Ritual of the Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Ritual Summon "Archfiend Matador" - Ritual.AddProcGreaterCode(c,6,nil,100443104) - --Special Summon 1 non-Ritual "Archfiend" monster from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfBanish) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={100443104} --"Archfiend Matador" -s.listed_series={SET_ARCHFIEND} -function s.spfilter(c,e,tp) - return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100444101.lua b/pre-release/c100444101.lua deleted file mode 100644 index 021a1608f2..0000000000 --- a/pre-release/c100444101.lua +++ /dev/null @@ -1,19 +0,0 @@ ---Japanese name ---WINDS OF VICTORY ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - aux.AddEquipProcedure(c) - --The equipped monster gains 300 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - c:RegisterEffect(e1) - --Also it becomes WIND - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(ATTRIBUTE_WIND) - c:RegisterEffect(e2) -end \ No newline at end of file diff --git a/pre-release/c100444102.lua b/pre-release/c100444102.lua deleted file mode 100644 index af31d4360c..0000000000 --- a/pre-release/c100444102.lua +++ /dev/null @@ -1,31 +0,0 @@ ---毒サソリの罠毒 ---Trap of the Poisonous Scorpion ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Destroy an opponent's attacking monster, then inflict 300 damage to your opponent - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=Duel.GetAttacker() - e:SetLabelObject(bc) - bc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - if bc:IsRelateToEffect(e) and bc:IsMonster() and Duel.Destroy(bc,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,300,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100446001.lua b/pre-release/c100446001.lua deleted file mode 100644 index 1b1d013e4b..0000000000 --- a/pre-release/c100446001.lua +++ /dev/null @@ -1,82 +0,0 @@ ---見えざる手イブエル ---Hecatoncheire Ibel ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --Shuffle this card into the Deck, then Special Summon 1 "Hecatoncheire" monster from your Deck in Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) - --Special Summon 1 "Hecatoncheire" monster from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_HECATONCHEIRE} -s.listed_names={id} -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.deckspfilter(c,e,tp) - return c:IsSetCard(SET_HECATONCHEIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_HECATONCHEIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) -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/c100446002.lua b/pre-release/c100446002.lua deleted file mode 100644 index c65cec30f4..0000000000 --- a/pre-release/c100446002.lua +++ /dev/null @@ -1,78 +0,0 @@ ---見えざる手ヤドエル ---Hecatoncheire Yadel ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --Shuffle this card into the Deck, then add 1 "Hecatoncheire" Spell/Trap from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Set 1 "Hecatoncheire" Spell/Trap from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_HECATONCHEIRE} -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.thfilter(c) - return c:IsSetCard(SET_HECATONCHEIRE) and c:IsSpellTrap() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #hg>0 then - Duel.BreakEffect() - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg) - end - end -end -function s.setfilter(c) - return c:IsSetCard(SET_HECATONCHEIRE) and c:IsSpellTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local tc=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SSet(tp,tc) - end -end \ No newline at end of file diff --git a/pre-release/c100446003.lua b/pre-release/c100446003.lua deleted file mode 100644 index f950589805..0000000000 --- a/pre-release/c100446003.lua +++ /dev/null @@ -1,84 +0,0 @@ ---見えざる手ゴッドス ---Hecatoncheire Goddus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_HAND) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Special Summon to your field 1 monster from your opponent's GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -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.spfilter(c,e,tp) - return 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(1-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,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,0,LOCATION_GRAVE,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) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - tc:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100446004.lua b/pre-release/c100446004.lua deleted file mode 100644 index 77e641fe1b..0000000000 --- a/pre-release/c100446004.lua +++ /dev/null @@ -1,75 +0,0 @@ ---見えざる手ガイガス ---Hecatoncheire Gygas ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_HAND) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Excavate the top 3 cards of your opponent's Deck and you can Special Summon 1 excavated monster - 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) -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -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.spfilter(c,e,tp) - return 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.GetFieldGroupCount(tp,0,LOCATION_DECK)>=3 end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end - Duel.ConfirmDecktop(1-tp,3) - local g=Duel.GetDecktopGroup(1-tp,3) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:IsExists(s.spfilter,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=g:FilterSelect(tp,s.spfilter,1,1,nil,e,tp):GetFirst() - if sc then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end - Duel.ShuffleDeck(1-tp) -end \ No newline at end of file diff --git a/pre-release/c100446005.lua b/pre-release/c100446005.lua deleted file mode 100644 index 0063d0045b..0000000000 --- a/pre-release/c100446005.lua +++ /dev/null @@ -1,69 +0,0 @@ ---見えざる手ブレアス ---Hecatoncheire Breus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_HAND) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Look at 1 random card in your opponent's hand, and if it is a monster, you can Special Summon it to your field - 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) -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -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.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if #g==0 then return end - local sc=g:RandomSelect(tp,1):GetFirst() - Duel.ConfirmCards(tp,sc) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - Duel.ShuffleHand(1-tp) -end \ No newline at end of file diff --git a/pre-release/c100446006.lua b/pre-release/c100446006.lua deleted file mode 100644 index 94bc5265a5..0000000000 --- a/pre-release/c100446006.lua +++ /dev/null @@ -1,91 +0,0 @@ ---見えざる神ジャウザー ---Hecatoncheire Jawza ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Hecatoncheire" monster + 1 Illusion monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECATONCHEIRE),aux.FilterBoolFunctionEx(Card.IsRace,RACE_ILLUSION)) - c:AddMustFirstBeFusionSummoned() - --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 Illusion monster and 1 face-up monster you control owned by your opponent - 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) - --Add 1 "Hecatoncheire" card from your Deck or GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If this card battles a monster, neither can be destroyed by that battle - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(s.indestg) - e2:SetValue(1) - c:RegisterEffect(e2) -end -s.listed_series={SET_HECATONCHEIRE} -s.material_setcode=SET_HECATONCHEIRE -function s.selfspcostfilter(c,tp,fc) - return (c:IsRace(RACE_ILLUSION) or (c:IsFaceup() and c:IsOwner(1-tp))) and c:IsReleasable() - and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) -end -function s.rescon(sg,e,tp,mg) - return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 - and sg:IsExists(Card.IsRace,1,nil,RACE_ILLUSION) and sg:IsExists(aux.FaceupFilter(Card.IsOwner,1-tp),1,nil) -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,0,nil,tp,c) - 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_MZONE,0,nil,tp,c) - 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.thfilter(c) - return c:IsSetCard(SET_HECATONCHEIRE) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end \ No newline at end of file diff --git a/pre-release/c100446007.lua b/pre-release/c100446007.lua deleted file mode 100644 index adc21e2fe0..0000000000 --- a/pre-release/c100446007.lua +++ /dev/null @@ -1,87 +0,0 @@ ---見えざる神ゼノ ---Hecatoncheire Xeno ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 "Hecatoncheire" monsters - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECATONCHEIRE),3) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --Look at 2 random face-down cards in your opponent's Extra Deck, and if you do, you can Special Summon 1 of them to your field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Take control of any number of monsters your opponent controls - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_CONTROL) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.ctrlcon) - e3:SetTarget(s.ctrltg) - e3:SetOperation(s.ctrlop) - c:RegisterEffect(e3) -end -s.listed_series={SET_HECATONCHEIRE} -s.material_setcode=SET_HECATONCHEIRE -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil)>=2 end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spfilter(c,e,tp) - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local exg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil) - if #exg==0 then return end - local g=exg:RandomSelect(tp,2) - Duel.ConfirmCards(tp,g) - if g:IsExists(s.spfilter,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:FilterSelect(tp,s.spfilter,1,1,nil,e,tp) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - Duel.ShuffleExtra(1-tp) -end -function s.ctrlcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp==1-tp and c:IsFusionSummoned() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) -end -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0) -end -function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,ft,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100446009.lua b/pre-release/c100446009.lua deleted file mode 100644 index e370882807..0000000000 --- a/pre-release/c100446009.lua +++ /dev/null @@ -1,95 +0,0 @@ ---見えざる幽獄 ---Hecatoncheire Tartarus ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects (but you can only use each effect of "Hecatoncheire Tartarus" once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --If you use a face-up monster(s) you control owned by your opponent, you can treat it as a "Hecatoncheire" monster - aux.GlobalCheck(s,function() - local e0a=Effect.CreateEffect(c) - e0a:SetType(EFFECT_TYPE_FIELD) - e0a:SetCode(EFFECT_ADD_SETCODE) - e0a:SetTargetRange(LOCATION_MZONE,0) - e0a:SetTarget(function(e,c) local tp=e:GetHandlerPlayer() return c:IsFaceup() and c:IsControler(tp) and c:IsOwner(1-tp) end) - e0a:SetOperation(s.chngcon) - e0a:SetValue(SET_HECATONCHEIRE) - Duel.RegisterEffect(e0a,0) - local e0b=e0a:Clone() - Duel.RegisterEffect(e0b,1) - end) -end -s.listed_series={SET_HECATONCHEIRE} -function s.chngcon(scard,sumtype,tp) - return Fusion.SummonEffect and Fusion.SummonEffect:GetHandler():IsCode(id) and ((sumtype&MATERIAL_FUSION)~=0 or (sumtype&SUMMON_TYPE_FUSION)~=0) -end -function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) - if chk==0 then return b1 or b2 end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetLabel()==1 and chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end - local cost_skip=e:GetLabel()~=-100 - local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} - local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) - local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) - and Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) - if chk==0 then e:SetLabel(0) 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_TOHAND) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,1,nil) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_FUSION_SUMMON) - e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Return 1 Spell/Trap your opponent controls to the hand - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - elseif op==2 then - --Fusion Summon 1 "Hecatoncheire" Fusion Monster from your Extra Deck, by banishing its materials from your field and/or GY - local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - end -end \ No newline at end of file diff --git a/pre-release/c100446010.lua b/pre-release/c100446010.lua deleted file mode 100644 index b616dc663c..0000000000 --- a/pre-release/c100446010.lua +++ /dev/null @@ -1,46 +0,0 @@ ---えざる誘う手 ---Ipt al Hecatoncherie ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Negate the activation of an opponent's monster effect, and if you do, destroy it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - 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) -end -s.listed_series={SET_HECATONCHEIRE} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsMonsterEffect() and rp==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsChainNegatable(ev) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and rc:IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,rc,1,tp,0) - end -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and not rc:IsLocation(LOCATION_HAND|LOCATION_DECK) and aux.nvfilter(rc) - and rc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - if rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,rc)<=0 then - return - elseif not rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - return - end - if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100446011.lua b/pre-release/c100446011.lua deleted file mode 100644 index 5596ebe41a..0000000000 --- a/pre-release/c100446011.lua +++ /dev/null @@ -1,41 +0,0 @@ ---見えざる招き手 ---Yad al Hecatoncheire ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Negate the activation of an opponent's Spell/Trap Card, and if you do, destroy it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - 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) -end -s.listed_series={SET_HECATONCHEIRE} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsChainNegatable(ev) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and rc:IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - if rc:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,rc,1,tp,0) - end - end -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and not rc:IsLocation(LOCATION_HAND|LOCATION_DECK) - and aux.nvfilter(rc) and rc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - Duel.SSet(tp,rc) - end -end \ No newline at end of file diff --git a/pre-release/c101302004.lua b/pre-release/c101302004.lua deleted file mode 100644 index 7f166ce6cb..0000000000 --- a/pre-release/c101302004.lua +++ /dev/null @@ -1,77 +0,0 @@ ---バイオレンス・ウィッチ ---Violence Witch ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_ONFIELD,0,1,nil) end) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Special Summon 1 Plant monster with 1500 or less DEF from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Discard()) - e2:SetTarget(s.decksptg) - e2:SetOperation(s.deckspop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_BLACK_ROSE_DRAGON} -function s.selfspconfilter(c) - return (c:IsCode(CARD_BLACK_ROSE_DRAGON) or ((c:ListsCode(CARD_BLACK_ROSE_DRAGON) and c:IsMonster()) or (c:IsRace(RACE_PLANT) and c:IsSynchroMonster()))) - and c:IsFaceup() -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.deckspfilter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsDefenseBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSynchroMonster),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.deckspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end \ No newline at end of file diff --git a/pre-release/c101302005.lua b/pre-release/c101302005.lua deleted file mode 100644 index e70906b960..0000000000 --- a/pre-release/c101302005.lua +++ /dev/null @@ -1,86 +0,0 @@ ---夜薔薇の黒騎士 ---Twilight Rose Black Knight ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Plant monsters you control gain 1000 ATK while you control a Synchro Monster - 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(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PLANT)) - e1:SetValue(1000) - c:RegisterEffect(e1) - --Special Summon 1 "Black Rose Dragon" or 1 Level 4 or lower Plant monster from your GY, but negate its effects - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,id) - e2a:SetTarget(s.sptg) - e2a:SetOperation(s.spop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Increase or decrease the Level of 1 other Plant monster you control by 1 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_BLACK_ROSE_DRAGON} -function s.spfilter(c,e,tp) - return (c:IsCode(CARD_BLACK_ROSE_DRAGON) or (c:IsLevelBelow(4) and c:IsRace(RACE_PLANT))) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end -end -function s.lvfilter(c) - return c:IsRace(RACE_PLANT) and c:HasLevel() and c:IsFaceup() -end -function s.lvtg(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 chkc~=c and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:HasLevel() then - local op=tc:IsLevelAbove(2) and Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) or 0 - local lv=op==0 and 1 or -1 - --Increase or decrease its Level by 1 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101302006.lua b/pre-release/c101302006.lua deleted file mode 100644 index 9dc7f1a534..0000000000 --- a/pre-release/c101302006.lua +++ /dev/null @@ -1,91 +0,0 @@ ---剛鬼マシン・スープレックス ---Gouki Mashin Suprex ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both this card and 1 "Gouki" monster in your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex" - 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_ONFIELD) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -s.listed_names={id} -function s.spcostfilter(c,e,tp) - return c:IsSetCard(SET_GOUKI) and not c:IsPublic() 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 not c:IsPublic() - and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() - e:SetLabelObject(rc) - rc:CreateEffectRelation(e) - Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) - Duel.ShuffleHand(tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0) -end -function s.spfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - local sg=Group.FromCards(c,e:GetLabelObject()) - if sg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then - for sc in sg:Iter() do - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --You cannot Special Summon, except "Gouki" monsters, while you control either of those face-up monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetAbsoluteRange(tp,1,0) - e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1,true) - end - end -end -function s.thfilter(c) - return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101302007.lua b/pre-release/c101302007.lua deleted file mode 100644 index 32c0a8dd1e..0000000000 --- a/pre-release/c101302007.lua +++ /dev/null @@ -1,69 +0,0 @@ ---オノマトカゲ ---Onomatokage ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --This card is always treated as a "Zubaba" card (required due to current cdb limitations) - c:AddSetcodesRule(id,true,SET_ZUBABA) - --Special Summon this card, but banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Return up to 2 Xyz Monsters from your GY to the Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOEXTRA) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.textg) - e2:SetOperation(s.texop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}),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) 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.texfilter(c) - return c:IsType(TYPE_XYZ) and c:IsAbleToExtra() -end -function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.texfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE) -end -function s.texop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.texfilter,tp,LOCATION_GRAVE,0,1,2,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302008.lua b/pre-release/c101302008.lua deleted file mode 100644 index 854778d6b0..0000000000 --- a/pre-release/c101302008.lua +++ /dev/null @@ -1,86 +0,0 @@ ---終刻竜機ⅩⅡ-ドラスティア ---Doom-Z Zero - Drastia ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Destroy 1 "Doom-Z" card you control, and if you do, Special Summon this card from the hand then you can equip 1 Equip Spell from your Deck to it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DOOM_Z} -function s.desfilter(c,tp) - return c:IsSetCard(SET_DOOM_Z) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function s.eqsfilter(c,tp,ec) - return c:IsEquipSpell() and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) - and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_DECK,0,1,nil,tp,c) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local eqc=Duel.SelectMatchingCard(tp,s.eqsfilter,tp,LOCATION_DECK,0,1,1,nil,tp,c):GetFirst() - if eqc then - Duel.BreakEffect() - Duel.Equip(tp,eqc,c) - end - end -end -function s.spfilter(c,e,tp,lv,mc) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) - and mc:GetEquipGroup():FilterCount(Card.IsCanBeXyzMaterial,nil,c,tp,REASON_EFFECT)==mc:GetEquipCount() - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),c) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel(),c):GetFirst() - if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - Duel.Overlay(sc,c+c:GetEquipGroup(),true) - end -end \ No newline at end of file diff --git a/pre-release/c101302009.lua b/pre-release/c101302009.lua deleted file mode 100644 index 6846511786..0000000000 --- a/pre-release/c101302009.lua +++ /dev/null @@ -1,76 +0,0 @@ ---終刻竜機Ⅴ-アマルテ ---Doom-Z Five - Amalthe ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Doom-Z" monster from your Deck to your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.thtg) - e1a:SetOperation(s.thop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EVENT_DESTROYED) - e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) - c:RegisterEffect(e1c) - --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DOOM_Z} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -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,lv,mc) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) - and mc:GetEquipGroup():FilterCount(Card.IsCanBeXyzMaterial,nil,c,tp,REASON_EFFECT)==mc:GetEquipCount() - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),c) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel(),c):GetFirst() - if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - Duel.Overlay(sc,c+c:GetEquipGroup(),true) - end -end \ No newline at end of file diff --git a/pre-release/c101302010.lua b/pre-release/c101302010.lua deleted file mode 100644 index c73298c972..0000000000 --- a/pre-release/c101302010.lua +++ /dev/null @@ -1,72 +0,0 @@ ---終刻竜機Ⅶ-エララ ---Doom-Z Seven - Elara ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Set 1 "Doom-Z" Spell/Trap directly from your Deck - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.settg) - e1a:SetOperation(s.setop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EVENT_DESTROYED) - e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) - c:RegisterEffect(e1c) - --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DOOM_Z} -function s.setfilter(c) - return c:IsSetCard(SET_DOOM_Z) 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 -function s.spfilter(c,e,tp,lv,mc) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) - and mc:GetEquipGroup():FilterCount(Card.IsCanBeXyzMaterial,nil,c,tp,REASON_EFFECT)==mc:GetEquipCount() - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),c) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel(),c):GetFirst() - if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - Duel.Overlay(sc,c+c:GetEquipGroup(),true) - end -end \ No newline at end of file diff --git a/pre-release/c101302011.lua b/pre-release/c101302011.lua deleted file mode 100644 index 94fc2ca5b1..0000000000 --- a/pre-release/c101302011.lua +++ /dev/null @@ -1,98 +0,0 @@ ---獄神機Doom-Z ---Power Patron Machine Doom-Z ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You cannot Special Summon from the Extra Deck, except Xyz Monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) - c:RegisterEffect(e1) - aux.addContinuousLizardCheck(c,LOCATION_MZONE,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) - --Special Summon from your Extra Deck, 1 "Doom-Z" Xyz Monster or "Jupiter the Power Patron of Destruction" by using another Effect monster as material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Doom-Z" card from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DOOM_Z} -s.listed_names={101302044} --"Jupiter the Power Patron of Destruction" -function s.xyzmatfilter(c,e,tp) - local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return #mustg<=1 and c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetLevel(),mustg) -end -function s.spfilter(c,e,tp,mc,lv,mustg) - return c:IsType(TYPE_XYZ) and (c:IsSetCard(SET_DOOM_Z) or c:IsCode(101302044)) - and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) - and (#mustg<=0 or mustg:IsContains(mc)) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc~=c and s.xyzmatfilter(chkc,e,tp)end - if chk==0 then return Duel.IsExistingTarget(s.xyzmatfilter,tp,LOCATION_MZONE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzmatfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,LOCATION_MZONE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and not tc:IsImmuneToEffect(e)) then return end - local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetLevel(),mustg):GetFirst() - if sc then - sc:SetMaterial(tc) - Duel.Overlay(sc,tc) - if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end - sc:CompleteProcedure() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Equip(tp,c,sc) then - --Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end - end -end -function s.thfilter(c) - return c:IsSetCard(SET_DOOM_Z) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101302012.lua b/pre-release/c101302012.lua deleted file mode 100644 index 29b8b7dde0..0000000000 --- a/pre-release/c101302012.lua +++ /dev/null @@ -1,70 +0,0 @@ ---絢嵐たるメガラ ---Magnifistorming Megala ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, 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.selfspcon) - c:RegisterEffect(e1) - --Special Summon 1 "Magnifistorm" monster from your Deck with a different name from the monsters you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - 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_MAGNIFISTORM} -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) - or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (rc:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) or (rc:IsSetCard(SET_MAGNIFISTORM) and rc:IsQuickPlaySpell())) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_MAGNIFISTORM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_MZONE,0,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon for the rest of this turn, except WIND 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:IsAttribute(ATTRIBUTE_WIND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302013.lua b/pre-release/c101302013.lua deleted file mode 100644 index 8abade161a..0000000000 --- a/pre-release/c101302013.lua +++ /dev/null @@ -1,54 +0,0 @@ ---絢嵐たるエルダム ---Magnifistorming Erdam ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, 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.selfspcon) - c:RegisterEffect(e1) - --Add 1 "Magnifistorm" monster or 1 "Mystical Space Typhoon" from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_MAGNIFISTORM} -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON,id} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) - or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) 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/c101302014.lua b/pre-release/c101302014.lua deleted file mode 100644 index b5f232509a..0000000000 --- a/pre-release/c101302014.lua +++ /dev/null @@ -1,54 +0,0 @@ ---絢嵐たるスエン ---Magnifistorming Suen ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, 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.selfspcon) - c:RegisterEffect(e1) - --Add 1 "Magnifistorm" Spell/Trap or 1 "Mystical Space Typhoon" from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_MAGNIFISTORM} -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) - or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsSpellTrap()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101302015.lua b/pre-release/c101302015.lua deleted file mode 100644 index afc372648c..0000000000 --- a/pre-release/c101302015.lua +++ /dev/null @@ -1,89 +0,0 @@ ---絢嵐たるスエン ---Magnifistorming Crothea ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Cannot be destroyed by battle or card effects while your opponent controls no Spells/Traps - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE) - e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCondition(function(e) return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil) end) - e1a:SetValue(1) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e1b) - --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_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Magnifistorm" card and/or 1 "Mystical Space Typhoon" from your Deck and/or GY to your hand - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,1)) - e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_SUMMON_SUCCESS) - e3a:SetCountLimit(1,{id,1}) - e3a:SetTarget(s.thtg) - e3a:SetOperation(s.thop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3b) -end -s.listed_series={SET_MAGNIFISTORM} -s.listed_names={id,CARD_MYSTICAL_SPACE_TYPHOON} -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsSetCard,nil,SET_MAGNIFISTORM)<=1 and sg:FilterCount(Card.IsCode,nil,CARD_MYSTICAL_SPACE_TYPHOON)<=1 -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) - if #g>0 then - local sg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_ATOHAND) - if #sg>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end - --You cannot Special Summon for the rest of this turn, except WIND 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:IsAttribute(ATTRIBUTE_WIND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302016.lua b/pre-release/c101302016.lua deleted file mode 100644 index edee6484a5..0000000000 --- a/pre-release/c101302016.lua +++ /dev/null @@ -1,69 +0,0 @@ ---絢嵐渦麗ヴァルルーン ---Magnifistorm Vortex Beauty Valrune ---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_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate a monster effect activated by the opponent, then if you have 2 or more "Mystical Space Typhoon" in your GY, you can destroy that monster. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.discon) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Special Summon this card from your GY if "Mystical Space Typhoon" is activated - local e3=e1:Clone() - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -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.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) -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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable() - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,CARD_MYSTICAL_SPACE_TYPHOON) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302017.lua b/pre-release/c101302017.lua deleted file mode 100644 index b14388bfcc..0000000000 --- a/pre-release/c101302017.lua +++ /dev/null @@ -1,65 +0,0 @@ ---絢嵐豪火フォニクス ---Magnifistorm Great Pyre Phonix ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand if a Quick-Play Spell Card is activated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Shuffle up to 2 cards your opponent controls into the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) - --Special Summon this card from your GY if "Mystical Space Typhoon" is activated - local e3=e1:Clone() - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -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.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302018.lua b/pre-release/c101302018.lua deleted file mode 100644 index 3ff8d52489..0000000000 --- a/pre-release/c101302018.lua +++ /dev/null @@ -1,108 +0,0 @@ ---真竜魔王マスターP ---Master Peace, The True Dracoverlord ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Requires 3 Tributes to Normal Summon (cannot be Normal Set) - local e0a=aux.AddNormalSummonProcedure(c,true,false,3,3,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0)) - local e0b=aux.AddNormalSetProcedure(c) - --To Tribute Summon this card face-up, you can Tribute Continuous Spells/Traps you control, as well as monsters - local e0c=Effect.CreateEffect(c) - e0c:SetType(EFFECT_TYPE_SINGLE) - e0c:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0c:SetCode(EFFECT_ADD_EXTRA_TRIBUTE) - e0c:SetTargetRange(LOCATION_SZONE,0) - e0c:SetTarget(aux.TargetBoolFunction(Card.IsContinuousSpellTrap)) - e0c:SetValue(POS_FACEUP) - c:RegisterEffect(e0c) - --Negate the activation of an opponent's monster effect activated in the hand or field, and if you do, destroy that card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.negcon) - e1:SetTarget(s.negtg) - e1:SetOperation(s.negop) - c:RegisterEffect(e1) - --Skip your opponent's next Main Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - 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.skipcon) - e2:SetOperation(s.skipop) - c:RegisterEffect(e2) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_HAND|LOCATION_MZONE)>0 and c:IsTributeSummoned() - and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) -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.skipcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and rp==1-tp)) and c:IsTributeSummoned() - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) -end -function s.skipop(e,tp,eg,ep,ev,re,r,rp) - local oppo_main1_flag=nil - local effect_code=0 - local turn_count=Duel.GetTurnCount() - local current_phase=Duel.GetCurrentPhase() - local reset_count=(Duel.IsTurnPlayer(1-tp) and (current_phase==PHASE_MAIN1 or current_phase>=PHASE_MAIN2)) and 2 or 1 - if Duel.IsTurnPlayer(tp) or current_phase<=PHASE_STANDBY or current_phase>=PHASE_MAIN2 then - effect_code=EFFECT_SKIP_M1 - elseif Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() then - effect_code=EFFECT_SKIP_M2 - else - oppo_main1_flag=true - effect_code=EFFECT_SKIP_M1 - end - local c=e:GetHandler() - --Skip your opponent's next Main Phase - 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_code) - e1:SetTargetRange(0,1) - e1:SetCondition(function() return not oppo_main1_flag or turn_count~=Duel.GetTurnCount() end) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,reset_count) - Duel.RegisterEffect(e1,tp) - if oppo_main1_flag then - --If this effect was used during the opponent's Main Phase 1 which Main Phase gets skipped depends on what they do - local e2=e1:Clone() - e2:SetCode(EFFECT_SKIP_M2) - e2:SetCondition(aux.TRUE) - e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) - Duel.RegisterEffect(e2,tp) - --Reset the effect that skips their Main Phase 1 if they enter the Battle Phase that turn - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetCountLimit(1) - e3:SetCondition(function() return Duel.IsTurnPlayer(1-tp) end) - e3:SetOperation(function() e1:Reset() end) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) - end -end \ No newline at end of file diff --git a/pre-release/c101302019.lua b/pre-release/c101302019.lua deleted file mode 100644 index f75b63e7e1..0000000000 --- a/pre-release/c101302019.lua +++ /dev/null @@ -1,96 +0,0 @@ ---真竜凰騎マリアムネP ---Mariamne Paradox, the True Dracophoenix Knight ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --To Tribute Summon this card face-up, you can Tribute a Continuous Spell/Trap you control, instead of a monster - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_ADD_EXTRA_TRIBUTE) - e0:SetTargetRange(LOCATION_SZONE,0) - e0:SetTarget(aux.TargetBoolFunction(Card.IsContinuousSpellTrap)) - e0:SetValue(POS_FACEUP) - c:RegisterEffect(e0) - --Destroy 1 other "True Draco" or "True King" card in your hand or face-up field, and if you do, Special Summon this card to either field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Banish the top 4 cards of your Deck - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_REMOVE) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND) end) - e2a:SetTarget(s.rmtg) - e2a:SetOperation(s.rmop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_TRUE_DRACO_KING} -function s.desfilter(c,e,tp,hc,resolution_chk) - return c:IsSetCard(SET_TRUE_DRACO_KING) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) - and (resolution_chk or s.spcheck(c,e,tp,hc)) -end -function s.spcheck(c,e,tp,hc) - local ctrl=c:GetControler() - return (Duel.GetMZoneCount(ctrl,c,tp)>0 and hc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,ctrl)) - or (Duel.GetMZoneCount(1-ctrl,nil,tp)>0 and hc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-ctrl)) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local oppo_location=Duel.IsPlayerAffectedByEffect(tp,88581108) and LOCATION_MZONE or 0 - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,oppo_location,c,e,tp,c,false) - if chk==0 then return #g>0 end - if not g:IsExists(Card.IsOnField,1,nil) or ((Duel.GetMZoneCount(tp)>0 or Duel.GetMZoneCount(1-tp)>0) - and (Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,LOCATION_HAND,0,1,c) - or g:IsExists(aux.FaceupFilter(Card.IsLocation,LOCATION_HAND),1,nil))) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) - else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - 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() - local relation_chk=c:IsRelateToEffect(e) - local exc=relation_chk and c or nil - local oppo_location=Duel.IsPlayerAffectedByEffect(tp,88581108) and LOCATION_MZONE or 0 - local resolution_chk=not (relation_chk and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,oppo_location,1,exc,e,tp,c,false)) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,oppo_location,1,1,exc,e,tp,c,resolution_chk):GetFirst() - if not sc then return end - if sc:IsOnField() then Duel.HintSelection(sc) end - if Duel.Destroy(sc,REASON_EFFECT)>0 and relation_chk then - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) - if not (b1 or b2) then return end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - local target_player=op==1 and tp or 1-tp - Duel.SpecialSummon(c,0,tp,target_player,false,false,POS_FACEUP) - end -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetDecktopGroup(tp,4) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(tp,4) - if #g>0 then - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302020.lua b/pre-release/c101302020.lua deleted file mode 100644 index 1ee6aab373..0000000000 --- a/pre-release/c101302020.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ドレミコード・ソルフェージア ---Solfachord Solfeggia ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --Negate a monster effect activated by your opponent, then destroy this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_PZONE) - e1:SetCondition(s.discon) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --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:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_SOLFACHORD)),tp,LOCATION_MZONE,0,1,nil) end) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Special Summon 1 "Solfachord" monster from your hand, except "Solfachord Solfeggia" - 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) -end -s.listed_names={id} -s.listed_series={SET_GRANSOLFACHORD,SET_SOLFACHORD} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GRANSOLFACHORD),tp,LOCATION_MZONE,0,1,nil) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.Hint(HINT_CARD,0,id) - if Duel.NegateEffect(ev) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end -function s.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.spfilter(c,e,tp,exc) - if not (c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) then - return Duel.GetMZoneCount(tp,exc)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,exc,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local cost_chk=Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,0) - local exc=cost_chk and e:GetHandler() or nil - local location=cost_chk and LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA or LOCATION_HAND - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,location,0,1,nil,e,tp,exc) end - local hand_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - if cost_chk and (not hand_chk or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then - Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,1) - e:SetLabel(LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) - else - e:SetLabel(LOCATION_HAND) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,e:GetLabel()) -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,e:GetLabel(),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/c101302021.lua b/pre-release/c101302021.lua deleted file mode 100644 index a9783f4bed..0000000000 --- a/pre-release/c101302021.lua +++ /dev/null @@ -1,120 +0,0 @@ ---ドレミコード・プリモア ---Solfachord Primoria ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --Return 1 "Solfachord" card in your Pendulum Zone to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_PZONE) - e1:SetCondition(function(e,tp,eg) return eg:IsExists(s.pendthconfilter,1,nil,tp) end) - e1:SetTarget(s.pendthtg) - e1:SetOperation(s.pendthop) - c:RegisterEffect(e1) - --While you have "Solfachord" cards with even and odd Pendulum Scales in your Pendulum Zone, your activated "Solfachord" cards' effects cannot be negated - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_DISEFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.immcon) - e2:SetValue(s.immval) - c:RegisterEffect(e2) - --Add 1 "Solfachord" card from your Deck to your hand, except "Solfachord Primoria" - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,1)) - e3a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_SUMMON_SUCCESS) - e3a:SetCountLimit(1,id) - e3a:SetTarget(s.deckthtg) - e3a:SetOperation(s.deckthop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3b) - --Add 1 "Solfachord" card from your GY or face-up Extra Deck 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:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(function(e,tp,eg) return eg:IsExists(s.gyedthconfilter,1,nil,tp) end) - e4:SetTarget(s.gyedthtg) - e4:SetOperation(s.gyedthop) - c:RegisterEffect(e4) -end -s.listed_names={id} -s.listed_series={SET_SOLFACHORD} -function s.pendthconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() -end -function s.pendthfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and c:IsAbleToHand() -end -function s.pendthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_PZONE) and s.pendthfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.pendthfilter,tp,LOCATION_PZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.pendthfilter,tp,LOCATION_PZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.pendthop(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.immcon(e) - local g=Duel.GetMatchingGroup(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil,SET_SOLFACHORD) - local a,b=g:GetFirst(),g:GetNext() - return a and b and ((a:GetScale()+b:GetScale())%2==1) -end -function s.immval(e,ct) - local trig_player,trig_setcodes=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) - if trig_player==1-e:GetHandlerPlayer() then return false end - for _,setcode in ipairs(trig_setcodes) do - if (SET_SOLFACHORD&0xfff)==(setcode&0xfff) and (SET_SOLFACHORD&setcode)==SET_SOLFACHORD then return true end - end -end -function s.deckthfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.deckthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.gyedthconfilter(c,tp) - return c:IsLinkSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsSummonPlayer(tp) -end -function s.gyedthfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and c:IsFaceup() and c:IsAbleToHand() -end -function s.gyedthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.gyedthfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) -end -function s.gyedthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gyedthfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,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/c101302022.lua b/pre-release/c101302022.lua deleted file mode 100644 index 90bccc8fa6..0000000000 --- a/pre-release/c101302022.lua +++ /dev/null @@ -1,81 +0,0 @@ ---葬世の神 デーヴァリーム ---Regenesis Demiurge ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Must be Special Summoned (from your GY) by banishing 2 monsters from your GY with 2500 ATK or DEF - 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_GRAVE) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e0:SetCondition(s.selfspcon) - e0:SetTarget(s.selfsptg) - e0:SetOperation(s.selfspop) - c:RegisterEffect(e0) - --Return cards in your opponent's field and/or GY up to the number of your banished monsters with 2500 ATK or DEF to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - 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:SetTarget(s.rthtg) - e1:SetOperation(s.rthop) - c:RegisterEffect(e1) - --Monsters your opponent controls lose 2500 ATK during the Battle Phase only - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(function() return Duel.IsBattlePhase() end) - e2:SetValue(-2500) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.selfspconfilter(c) - return (c:IsAttack(2500) or c:IsDefense(2500)) and c:IsFaceup() and c:IsAbleToRemoveAsCost() - and aux.SpElimFilter(c,true) -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|LOCATION_GRAVE,0,c) - return #g>=2 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|LOCATION_GRAVE,0,c) - local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) - if #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if not g then return end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.rthctfilter(c) - return (c:IsAttack(2500) or c:IsDefense(2500)) and c:IsFaceup() -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToHand() end - local ct=Duel.GetMatchingGroupCount(s.rthctfilter,tp,LOCATION_REMOVED,0,nil) - if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) -end -function s.rthop(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/c101302023.lua b/pre-release/c101302023.lua deleted file mode 100644 index 705dd90a04..0000000000 --- a/pre-release/c101302023.lua +++ /dev/null @@ -1,70 +0,0 @@ ---星辰響手プリクル ---Dragontail Phrixl ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Dragontail" monster from your GY, then return 1 monster you control to the hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.sptg) - e1a:SetOperation(s.spop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --Set 1 "Dragontail" 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_BE_MATERIAL) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGONTAIL} -s.listed_names={id} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DRAGONTAIL) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,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.setfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) 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/c101302024.lua b/pre-release/c101302024.lua deleted file mode 100644 index ea35e992a9..0000000000 --- a/pre-release/c101302024.lua +++ /dev/null @@ -1,91 +0,0 @@ ---マシュマオ☆ヤミー ---Marshmao☆Yummy ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Yummy" Spell/Trap from your GY to your hand, or, if this card was Special Summoned by the effect of a Synchro Monster, you can place 1 "Yummy" Field Spell or "Yummy" Continuous Spell/Trap from your Deck or banishment face-up on your field instead - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thpltg) - e2a:SetOperation(s.thplop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_YUMMY} -function s.spconfilter(c) - return not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsFaceup()) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not 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:IsSetCard(SET_YUMMY) and c:IsSpellTrap() and c:IsAbleToHand() -end -function s.plfilter(c,tp,szone_chk) - return c:IsSetCard(SET_YUMMY) and (c:IsFieldSpell() or (szone_chk and c:IsContinuousSpellTrap())) - and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.thpltg(e,tp,eg,ep,ev,re,r,rp,chk) - local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) - or (sp_chk and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil,tp,Duel.GetLocationCount(tp,LOCATION_SZONE)>0)) end - e:SetLabel(sp_chk and 1 or 0) - if sp_chk then - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - else - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - end -end -function s.thplop(e,tp,eg,ep,ev,re,r,rp) - local sp_chk=e:GetLabel()==1 - local szone_chk=sp_chk and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil) - if sp_chk then - g:Merge(Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,nil,tp,szone_chk)) - end - if #g==0 then return end - local hint=sp_chk and aux.Stringid(id,2) or HINTMSG_ATOHAND - Duel.Hint(HINT_SELECTMSG,tp,hint) - local sc=g:Select(tp,1,1,nil):GetFirst() - if not sc then return end - if sc:IsLocation(LOCATION_GRAVE) then - --Add 1 "Yummy" Spell/Trap from your GY to your hand - Duel.HintSelection(sc) - Duel.SendtoHand(sc,nil,REASON_EFFECT) - else - --Place 1 "Yummy" Field Spell or "Yummy" Continuous Spell/Trap from your Deck or banishment face-up on your field - if sc:IsLocation(LOCATION_REMOVED) then Duel.HintSelection(sc) end - local place_location=sc:IsFieldSpell() and LOCATION_FZONE or LOCATION_SZONE - Duel.MoveToField(sc,tp,tp,place_location,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302025.lua b/pre-release/c101302025.lua deleted file mode 100644 index 21cf91af8d..0000000000 --- a/pre-release/c101302025.lua +++ /dev/null @@ -1,88 +0,0 @@ ---K9-04号 咒 ---K9-04 Noroi ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(s.ntcon) - c:RegisterEffect(e1) - --Special Summon 1 non-Machine "K9" monster from your Deck, but you cannot Special Summon from the Extra Deck, except "K9" monsters, while you control that face-up monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Look at your opponent's hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.lookcost) - e3:SetTarget(s.looktg) - e3:SetOperation(s.lookop) - c:RegisterEffect(e3) -end -s.listed_series={SET_K9} -function s.ntcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 -end -function s.spfilter(c,e,tp) - return not c:IsRace(RACE_MACHINE) and c:IsSetCard(SET_K9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) - --You cannot Special Summon from the Extra Deck while you control that face-up monster, except "K9" monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetAbsoluteRange(tp,1,0) - e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_K9) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1,true) - end -end -function s.lookcostfilter(c) - return c:IsSetCard(SET_K9) and c:IsFaceup() and c:IsAbleToGraveAsCost() -end -function s.lookcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.lookcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.lookcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_HAND,1,nil) end -end -function s.lookop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_HAND,nil) - if #g>0 then - Duel.ConfirmCards(tp,g) - Duel.ShuffleHand(1-tp) - end -end \ No newline at end of file diff --git a/pre-release/c101302026.lua b/pre-release/c101302026.lua deleted file mode 100644 index 610a47dc4b..0000000000 --- a/pre-release/c101302026.lua +++ /dev/null @@ -1,70 +0,0 @@ ---教導の雷霆フルルドリス ---Dogmatika Fleurdelis, the Thunderous ---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_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Set 1 "Dogmatika" 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:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DOGMATIKA} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,LOCATION_EXTRA) -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.setfilter(c) - return c:IsSetCard(SET_DOGMATIKA) and c:IsTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end -end -function s.actcondfilter(c) - return c:IsType(TYPE_EXTRA) and c:IsAttackAbove(2500) and c:IsFaceup() -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SSet(tp,sc)>0 then - --It can be activated this turn, while your opponent controls a Fusion, Synchro, Xyz, or Link Monster with 2500 or more ATK - 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_CLIENT_HINT) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetCondition(function() return Duel.IsExistingMatchingCard(s.actcondfilter,tp,0,LOCATION_MZONE,1,nil) end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101302027.lua b/pre-release/c101302027.lua deleted file mode 100644 index 2593f5bd43..0000000000 --- a/pre-release/c101302027.lua +++ /dev/null @@ -1,97 +0,0 @@ ---蹴神-VARefar ---VARefar the Kick Deity ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand, then you can reveal 1 card in your hand and apply an effect based on the type of card revealed - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) - e1a:SetType(EFFECT_TYPE_QUICK_O) - e1a:SetRange(LOCATION_HAND) - e1a:SetCode(EVENT_CHAINING) - e1a:SetCountLimit(1,id) - e1a:SetCondition(s.spcon1) - e1a:SetTarget(s.sptg) - e1a:SetOperation(s.spop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_BE_BATTLE_TARGET) - e1b:SetCondition(s.spcon2) - c:RegisterEffect(e1b) -end -function s.spcontgfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - if not (rp==1-tp and re:IsMonsterEffect() and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return trig_loc==LOCATION_MZONE and tg and tg:IsExists(s.spcontgfilter,1,nil,tp) -end -function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - local bt=Duel.GetAttackTarget() - return at and bt and at:IsControler(1-tp) and bt:IsControler(tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - local opp_mon=(Duel.CheckEvent(EVENT_BE_BATTLE_TARGET) and Duel.GetAttacker()) - or (re:GetHandler():IsRelateToEffect(re) and eg:GetFirst()) - or nil - if opp_mon then - e:SetLabelObject(opp_mon) - if not opp_mon:IsLinkMonster() then - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,opp_mon,1,tp,POS_FACEUP_DEFENSE) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,opp_mon,1,tp,opp_mon:GetAttack()) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,opp_mon,1,tp,0) - end -end -function s.revealfilter(c,types) - return c:IsType(types) and not c:IsPublic() -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 opp_mon=e:GetLabelObject() - if not opp_mon then return end - if Duel.CheckEvent(EVENT_BE_BATTLE_TARGET) then - if not opp_mon:IsRelateToBattle() then return false end - else - if not opp_mon:IsRelateToEffect(re) then return false end - end - local types=TYPE_SPELL - if opp_mon:IsCanChangePosition() and opp_mon:IsAttackPos() then types=types|TYPE_MONSTER end - if opp_mon:IsAbleToRemove() then types=types|TYPE_TRAP end - if Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil,types) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil,types):GetFirst() - if not rc then return end - Duel.BreakEffect() - Duel.ConfirmCards(1-tp,rc) - Duel.ShuffleHand(tp) - local op=rc:GetMainCardType() - Duel.BreakEffect() - if op==TYPE_MONSTER then - --Change it to Defense Position - Duel.ChangePosition(opp_mon,POS_FACEUP_DEFENSE) - elseif op==TYPE_SPELL then - --Its ATK becomes doubled - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(opp_mon:GetAttack()*2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - opp_mon:RegisterEffect(e1) - elseif op==TYPE_TRAP then - --Banish it - Duel.Remove(opp_mon,POS_FACEUP,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101302028.lua b/pre-release/c101302028.lua deleted file mode 100644 index 21702bf1c7..0000000000 --- a/pre-release/c101302028.lua +++ /dev/null @@ -1,102 +0,0 @@ ---転輪のスフィンクス ---Chakravartin Sphinx ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Return 1 card on the field to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(s.rthcon) - e1:SetTarget(s.rthtg) - e1:SetOperation(s.rthop) - c:RegisterEffect(e1) - --Special Summon this card from your hand or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Set 1 "Book of Taiyou" and/or 1 "Book of Moon" from your Deck and/or GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_names={38699854,14087893} --"Book of Taiyou", "Book of Moon" -function s.posconfilter(c) - return (c:IsPosition(POS_ATTACK) and c:IsPreviousPosition(POS_DEFENSE)) or (c:IsPosition(POS_DEFENSE) and c:IsPreviousPosition(POS_ATTACK)) -end -function s.rthcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.posconfilter,1,e:GetHandler()) -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.rthop(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.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.posconfilter,1,nil) -end -function s.spcostfilter(c) - return c:IsSpell() and c:IsAbleToRemoveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.setfilter(c) - return c:IsCode(38699854,14087893) 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|LOCATION_GRAVE,0,1,nil) end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,math.min(ft,2),aux.dncheck,1,tp,HINTMSG_SET) - if #sg>0 then - Duel.SSet(tp,sg) - end -end \ No newline at end of file diff --git a/pre-release/c101302029.lua b/pre-release/c101302029.lua deleted file mode 100644 index 7c7443095b..0000000000 --- a/pre-release/c101302029.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ドリ・ドル・ドラ ---Tri-Headed Behemoth ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --During the End Phase of this turn, Special Summon 1 WIND monster from your GY, but its ATK/DEF become 1000 - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e2a:SetTarget(s.efftg) - e2a:SetOperation(s.effop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -function s.selfspconfilter(c,tp) - return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) -end -function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.selfspconfilter,1,nil,tp) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - --During the End Phase of this turn, Special Summon 1 WIND monster from your GY, but its ATK/DEF become 1000 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(s.gyspop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.gyspfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gyspfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Its ATK/DEF become 1000 - local e1a=Effect.CreateEffect(e:GetHandler()) - e1a:SetType(EFFECT_TYPE_SINGLE) - e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1a:SetCode(EFFECT_SET_ATTACK) - e1a:SetValue(1000) - e1a:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_SET_DEFENSE) - sc:RegisterEffect(e1b) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c101302030.lua b/pre-release/c101302030.lua deleted file mode 100644 index c2ee35ab73..0000000000 --- a/pre-release/c101302030.lua +++ /dev/null @@ -1,64 +0,0 @@ ---斎キ狭依姫 ---Ichiki Sayori Hime ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:AddCannotBeSpecialSummoned() - Spirit.AddProcedure(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP) - --Immediately after this effect resolves, Normal Summon this card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.nscon) - e1:SetTarget(s.nstg) - e1:SetOperation(s.nsop) - c:RegisterEffect(e1) - --Add 1 Level 4 LIGHT or DARK monster with 800 ATK or DEF 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) -end -s.listed_names={id} -function s.nsconfilter(c) - return (c:IsAttack(800) or c:IsDefense(800)) and c:IsFaceup() -end -function s.nscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.nsconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSummonable(true,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,tp,0) -end -function s.nsop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Summon(tp,c,true,nil) - end -end -function s.thfilter(c) - return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and (c:IsAttack(800) or c:IsDefense(800)) - 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/c101302031.lua b/pre-release/c101302031.lua deleted file mode 100644 index 7b7c097f8b..0000000000 --- a/pre-release/c101302031.lua +++ /dev/null @@ -1,50 +0,0 @@ ---陰陽師 タオタオ ---Taotao the Chanter ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --Special Summon 1 Level 3 or higher Illusion monster from your hand or GY, or, if you took 2000 or more damage, you can Special Summon it from your Deck or Extra Deck instead - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_DAMAGE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==tp and r&(REASON_BATTLE|REASON_EFFECT)>0 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.spfilter(c,e,tp,mmz_chk) - if not (c:IsLevelAbove(3) and c:IsRace(RACE_ILLUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - local is_in_extra_deck=c:IsLocation(LOCATION_EXTRA) - return (not is_in_extra_deck and mmz_chk) or (is_in_extra_deck and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local extra_locations=ev>=2000 and LOCATION_DECK|LOCATION_EXTRA or 0 - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|extra_locations,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|extra_locations) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local extra_locations=ev>=2000 and LOCATION_DECK|LOCATION_EXTRA or 0 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|extra_locations,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)) - 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/c101302032.lua b/pre-release/c101302032.lua deleted file mode 100644 index ad5395d63c..0000000000 --- a/pre-release/c101302032.lua +++ /dev/null @@ -1,101 +0,0 @@ ---WAKE CUP! マキ ---WAKE CUP! Macchi ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Send 1 face-down card on the field to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --Special Summon both this card and 1 other Flip monster from your hand in face-down Defense Position - 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) - --Change 1 face-down Defense Position monster on the field to face-up Attack Position - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FLIP) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.postg) - e3:SetOperation(s.posop) - c:RegisterEffect(e3) -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFacedown() and chkc:IsAbleToGrave() end - if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsFacedown,Card.IsAbleToGrave),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGrave),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end -function s.spcostfilter(c,e,tp) - return c:IsType(TYPE_FLIP) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsPublic() and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() - Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) - e:SetLabelObject(rc) - rc:CreateEffectRelation(e) - Duel.ShuffleHand(tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0) -end -function s.spfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Group.FromCards(c,e:GetLabelObject()) - if g:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==2 then - Duel.ConfirmCards(1-tp,g) - end -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEDOWN_DEFENSE) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,POS_FACEDOWN_DEFENSE) - if #g>0 then - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) - end -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - end -end \ No newline at end of file diff --git a/pre-release/c101302033.lua b/pre-release/c101302033.lua deleted file mode 100644 index 36a5722bba..0000000000 --- a/pre-release/c101302033.lua +++ /dev/null @@ -1,65 +0,0 @@ ---メガリス・フローチュ ---Megalith Phuloch ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Add 1 "Megalith" card from your GY 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) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e1:SetCost(Cost.HardOncePerChain(id)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local ritual_params={ - handler=c, - filter=function(c) return c:IsSetCard(SET_MEGALITH) and not c:IsCode(id) end, - lvtype=RITPROC_GREATER, - location=LOCATION_GRAVE, - forcedselection=function(e,tp,g,sc) return g:IsContains(e:GetHandler()) end - } - --Ritual Summon 1 "Megalith" Ritual Monster from your GY, by Tributing monsters from your hand or field, including this card on your field, whose total Levels equal or exceed the Level of the Ritual Monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(Cost.HardOncePerChain(id)) - e2:SetTarget(Ritual.Target(ritual_params)) - e2:SetOperation(s.ritop(Ritual.Operation(ritual_params))) - c:RegisterEffect(e2) -end -s.listed_series={SET_MEGALITH} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_MEGALITH) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function s.ritop(default_operation) - return function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) then - default_operation(e,tp,eg,ep,ev,re,r,rp) - end - end -end diff --git a/pre-release/c101302034.lua b/pre-release/c101302034.lua deleted file mode 100644 index 1a3ba0d95c..0000000000 --- a/pre-release/c101302034.lua +++ /dev/null @@ -1,88 +0,0 @@ ---メガリス・ノートラ・プルーラ ---Megalith Nortra Phulra ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeRitualSummoned() - --Apply a "this turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects" effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) - e1:SetCost(Cost.SelfReveal) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Negate the activation of an opponent's card or effect, and if you do, destroy that card, then if that effect targeted a card(s) on the field, you can Tribute 1 monster your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_RELEASE) - 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(function(e,tp,eg,ep,ev) return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MEGALITH} -s.mat_filter=Card.IsRitualMonster -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() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --This turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetOperation(s.inactop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.inactop(e,tp,eg,ep,ev,re,r,rp) - if ep==1-tp then return end - local trig_typ,trig_setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) - if trig_typ&(TYPE_RITUAL|TYPE_MONSTER)~=(TYPE_RITUAL|TYPE_MONSTER) then return end - for _,setcode in ipairs(trig_setcodes) do - if (SET_MEGALITH&0xfff)==(setcode&0xfff) and (SET_MEGALITH&setcode)==SET_MEGALITH then - return Duel.SetChainLimit(function(e,rp,tp) return rp==tp end) - end - end -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 - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if tg and tg:IsExists(Card.IsOnField,1,nil) then - e:SetLabel(100) - Duel.SetPossibleOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) - else - e:SetLabel(0) - end -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) then - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - if e:GetLabel()==100 and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Release(g,REASON_EFFECT) - end - end - end -end diff --git a/pre-release/c101302036.lua b/pre-release/c101302036.lua deleted file mode 100644 index 058362801f..0000000000 --- a/pre-release/c101302036.lua +++ /dev/null @@ -1,65 +0,0 @@ ---剛鬼ザ・タイラント・オーガ ---Gouki The Tyrant Ogre ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Gouki" Link Monster + 1 Warrior, Dinosaur, or Cyberse monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE)) - --Register the Link Rating of the materials used for its Fusion Summon - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(s.valcheck) - c:RegisterEffect(e0) - --Destroy cards on the field up to the total Link Rating of the "Gouki" Link Monsters used as material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()>0 end) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - e0:SetLabelObject(e1) - --If this card battles, your opponent cannot activate cards or effects until the end of the Damage Step - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetValue(1) - e2:SetCondition(function(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -function s.matfilter(c) - return c:IsSetCard(SET_GOUKI) and c:IsLinkMonster() -end -function s.valcheck(e,c) - local g=c:GetMaterial() - local total=g:Filter(Card.IsSetCard,nil,SET_GOUKI):GetSum(Card.GetLink) - local link3=g:IsExists(Card.IsLinkAbove,1,nil,3) and 100 or 0 - e:GetLabelObject():SetLabel(total,link3) -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 - local total,link3=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,total,nil) - if link3==100 then - Duel.SetChainLimit(function(te) return not Duel.GetTargetCards(e):IsContains(te:GetHandler()) end) - end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302037.lua b/pre-release/c101302037.lua deleted file mode 100644 index 205074e3c5..0000000000 --- a/pre-release/c101302037.lua +++ /dev/null @@ -1,78 +0,0 @@ ---サイキッカー・オラクル ---Axon Kicker Oracle ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Psychic monster + 1 Synchro, Xyz, or Link Monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK)) - --After this card is Fusion Summoned, it gains 1000 ATK for each Synchro, Xyz, and Link Monster used as it material until the end of the next turn - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():FilterCount(Card.IsType,nil,TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK)) end) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) - e1:SetOperation(function(e) e:GetHandler():UpdateAttack(e0:GetLabel()*1000,RESETS_STANDARD_DISABLE_PHASE_END,nil,2) end) - c:RegisterEffect(e1) - --Negate an opponent's Special Summon and banish that monster(s) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_SPSUMMON) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep) return ep==1-tp and Duel.GetCurrentChain()==0 end) - e2:SetTarget(s.negsumtg) - e2:SetOperation(s.negsumop) - c:RegisterEffect(e2) - --Special Summon this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e) local c=e:GetHandler() return c:IsFusionSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end) - e3:SetCost(s.spcost) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.miracle_synchro_fusion=true -s.listed_series={SET_TELEPORT} -function s.negsumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(Card.IsAbleToRemove,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,tp,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,#eg,tp,0) -end -function s.negsumop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) -end -function s.spcostfilter(c) - return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:IsAbleToRemoveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101302039.lua b/pre-release/c101302039.lua deleted file mode 100644 index b60f9072af..0000000000 --- a/pre-release/c101302039.lua +++ /dev/null @@ -1,93 +0,0 @@ ---黒薔薇の破滅竜 ---Bramble Rose Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Plant Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PLANT),1,1,Synchro.NonTuner(nil),1,99) - --Each time your opponent activates a monster effect, inflict 600 to your opponent when that effect resolves, and if you do, all monsters they control lose 600 ATK - 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:SetCode(EVENT_CHAIN_SOLVED) - e1b:SetRange(LOCATION_MZONE) - e1b:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and e:GetHandler():HasFlagEffect(1) end) - e1b:SetOperation(s.damop) - c:RegisterEffect(e1b) - --Special Summon 1 "Black Rose Dragon" from your Extra Deck (this is treated as a Synchro Summon) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(Cost.SelfTribute) - e2:SetTarget(s.exsptg) - e2:SetOperation(s.exspop) - c:RegisterEffect(e2) - --Special Summon 1 Level 4 or lower Plant Tuner 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:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.gysptg) - e3:SetOperation(s.gyspop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_BLACK_ROSE_DRAGON} -function s.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,id) - if Duel.Damage(1-tp,600,REASON_EFFECT)>0 then - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - --All monsters they control lose 600 ATK - g:ForEach(function(tc) tc:UpdateAttack(-600,nil,c) end) - end -end -function s.exspfilter(c,e,tp,mc) - return c:IsCode(CARD_BLACK_ROSE_DRAGON) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.exsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.exspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end -end -function s.gyspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_TUNER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.gyspop(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.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101302040.lua b/pre-release/c101302040.lua deleted file mode 100644 index ca44dc58e4..0000000000 --- a/pre-release/c101302040.lua +++ /dev/null @@ -1,90 +0,0 @@ ---黒薔薇と荊棘の魔女 ---Hate Rose Witch ---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) - --Plant monsters you control cannot be destroyed by card effects - 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:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PLANT)) - e1:SetValue(1) - c:RegisterEffect(e1) - --Send up to 2 Plant monsters to the GY (1 from your Deck and/or 1 from your Extra Deck) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) - --Special Summon this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.spcon) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -function s.tgfilter(c) - return c:IsRace(RACE_PLANT) 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|LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil) - if #g>0 then - local tg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.dpcheck(Card.GetLocation),1,tp,HINTMSG_TOGRAVE) - if #tg>0 then - Duel.SendtoGrave(tg,REASON_EFFECT) - end - end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end -function s.spconfilter(c) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil) and not eg:IsContains(e:GetHandler()) -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/c101302041.lua b/pre-release/c101302041.lua deleted file mode 100644 index 8f251719c5..0000000000 --- a/pre-release/c101302041.lua +++ /dev/null @@ -1,84 +0,0 @@ ---剛鬼ドラゴン・オーガ ---Gouki Dragon Ogre ---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) - --Add 1 "Gouki" Spell from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_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.deckthtg) - e1:SetOperation(s.deckthop) - c:RegisterEffect(e1) - --Add 1 "Gouki" monster with lower ATK than a targeted EARTH monster you control from your GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.gythtg) - e2:SetOperation(s.gythop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -function s.deckthfilter(c) - return c:IsSetCard(SET_GOUKI) 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 -function s.earthfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.gythfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack()) -end -function s.gythfilter(c,atk) - return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:GetAttack()0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --Your opponent's monsters can only target that face-up monster on your field for attacks - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) - e1:SetValue(function(e,c) return c==tc end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302042.lua b/pre-release/c101302042.lua deleted file mode 100644 index eb5b34e36e..0000000000 --- a/pre-release/c101302042.lua +++ /dev/null @@ -1,65 +0,0 @@ ---静寂のサイコソーサレス ---Serene Psychic Sorceress ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Set 1 "Teleport" Normal or Quick-Play Spell from your Deck, GY, or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetCost(Cost.PayLP(1000)) - e1:SetTarget(s.settg) - e1:SetOperation(s.setop) - c:RegisterEffect(e1) - --Return 1 card 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_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) local c=e:GetHandler() return c:IsSynchroSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end) - e2:SetTarget(s.rthtg) - e2:SetOperation(s.rthop) - c:RegisterEffect(e2) -end -s.listed_series={SET_TELEPORT} -function s.setfilter(c) - return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) 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,LOCATION_GRAVE) -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 -function s.target2con(c) - return c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_FUSION|TYPE_SYNCHRO) and c:IsFaceup() -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=Duel.IsExistingMatchingCard(s.target2con,tp,LOCATION_MZONE,0,1,nil) and 2 or 1 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) -end -function s.rthop(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/c101302044.lua b/pre-release/c101302044.lua deleted file mode 100644 index e28d6cfd0a..0000000000 --- a/pre-release/c101302044.lua +++ /dev/null @@ -1,95 +0,0 @@ ---壊獄神ユピテル ---Jupiter the Power Patron of Destruction ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 10 monsters - Xyz.AddProcedure(c,nil,10,3,function(c) return c:GetEquipCount()>=3 end,aux.Stringid(id,0),3,s.altprocop) - --You can equip any number of appropriate Equip Spells from your GY to this card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetTarget(s.eqtg) - e1:SetOperation(s.eqop) - c:RegisterEffect(e1) - --Gains 3000 ATK while it has an Xyz Monster as material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) end) - e2:SetValue(3000) - c:RegisterEffect(e2) - --Special Summon 1 "Doom-Z" monster from your GY, then you can destroy 1 card on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(Cost.DetachFromSelf(1)) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={id} -s.listed_series={SET_DOOM_Z} -function s.altprocop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.eqfilter(c,tp,ec) - return c:IsEquipSpell() and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp) -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_GRAVE) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft==0 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,nil,tp,c) - if #g==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local sg=g:Select(tp,1,math.min(ft,#g),nil) - if #sg>0 then - for tc in sg:Iter() do - Duel.Equip(tp,tc,c,true,true) - end - Duel.EquipComplete() - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DOOM_Z) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end diff --git a/pre-release/c101302045.lua b/pre-release/c101302045.lua deleted file mode 100644 index c619825d69..0000000000 --- a/pre-release/c101302045.lua +++ /dev/null @@ -1,87 +0,0 @@ ---終刻龍機ⅩⅡ-ドラストリウス ---Doom-Z End - Drastrius ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 8 monsters - Xyz.AddProcedure(c,nil,8,3) - --The first time this card would be destroyed by battle each turn, it is not destroyed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetValue(function(e,re,r) return (r&REASON_BATTLE|REASON_EFFECT)>0 end) - c:RegisterEffect(e1) - --You can equip 1 other face-up monster on the field to this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e2:SetTarget(s.eqtg) - e2:SetOperation(s.eqop) - c:RegisterEffect(e2) - aux.AddEREquipLimit(c,nil,aux.TRUE,Card.EquipByEffectAndLimitRegister,e2) - --Negate an opponent's monster effect activated on the field or in the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE+CATEGORY_EQUIP) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.discon) - e3:SetCost(Cost.DetachFromSelf(1)) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) - aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsControler(1-tp) end,Card.EquipByEffectAndLimitRegister,e3) -end -s.listed_series={SET_DOOM_Z} -function s.eqfilter(c,tp) - return c:IsFaceup() and (c:IsControler(tp) or c:IsAbleToChangeControler()) -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,PLAYER_EITHER,LOCATION_MZONE) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp):GetFirst() - if ec then - Duel.HintSelection(ec) - c:EquipByEffectAndLimitRegister(e,tp,ec) - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp,chk) - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_MZONE|LOCATION_GRAVE)>0 and Duel.IsChainDisablable(ev) -end -function s.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) - Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,1-tp,LOCATION_MZONE) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.NegateEffect(ev) then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetMatchingGroup(s.eqfilter,tp,0,LOCATION_MZONE,c,tp) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=g:Select(tp,1,1,nil):GetFirst() - if ec then - Duel.HintSelection(ec) - Duel.BreakEffect() - c:EquipByEffectAndLimitRegister(e,tp,ec) - end -end diff --git a/pre-release/c101302046.lua b/pre-release/c101302046.lua deleted file mode 100644 index 187e2b6445..0000000000 --- a/pre-release/c101302046.lua +++ /dev/null @@ -1,79 +0,0 @@ ---終刻獄徒 ディアクトロス ---Doom-Z Break Diactorus ---Scripted by Hatter -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 "Doom-Z" card in your hand or face-up field, then you can destroy 1 monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Add to your hand, or send to the GY, 1 Equip Spell from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE) - 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.thtgcon) - e2:SetTarget(s.thtgtg) - e2:SetOperation(s.thtgop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MEDIUS_THE_PURE} -s.listed_series={SET_DOOM_Z} -function s.desfilter(c) - return c:IsSetCard(SET_DOOM_Z) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_HAND|LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_MZONE) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end -function s.thtgconfilter(c) - return (c:IsSetCard(SET_DOOM_Z) and c:IsMonster()) or c:IsCode(CARD_MEDIUS_THE_PURE) -end -function s.thtgcon(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayGroup():IsExists(s.thtgconfilter,1,nil) -end -function s.thtgfilter(c) - return c:IsEquipSpell() and (c:IsAbleToHand() or c:IsAbleToGrave()) -end -function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thtgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.thtgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local g=Duel.SelectMatchingCard(tp,s.thtgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - aux.ToHandOrElse(g,tp) - end -end diff --git a/pre-release/c101302047.lua b/pre-release/c101302047.lua deleted file mode 100644 index 4457917691..0000000000 --- a/pre-release/c101302047.lua +++ /dev/null @@ -1,64 +0,0 @@ ---K9-666号 “Jacks” ---K9-666 "Jacks" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 5 monsters - Xyz.AddProcedure(c,nil,5,2) - --Destroy 1 monster on the field - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_DESTROY) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_SPSUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1a:SetCost(Cost.DetachFromSelf(1)) - e1a:SetTarget(s.destg) - e1a:SetOperation(s.desop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1b:SetCode(EVENT_CHAINING) - e1b:SetRange(LOCATION_MZONE) - e1b:SetCondition(s.descon) - c:RegisterEffect(e1b) - --A "K9" Xyz Monster that has this card as material gains this effect: ● During any turn in which your opponent has activated a monster effect in the hand or GY, any battle damage this card inflicts to your opponent is doubled - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_XMATERIAL) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.doubledamcon) - e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - c:RegisterEffect(e2) - --Keep track of monster effects activated in the hand or GY - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) -end -s.listed_series={SET_K9} -function s.chainfilter(re,tp,cid) - return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp,chk) - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_HAND|LOCATION_GRAVE)>0 -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) and tc:IsMonster() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function s.doubledamcon(e) - local c=e:GetHandler() - return c:IsSetCard(SET_K9) and c:IsXyzMonster() and Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 -end \ No newline at end of file diff --git a/pre-release/c101302048.lua b/pre-release/c101302048.lua deleted file mode 100644 index 08925296b8..0000000000 --- a/pre-release/c101302048.lua +++ /dev/null @@ -1,76 +0,0 @@ ---漆梏の喰獣 ケルゼブス ---Cerzebuth, Laimargia of the Ebon Irons ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2+ Level 7 monsters - Xyz.AddProcedure(c,nil,7,2,nil,nil,Xyz.InfiniteMats) - --Gains 700 ATK for each material attached to it - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return c:GetOverlayCount()*700 end) - c:RegisterEffect(e1) - --Attach that activated Normal or Quick-Play Spell Card on the field to this face-up card, and if you do, this card is unaffected by that activated effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(s.attachcon) - e2:SetOperation(s.attachop) - c:RegisterEffect(e2) - --Set 1 Spell attached to this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -function s.attachcon(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (rc:IsNormalSpell() or rc:IsQuickPlaySpell()) and rc:IsOnField() - and rc:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) -end -function s.attachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=re:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and rc:IsRelateToEffect(re) - and not c:IsImmuneToEffect(e) and not rc:IsImmuneToEffect(e) - and rc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) then - Duel.Overlay(c,rc) - if not c:GetOverlayGroup():IsContains(rc) then return end - rc:CancelToGrave() - --This card is unaffected by that activated effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(function(e,te) return te==re end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) - c:RegisterEffect(e1) - end -end -function s.setfilter(c) - return c:IsSpell() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetOverlayGroup():IsExists(s.setfilter,1,nil) end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=c:GetOverlayGroup():FilterSelect(tp,s.setfilter,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101302050.lua b/pre-release/c101302050.lua deleted file mode 100644 index d341bd7ce3..0000000000 --- a/pre-release/c101302050.lua +++ /dev/null @@ -1,74 +0,0 @@ ---剛鬼シーク・オーガ ---Gouki Sheik Ogre ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 "Gouki" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) - --Special Summon any number of "Gouki" monsters from your hand with different Levels from each other - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Fusion Summon 1 "Gouki" Fusion Monster from your Extra Deck, using monsters from your hand or field - local params={function(c) return c:IsSetCard(SET_GOUKI) end} - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(Fusion.SummonEffTG(params)) - e2:SetOperation(Fusion.SummonEffOP(params)) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -function s.spconfilter(c,tp) - return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:IsPreviousLocation(LOCATION_DECK) - and c:IsControler(tp) and not c:IsReason(REASON_DRAW) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_GOUKI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #g==0 then return end - ft=math.min(ft,#g) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_SPSUMMON) - if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then - for sc in sg:Iter() do - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --You cannot Special Summon, except "Gouki" monsters, while you control any of those face-up monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetAbsoluteRange(tp,1,0) - e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1,true) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302051.lua b/pre-release/c101302051.lua deleted file mode 100644 index 5d92dc2ed7..0000000000 --- a/pre-release/c101302051.lua +++ /dev/null @@ -1,77 +0,0 @@ ---鉄獣式撃滅兵争“Mouser” ---Tri-Brigade Arms Mouser ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon Procedure: 2 Beast, Beast-Warrior, and/or Winged Beast monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACES_BEAST_BWARRIOR_WINGB),2,2) - --Send 2 "Tri-Brigade" cards with different names from your Deck and/or Extra Deck to the GY, except "Tri-Brigade Arms Mouser" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --Change 1 face-up monster on the field to face-down Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION) - 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:SetTarget(s.postg) - e2:SetOperation(s.posop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_TRI_BRIGADE} -function s.tgfilter(c) - return c:IsSetCard(SET_TRI_BRIGADE) and not c:IsCode(id) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil) - return #g>=2 and g:GetClassCount(Card.GetCode)>=2 - end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_TOGRAVE) - if #sg==2 then - Duel.SendtoGrave(sg,REASON_EFFECT) - end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Beast, Beast-Warrior, or Winged Beast monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACES_BEAST_BWARRIOR_WINGB) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACES_BEAST_BWARRIOR_WINGB) end) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsMonster() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101302052.lua b/pre-release/c101302052.lua deleted file mode 100644 index 7a6bffd757..0000000000 --- a/pre-release/c101302052.lua +++ /dev/null @@ -1,104 +0,0 @@ ---瘴煙の死霊術師 ---Miasma Necromancer ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 monsters, including a DARK Spellcaster monster - Link.AddProcedure(c,nil,2,2,s.matcheck) - --Add 1 Level 5 or higher DARK Spellcaster monster from your GY 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) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Normal Summon 1 Spellcaster monster - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_SUMMON) - e2a:SetType(EFFECT_TYPE_IGNITION) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCost(s.sumcost) - e2a:SetTarget(s.sumtg) - e2a:SetOperation(s.sumop) - c:RegisterEffect(e2a) - --Workaround so that the card to be sent as cost for "e2a" isn't considered for the potential Tributes (same as "Ancient Gear Commander" [27483935]) - --"e2a" currently won't work when trying to summon a monster without Tributes while all the player's MMZs are full - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_FIELD) - e2b:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2b:SetCode(EFFECT_UNRELEASABLE_SUM) - e2b:SetRange(LOCATION_MZONE) - e2b:SetTargetRange(LOCATION_MZONE,0) - e2b:SetTarget(function(e,c) return c==e:GetLabelObject() end) - e2b:SetValue(1) - c:RegisterEffect(e2b) - e2a:SetLabelObject(e2b) -end -function s.matfilter(c,lc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_DARK,lc,sumtype,tp) and c:IsRace(RACE_SPELLCASTER,lc,sumtype,tp) -end -function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(s.matfilter,1,nil,lc,sumtype,tp) -end -function s.thfilter(c) - return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - local code=sc:GetCode() - --But you cannot activate cards, or the effects of cards, with its name for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(function(e,re,tp) return re:GetHandler():IsCode(code) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.sumcostfilter(c,tp,eff) - if not (c:IsSpellTrap() and c:IsAbleToGraveAsCost()) then return false end - eff:SetLabelObject(c) - local res=Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,c) - eff:SetLabelObject(nil) - return res -end -function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - local eff=e:GetLabelObject() - if chk==0 then return Duel.IsExistingMatchingCard(s.sumcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp,eff) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.sumcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp,eff) - Duel.SendtoGrave(g,REASON_COST) -end -function s.sumfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsSummonable(true,nil) -end -function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end -end diff --git a/pre-release/c101302053.lua b/pre-release/c101302053.lua deleted file mode 100644 index c78b29c400..0000000000 --- a/pre-release/c101302053.lua +++ /dev/null @@ -1,72 +0,0 @@ ---炎魔刃レーヴァテイン ---Laevateinn the Burning Blade ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon Procedure: 2 FIRE monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE),2) - --Special Summon 1 FIRE monster from your GY with the same original Type but a lower original Level than the Tributed FIRE monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If a face-down card(s) in your Spell & Trap Zone would be destroyed by an opponent's card effect, you can banish this card you control 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()) end) - e2:SetOperation(function(e) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end) - c:RegisterEffect(e2) -end -function s.spcostfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:HasLevel() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalRace(),c:GetOriginalLevel()) -end -function s.spfilter(c,e,tp,race,lv) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:HasLevel() and c:IsOriginalRace(race) and c:GetOriginalLevel()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) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=100*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) - if e:GetHandler():IsReason(REASON_EFFECT) and re:GetHandler():IsCode(CARD_BLACK_ROSE_DRAGON) then - e:SetLabel(1) - if dam>0 then dam=dam+2400 end - else - e:SetLabel(0) - end - Duel.SetTargetPlayer(1-tp) - if dam>0 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=100*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) - if dam>0 and Duel.Damage(p,dam,REASON_EFFECT)>0 and e:GetLabel()==1 then - Duel.BreakEffect() - Duel.Damage(p,2400,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302056.lua b/pre-release/c101302056.lua deleted file mode 100644 index 4862868f03..0000000000 --- a/pre-release/c101302056.lua +++ /dev/null @@ -1,75 +0,0 @@ ---剛鬼闘魂 ---Gouki Fighting Spirit ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can Special Summon 1 Level 4 or lower EARTH monster (Warrior, Dinosaur, or Cyberse) from your hand in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Special Summon 1 "Dinowrestler" or "G Golem" monster from your Deck or Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.deckexspcost) - e2:SetTarget(s.deckexsptg) - e2:SetOperation(s.deckexspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI,SET_DINOWRESTLER,SET_G_GOLEM} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.handspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(s.handspfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - end -end -function s.deckexcostfilter(c,e,tp) - return c:IsLinkAbove(3) and c:IsSetCard(SET_GOUKI) - and Duel.IsExistingMatchingCard(s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.deckexspfilter(c,e,tp,cost_card) - if not (c:IsSetCard({SET_DINOWRESTLER,SET_G_GOLEM}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetMZoneCount(tp,cost_card)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,cost_card,c)>0 - end -end -function s.deckexspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.deckexcostfilter,1,false,nil,nil,e,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.deckexcostfilter,1,1,false,nil,nil,e,tp) - Duel.Release(g,REASON_COST) -end -function s.deckexsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.deckexspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101302057.lua b/pre-release/c101302057.lua deleted file mode 100644 index a3de63f896..0000000000 --- a/pre-release/c101302057.lua +++ /dev/null @@ -1,94 +0,0 @@ ---終刻撃針 ---Doom-Z Raider ---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) - --Destroy 1 other "Doom-Z" card in your hand or face-up field, then add to your hand, or Special Summon, 1 "Doom-Z" monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.desthsptg) - e1:SetOperation(s.desthspop) - c:RegisterEffect(e1) - --Destroy 1 face-up monster on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DOOM_Z} -function s.desfilter(c,e,tp) - if not (c:IsSetCard(SET_DOOM_Z) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))) then return false end - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) -end -function s.thspfilter(c,e,tp,exc) - return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() - and (c:IsAbleToHand() or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp,exc)>0)) -end -function s.desthsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.desthspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,e,tp) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if sc then - Duel.BreakEffect() - aux.ToHandOrElse(sc,tp, - function() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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) - ) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_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) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFaceup,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 \ No newline at end of file diff --git a/pre-release/c101302058.lua b/pre-release/c101302058.lua deleted file mode 100644 index 594519672c..0000000000 --- a/pre-release/c101302058.lua +++ /dev/null @@ -1,115 +0,0 @@ ---終刻起動『D.O.O.M.D.U.R.G.』 ---Doom-Z Command "D.O.O.M.D.U.R.G" ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - aux.AddEquipProcedure(c) - --Inflict 500 damage to the equipped monster's controller during the Standby Phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --Your opponent cannot target this card with card effects - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetValue(aux.tgoval) - --Destroy 1 other face-up card you control, also this card gains ATK equal to its own Level/Rank x 100, it can attack directly and if it battles destroy it at the end of the Damage Step - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCondition(aux.StatChangeDamageStepCondition) - e3:SetTarget(s.desatktg) - e3:SetOperation(s.desatkop) - --Grant the above effects to a "Doom-Z" monster equipped with this card - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(function(e,c) return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(SET_DOOM_Z) end) - e4:SetLabelObject(e2) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetLabelObject(e3) - c:RegisterEffect(e5) - --Grant the above protection effect (e2) to a WIND Machine Xyz Monster that has it as material - local e6=e2:Clone() - e6:SetType(EFFECT_TYPE_XMATERIAL) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - c:RegisterEffect(e6) - --Grant the above destruction+atk change effect (e3) to a WIND Machine Xyz Monster that has it as material - local e7=e3:Clone() - e7:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) - e7:SetRange(LOCATION_MZONE) - e7:SetCondition(function(e) local c=e:GetHandler() return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) end) - c:RegisterEffect(e7) -end -s.listed_series={SET_DOOM_Z} -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local p=e:GetHandler():GetEquipTarget():GetControler() - Duel.SetTargetPlayer(p) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,1,p,500) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(e:GetHandler():GetEquipTarget():GetControler(),500,REASON_EFFECT) -end -function s.desatktg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local dg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,c) - if chk==0 then return #dg>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) - local atk=(c:HasLevel() and c:GetLevel() or c:GetRank())*100 - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,atk) -end -function s.desatkop(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_DESTROY) - local desg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,exc) - if #desg==0 then return end - Duel.HintSelection(desg) - if Duel.Destroy(desg,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - if c:IsFaceup() then - local atk=(c:HasLevel() and c:GetLevel() or c:GetRank())*100 - --This card gains ATK equal to its own Level/Rank x 100 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end - --It can attack directly - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e2) - --If it battles, destroy it at the end of the Damage Step - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(function(e) return e:GetHandler():IsRelateToBattle() end) - e3:SetOperation(function(e) Duel.Hint(HINT_CARD,0,c:GetOriginalCodeRule()) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end) - e3:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e3) - end -end \ No newline at end of file diff --git a/pre-release/c101302059.lua b/pre-release/c101302059.lua deleted file mode 100644 index c953881178..0000000000 --- a/pre-release/c101302059.lua +++ /dev/null @@ -1,72 +0,0 @@ ---破滅なる予幻視 ---Theorealize Overdrive ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Medius the Pure" from your GY or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1: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) - --Change the Level of 1 face-up 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_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.lvtg) - e2:SetOperation(s.lvop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MEDIUS_THE_PURE} -function s.spfilter(c,e,tp) - return c:IsCode(CARD_MEDIUS_THE_PURE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() -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.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - 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:IsControler(tp) and chkc:HasLevel() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - local lv=Duel.AnnounceNumberRange(tp,1,10,tc:GetLevel()) - e:SetLabel(lv) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tc,1,tp,0) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsFaceup() and tc:HasLevel() and tc:IsRelateToEffect(e)) then return end - local lv=e:GetLabel() - if lv>0 and not tc:IsLevel(lv) then - --Its Level becomes the declared Level until the end of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101302060.lua b/pre-release/c101302060.lua deleted file mode 100644 index 053e67232e..0000000000 --- a/pre-release/c101302060.lua +++ /dev/null @@ -1,87 +0,0 @@ ---アルトメギア・ムーヴメント-血統- ---Artmage Movement -Lineage- ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Artmage" monster from your Deck in Defense Position, with a different name from the cards you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end) - e1:SetCost(s.cost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Artmage" Trap from your GY or banishment to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetCost(s.cost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Checks to see if non-Fusion Monsters were Summoned from the Extra Deck - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) end) -end -s.listed_series={74733322} --"Artmage Academic Arcane Arts Acropolis" -s.listed_series={SET_ARTMAGE} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon from the Extra Deck the turn you activate this effect, except Fusion Monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spfilter(c,e,tp,...) - return c:IsSetCard(SET_ARTMAGE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not (... and c:IsCode(...)) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end - local codes=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil):GetClass(Card.GetCode) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,table.unpack(codes)) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local codes=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil):GetClass(Card.GetCode) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,table.unpack(codes)) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)==74733322 -end -function s.thfilter(c) - return c:IsSetCard(SET_ARTMAGE) and c:IsTrap() and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302061.lua b/pre-release/c101302061.lua deleted file mode 100644 index f86aad1ed9..0000000000 --- a/pre-release/c101302061.lua +++ /dev/null @@ -1,84 +0,0 @@ ---絢嵐たる献詠 ---Magnifistorming Stanza Tribute ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Set this card - 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_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.thfilter1(c) - return c:IsLevelBelow(4) and c:IsSetCard(SET_MAGNIFISTORM) and c:IsAbleToHand() -end -function s.thfilter2(c) - return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) - local b2=Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) and not Duel.HasFlagEffect(tp,id+100) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Add 1 Level 4 or lower "Magnifistorm" monster from your Deck to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - elseif op==2 then - --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),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 -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 - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end diff --git a/pre-release/c101302062.lua b/pre-release/c101302062.lua deleted file mode 100644 index ebf57437bf..0000000000 --- a/pre-release/c101302062.lua +++ /dev/null @@ -1,84 +0,0 @@ ---絢嵐たる顕現 ---Magnifistorming Summoning Technique ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Set this card - 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_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.tgfilter(c) - return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() -end -function s.thfilter(c) - return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) and not Duel.HasFlagEffect(tp,id+100) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_TOGRAVE) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Send 1 "Magnifistorm" monster from your Deck to the GY - 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 - elseif op==2 then - --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand - 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 -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 - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end diff --git a/pre-release/c101302063.lua b/pre-release/c101302063.lua deleted file mode 100644 index f682f289f3..0000000000 --- a/pre-release/c101302063.lua +++ /dev/null @@ -1,97 +0,0 @@ ---絢嵐たる見神 ---Magnifistorming Sight Trance ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Set this card - 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_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.tgfilter(c) - return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() -end -function s.thfilter(c) - return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsPlayerCanDraw(tp,2) and not Duel.HasFlagEffect(tp,id) - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) and not Duel.HasFlagEffect(tp,id+100) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) - elseif op==2 then - e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - end -end -function s.discardfilter(c) - return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsQuickPlaySpell()) and c:IsDiscardable(REASON_EFFECT) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Draw 2 cards, then discard 1 "Magnifistorm" card or 1 Quick-Play Spell, or, if you do not have any in your hand, discard your entire hand - if Duel.Draw(tp,2,REASON_EFFECT)>0 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - local handg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - if handg:IsExists(s.discardfilter,1,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local dg=handg:FilterSelect(tp,s.discardfilter,1,1,nil) - if #dg>0 then - Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) - end - else - Duel.SendtoGrave(handg,REASON_EFFECT|REASON_DISCARD) - end - end - elseif op==2 then - --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand - 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 -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 - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end \ No newline at end of file diff --git a/pre-release/c101302064.lua b/pre-release/c101302064.lua deleted file mode 100644 index a005e73d9d..0000000000 --- a/pre-release/c101302064.lua +++ /dev/null @@ -1,97 +0,0 @@ ---竜呼双搏 ---Draco Stand-off ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can add 1 "True Draco" or "True King" monster, or 1 "Dracoslayer" or "Dracoverlord" Pendulum 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_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Place 1 of your destroyed "True Draco" or "True King" monsters in your Spell & Trap Zone as a Continuous Spell - 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+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.pltg) - e2:SetOperation(s.plop) - e2:SetLabelObject(Group.CreateGroup()) - c:RegisterEffect(e2) - --Keep track of the destroyed monsters - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_SZONE) - e3:SetLabelObject(e2) - e3:SetOperation(s.regop) - c:RegisterEffect(e3) -end -s.listed_series={SET_TRUE_DRACO_KING,SET_DRACOSLAYER,SET_DRACOVERLORD} -function s.thfilter(c) - return ((c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsMonster()) or (c:IsSetCard({SET_DRACOSLAYER,SET_DRACOVERLORD}) and c:IsPendulumMonster())) 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 sc=g:Select(tp,1,1,nil):GetFirst() - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - end - end -end -function s.plfilter(c,e,tp) - return c:IsPreviousSetCard(SET_TRUE_DRACO_KING) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) - and c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsCanBeEffectTarget(e) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.plfilter,nil,e,tp) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetLabelObject():Filter(s.plfilter,nil,e,tp) - if chkc then return g:IsContains(chkc) and s.plfilter(chkc,e,tp) end - if chk==0 then return #g>0 end - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - --Treated as a Continuous Spell - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101302065.lua b/pre-release/c101302065.lua deleted file mode 100644 index 1b968a6e77..0000000000 --- a/pre-release/c101302065.lua +++ /dev/null @@ -1,85 +0,0 @@ ---幸せの多重奏 ---Solfachord Happiness ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_names={id} -s.listed_series={SET_SOLFACHORD} -function s.thfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) - and Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetScale)>=2 - local b2=not Duel.HasFlagEffect(tp,id+200) - and Pendulum.PlayerCanGainAdditionalPendulumSummon(tp,id) - local b3=not Duel.HasFlagEffect(tp,id+300) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,2,nil,e,tp) - if chk==0 then return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}) - e:SetLabel(op) - Duel.RegisterFlagEffect(tp,id+op*100,RESET_PHASE|PHASE_END,0,1) - if op==1 then - e:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - elseif op==2 then - e:SetCategory(0) - elseif op==3 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_PZONE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Discard 1 card, and if you do, add 2 "Solfachord" Pendulum Monsters with different Pendulum Scales from your Deck to your hand - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end - local dg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - local sdg=aux.SelectUnselectGroup(dg,e,tp,2,2,aux.dpcheck(Card.GetScale),1,tp,HINTMSG_ATOHAND) - if #sdg~=2 or Duel.SendtoHand(sdg,nil,REASON_EFFECT)~=2 then return end - Duel.ConfirmCards(1-tp,sdg:Match(Card.IsLocation,nil,LOCATION_HAND)) - Duel.ShuffleHand(tp) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==0 then return end - local hg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end - ct=math.min(ct,Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)+1) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local shg=hg:Select(tp,1,ct,nil) - if #shg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(shg,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --During your Main Phase this turn, you can conduct 1 Pendulum Summon of a "Solfachord" monster(s) in addition to your Pendulum Summon - Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_SOLFACHORD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,5),aux.Stringid(id,6),id) - elseif op==3 then - --Special Summon 2 "Solfachord" cards from your Pendulum Zone - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_PZONE,0,nil,e,tp) - if #g==2 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302066.lua b/pre-release/c101302066.lua deleted file mode 100644 index ec3cab8c80..0000000000 --- a/pre-release/c101302066.lua +++ /dev/null @@ -1,103 +0,0 @@ ---メガリス・アナスタシス ---Megalith Anastasis ---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) - --Add 2 "Megalith" monsters (1 Level 4 or lower and 1 Level 8 or higher) 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_SZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Discard()) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Activate 1 of these effects - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.effcon) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MEGALITH} -function s.thfilter(c) - return (c:IsLevelBelow(4) or c:IsLevelAbove(8)) and c:IsSetCard(SET_MEGALITH) and c:IsAbleToHand() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsLevelBelow,1,nil,4) and sg:IsExists(Card.IsLevelAbove,1,nil,8) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) - if #sg>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end -function s.effconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsRitualSummoned() and c:IsSetCard(SET_MEGALITH) and c:IsFaceup() -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.effconfilter,1,nil,tp) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsPlayerCanDraw(tp,2) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_RELEASE) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Draw 2 cards, then discard 1 card - if Duel.Draw(tp,2,REASON_EFFECT)==2 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) - end - elseif op==2 then - --Tribute 1 monster your opponent controls - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Release(g,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302067.lua b/pre-release/c101302067.lua deleted file mode 100644 index 05634eafef..0000000000 --- a/pre-release/c101302067.lua +++ /dev/null @@ -1,129 +0,0 @@ ---Yum☆Yum☆ヤミーズ ---Yum☆Yum☆Yummys ---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) - --Each time 2 or more "Yummy" monsters are Special Summoned to your field at the same time, gain 500 LP, and if you do, your opponent pays 500 LP - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(s.lpcon) - e1:SetOperation(s.lpop) - c:RegisterEffect(e1) - --Send 2 face-up monsters, including "Yummy★Snatchy", from the field to the GY, and if you do, Special Summon 1 "Yummy" Synchro Monster from your Extra Deck (this is treated as a Synchro Summon) - 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,id) - e2:SetCost(Cost.PayLP(500)) - e2:SetTarget(s.syncsptg) - e2:SetOperation(s.syncspop) - c:RegisterEffect(e2) - --Immediately after this effect resolves, Link Summon 1 "Yummy" Link Monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e3:SetCost(Cost.PayLP(100)) - e3:SetTarget(s.linksptg) - e3:SetOperation(s.linkspop) - c:RegisterEffect(e3) -end -s.listed_series={SET_YUMMY} -s.listed_names={30581601} --"Yummy★Snatchy" -function s.lpconfilter(c,tp) - return c:IsSetCard(SET_YUMMY) and c:IsFaceup() and c:IsControler(tp) -end -function s.lpcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.lpconfilter,2,nil,tp) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.IsChainSolving() then - Duel.Hint(HINT_CARD,0,id) - if Duel.Recover(tp,500,REASON_EFFECT)>0 then - Duel.PayLPCost(1-tp,500) - end - else - --Gain 500 LP, and if you do, your opponent pays 500 LP (at the end of the current Chain Link) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_SZONE) - e1:SetOperation(function(e,tp) - Duel.Hint(HINT_CARD,0,id) - if Duel.Recover(tp,500,REASON_EFFECT)>0 then - Duel.PayLPCost(1-tp,500) - end - end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) - c:RegisterEffect(e1) - --Reset "e1" at the end of the Chain Link - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetOperation(function() e1:Reset() end) - e2:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e2,tp) - end -end -function s.tgfilter(c,e) - return c:IsFaceup() and c:IsCanBeEffectTarget(e) and c:IsAbleToGrave() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsCode,1,nil,30581601) and Duel.IsExistingMatchingCard(s.syncfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg) -end -function s.syncfilter(c,e,tp,sg) - local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) - return #pg<=0 and c:IsSetCard(SET_YUMMY) and c:IsSynchroMonster() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) - and Duel.GetLocationCountFromEx(tp,tp,sg,c)>0 -end -function s.syncsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e) - if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TOGRAVE) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,2,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.syncspop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==2 and Duel.SendtoGrave(tg,REASON_EFFECT)==2 and tg:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.syncfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end - end -end -function s.linkfilter(c) - return c:IsSetCard(SET_YUMMY) and c:IsLinkSummonable() -end -function s.linksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.linkfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.linkspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.linkfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc then - Duel.LinkSummon(tp,sc) - end -end \ No newline at end of file diff --git a/pre-release/c101302068.lua b/pre-release/c101302068.lua deleted file mode 100644 index 3d101069b1..0000000000 --- a/pre-release/c101302068.lua +++ /dev/null @@ -1,90 +0,0 @@ ---鉄獣の撃鉄 ---Tri-Brigade Hammer ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects (but you can only use each effect of "Tri-Brigade Hammer" once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_names={id} -s.listed_series={SET_TRI_BRIGADE} -function s.thfilter(c) - return c:IsSetCard(SET_TRI_BRIGADE) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() -end -function s.spcostfilter(c) - return c:IsSetCard(SET_TRI_BRIGADE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) -end -function s.spfilter(c,e,tp,g,link) - return c:IsSetCard(SET_TRI_BRIGADE) and c:IsLinkMonster() and (not link or c:IsLink(link)) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) - and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - local lg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,g) - local _,min_link=lg:GetMinGroup(Card.GetLink) - local b2=not Duel.HasFlagEffect(tp,id+100) and min_link and min_link<=#rg - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - local link_map={} - for lc in lg:Iter() do - link_map[lc:GetLink()]=true - end - local rescon=function(sg) return link_map[#sg] end - local sg=aux.SelectUnselectGroup(rg,e,tp,min_link,#rg,rescon,1,tp,HINTMSG_REMOVE,rescon) - Duel.Remove(sg,POS_FACEUP,REASON_COST) - e:SetLabel(op,#sg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op,link=e:GetLabel() - if op==1 then - --Add 1 "Tri-Brigade" Spell/Trap from your Deck to your hand, except "Tri-Brigade Hammer" - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - elseif op==2 and link then - --Special Summon 1 "Tri-Brigade" Link Monster from your Extra Deck, with Link Rating equal to the number banished, ignoring its Summoning conditions - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil,link) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Beast, Beast-Warrior, or Winged Beast monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACES_BEAST_BWARRIOR_WINGB) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACES_BEAST_BWARRIOR_WINGB) end) - end -end \ No newline at end of file diff --git a/pre-release/c101302069.lua b/pre-release/c101302069.lua deleted file mode 100644 index efb0942d57..0000000000 --- a/pre-release/c101302069.lua +++ /dev/null @@ -1,93 +0,0 @@ ---ヘル・パニッシャー ---Infernal Punisher ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -function s.thfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_DINOSAUR) and c:IsAbleToHand() -end -function s.spfilter(c,e,tp) - return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.CheckReleaseGroupCost(tp,nil,1,false,aux.ReleaseCheckMMZ,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,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) - if op==2 then - local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,false,aux.ReleaseCheckMMZ,nil) - Duel.Release(g,REASON_COST) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local cost_skip=e:GetLabel()~=-100 - local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) - and (not cost_skip or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) - if chk==0 then e:SetLabel(0) return b1 or b2 end - local op=e:GetLabel() - if op==0 then - cost_skip=true - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - else - cost_skip=false - end - e:SetLabel(0) - Duel.SetTargetParam(op) - if op==1 then - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if op==1 then - --Add 1 WATER Dinosaur monster from your Deck to your hand, then if your opponent controls a monster, you can Special Summon the added monster - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end - elseif op==2 then - --Special Summon 1 Level 6 or higher FIRE monster from your hand, Deck, or GY, but if you Special Summoned a non-Fiend monster by this effect, negate its effects - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and not sc:IsRace(RACE_FIEND) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302070.lua b/pre-release/c101302070.lua deleted file mode 100644 index bb2bcb5fec..0000000000 --- a/pre-release/c101302070.lua +++ /dev/null @@ -1,78 +0,0 @@ ---融合募兵 ---Fusion Recruitment ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Add 1 of the Fusion Materials whose name is mentioned on the revealed monster from your Deck or GY to your hand, except the discarded card, then if you added a Normal Monster, you can add a second such monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.revealfilter(c,tp,cost_card) - return c:IsFusionMonster() and not c:IsPublic() and c.material - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,cost_card,c.material) -end -function s.thfilter(c,codes) - return c:IsCode(codes) and c:IsAbleToHand() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) - local cost_card=Duel.GetOperatedGroup():GetFirst() - e:SetLabelObject(cost_card) - cost_card:CreateEffectRelation(e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local reveal_card=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp,cost_card):GetFirst() - Duel.ConfirmCards(1-tp,reveal_card) - Duel.ShuffleExtra(tp) - e:SetLabel(table.unpack(reveal_card.material)) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local cost_chk=e:GetLabel()==-100 - e:SetLabel(0) - return cost_chk - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local codes={e:GetLabel()} - local cost_card=e:GetLabelObject() - local exc=cost_card:IsRelateToEffect(e) and cost_card or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,exc,codes):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) - if sc:IsType(TYPE_NORMAL) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,exc,codes) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,exc,codes) - if #g>0 then - Duel.BreakEffect() - 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 from the Extra Deck for the rest of this turn after this card resolves, except Fusion 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 c:IsLocation(LOCATION_EXTRA) and not c:IsFusionMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302071.lua b/pre-release/c101302071.lua deleted file mode 100644 index 07b59f8d33..0000000000 --- a/pre-release/c101302071.lua +++ /dev/null @@ -1,60 +0,0 @@ ---あないみじや玉の緒ふたつ ---Tragic Twin Threads ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Equip only to a monster you control that was Special Summoned from the Extra Deck - aux.AddEquipProcedure(c,0,aux.FilterBoolFunction(Card.IsSummonLocation,LOCATION_EXTRA)) - --Destroy it, also the equipped monster, and if you do, take damage equal to the total original ATK of the destroyed monsters, then inflict damage to your opponent equal to the damage you took - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCondition(s.descon) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) -end -function s.desconfilter(c,tp,atk) - return c:IsSummonPlayer(1-tp) and c:IsSummonLocation(LOCATION_EXTRA) and c:GetAttack()>atk -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and eg:IsExists(s.desconfilter,1,nil,tp,ec:GetAttack()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ec=e:GetHandler():GetEquipTarget() - local g=eg:Filter(s.desconfilter,nil,tp,ec:GetAttack()):Match(Card.IsCanBeEffectTarget,nil,e) - if chkc then return g:IsContains(chkc) end - if chk==0 then return #g>0 end - local tg=nil - if #g==1 then - tg=g - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - tg=g:Select(tp,1,1,nil) - end - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg+ec,2,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,tg:GetSum(Card.GetBaseAttack)) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local g=Group.FromCards(e:GetHandler():GetEquipTarget()) - if tc:IsRelateToEffect(e) then - g:AddCard(tc) - end - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - local dam=Duel.GetOperatedGroup():GetSum(Card.GetBaseAttack) - if dam==0 then return end - local val=Duel.Damage(tp,dam,REASON_EFFECT) - if val>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,val,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302072.lua b/pre-release/c101302072.lua deleted file mode 100644 index 8aedb5a596..0000000000 --- a/pre-release/c101302072.lua +++ /dev/null @@ -1,87 +0,0 @@ ---黙歯録 ---Apocaries ---scripted by Naim -local s,id=GetID() -local COUNTER_C=0x215 -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_C) - --When this card is activated: Place C Counters on this card equal to the number of cards your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(function(e,tp) e:GetHandler():AddCounter(COUNTER_C,Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)) end) - c:RegisterEffect(e1) - --Apply effects to a target based on the number of C Counters removed from this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.counter_place_list={COUNTER_C} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - if chk==0 then return ct>0 and Duel.IsCanAddCounter(tp,COUNTER_C,ct,c) end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,COUNTER_C,ct) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_C,1,REASON_COST) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - local b1=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_C,1,REASON_COST) - local b2=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_C,2,REASON_COST) and not tc:IsAttack(0) - local b3=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_C,3,REASON_COST) and tc:IsNegatableMonster() - local b4=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_C,4,REASON_COST) - local ct=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}, - {b3,aux.Stringid(id,4)}, - {b4,aux.Stringid(id,5)}) - Duel.RemoveCounter(tp,1,1,COUNTER_C,ct,REASON_COST) - e:SetLabel(ct) - if (ct==1 or ct==2) then - e:SetCategory(CATEGORY_ATKCHANGE) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,(ct==1 and -500 or -tc:GetAttack())) - elseif ct==3 then - e:SetCategory(CATEGORY_DISABLE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) - elseif ct==4 then - e:SetCategory(CATEGORY_DESTROY) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local ct=e:GetLabel() - local c=e:GetHandler() - if ct==1 and tc:IsFaceup() then - --It loses 500 ATK - tc:UpdateAttack(-500,nil,c) - elseif ct==2 and tc:IsFaceup() then - --Change its ATK to 0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - elseif ct==3 and tc:IsFaceup() then - --Negate its effects - tc:NegateEffects(c) - elseif ct==4 and tc:IsMonster() then - --Destroy it - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302074.lua b/pre-release/c101302074.lua deleted file mode 100644 index 759abfc62d..0000000000 --- a/pre-release/c101302074.lua +++ /dev/null @@ -1,96 +0,0 @@ ---終刻決壊 ---Doom-Z Destruction ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Equip this card to 1 "Doom-Z" Xyz Monster you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(aux.RemainFieldCost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) - --Equip 1 "Doom-Z" monster from your Deck to a monster on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) - e2:SetTarget(s.eqptg) - e2:SetOperation(s.eqpop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DOOM_Z} -function s.xyzfilter(c) - return c:IsSetCard(SET_DOOM_Z) and c:IsType(TYPE_XYZ) and c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then - --Your opponent cannot add cards from the Deck to the hand, except by drawing them - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_HAND) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(0,LOCATION_DECK) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - 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) - c:RegisterEffect(e2) - else - c:CancelToGrave(false) - end -end -function s.eqfilter(c,tp) - return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() and c:CheckUniqueOnField(tp) and not c:IsForbidden() -end -function s.eqptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function s.eqpop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if ec and Duel.Equip(tp,ec,tc) then - --Equip limit - local e1=Effect.CreateEffect(ec) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetValue(function(e,c) return c==tc end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - ec:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101302075.lua b/pre-release/c101302075.lua deleted file mode 100644 index 6f3afb2d90..0000000000 --- a/pre-release/c101302075.lua +++ /dev/null @@ -1,95 +0,0 @@ ---アルトメギア・ペリペティア-激動- ---Artmage Peripeteia -Turmoil- ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Return 1 "Artmage" monster you control to the hand/Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END+TIMING_STANDBY_PHASE) - e1:SetCost(s.cost) - e1:SetTarget(s.rthtetg) - e1:SetOperation(s.rthteop) - c:RegisterEffect(e1) - --Add 1 "Artmage" Spell from your GY or banishment to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetCost(s.cost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Checks to see if non-Fusion Monsters were Summoned from the Extra Deck - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) end) -end -s.listed_series={74733322} --"Artmage Academic Arcane Arts Acropolis" -s.listed_series={SET_ARTMAGE} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon from the Extra Deck the turn you activate this effect, except Fusion Monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.rthtefilter(c,tp) - return c:IsSetCard(SET_ARTMAGE) and (c:IsAbleToHand() or c:IsAbleToExtra()) - and c:IsFaceup() and (not tp or Duel.GetMZoneCount(tp,c)>0) -end -function s.rthtetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.rthtefilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) - 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,g,1,tp,0) -end -function s.rthteop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local g=Duel.SelectMatchingCard(tp,s.rthtefilter,tp,LOCATION_MZONE,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 - and g:GetFirst():IsLocation(LOCATION_HAND|LOCATION_EXTRA) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc:IsRelateToEffect(e) - and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - --Its effects are negated - tc:NegateEffects(e:GetHandler()) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)==74733322 -end -function s.thfilter(c) - return c:IsSetCard(SET_ARTMAGE) and c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302076.lua b/pre-release/c101302076.lua deleted file mode 100644 index 565395848d..0000000000 --- a/pre-release/c101302076.lua +++ /dev/null @@ -1,122 +0,0 @@ ---絢嵐たる権能 ---Magnifistorming Sovereign Tyranny ---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) - --Apply these effects in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Negate the effects 1 face-up card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Set this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,id) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.tdfilter(c,e) - return c:IsQuickPlaySpell() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and #g>=3 and g:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) - end - local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,0,tp,300) - Duel.SetPossibleOperationInfo(0,CATEGORY_DEFCHANGE,nil,0,tp,300) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local break_chk=false - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then - break_chk=true - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - if break_chk then Duel.BreakEffect() end - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) - --WIND monsters you control will gain 300 ATK/DEF 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:IsAttribute(ATTRIBUTE_WIND) end) - e1:SetValue(300) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - Duel.RegisterEffect(e2,tp) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c:IsControler(1-tp) and chkc:IsNegatable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --Negate its effects - tc:NegateEffects(e:GetHandler(),nil,true) - 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 - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end diff --git a/pre-release/c101302077.lua b/pre-release/c101302077.lua deleted file mode 100644 index 5397fa9375..0000000000 --- a/pre-release/c101302077.lua +++ /dev/null @@ -1,55 +0,0 @@ ---星辰の刺毒 ---Dragontail Sting ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Banish 1 monster and/or 1 Spell/Trap from your opponent's GY, then you can place 1 "Dragontail" card from your GY or banishment on the bottom of the Deck, except "Dragontail Sting", then draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_DRAGONTAIL} -s.listed_names={id} -function s.rmfilter(c,e) - return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) -end -function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsMonster,nil)<=1 and sg:FilterCount(Card.IsSpellTrap,nil)<=1 -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_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_GRAVE,nil,e) - local tg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_REMOVE) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,#tg,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) -end -function s.tdfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) - and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - Duel.BreakEffect() - if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302078.lua b/pre-release/c101302078.lua deleted file mode 100644 index 303c6d630b..0000000000 --- a/pre-release/c101302078.lua +++ /dev/null @@ -1,57 +0,0 @@ ---凶導の聖獣 ---Quadogmatika Beast ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Send to the GY 1 monster with an ATK equal or higher than the targeted monster's ATK, and if you do, Special Summon the targeted monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - 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.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_names={SET_DOGMATIKA} -function s.spfilter(c,e,tp,atk) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c:GetAttack()) -end -function s.tgfilter(c,atk) - return c:IsMonster() and (c:IsLocation(LOCATION_EXTRA) or c:IsSetCard(SET_DOGMATIKA)) - and c:IsAbleToGrave() and c:IsAttackAbove(atk) -end -function s.target(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.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc:GetAttack()):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --Until the end of your next turn after this card resolves, you cannot Special Summon from the Extra Deck - 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 c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302079.lua b/pre-release/c101302079.lua deleted file mode 100644 index 303efa3ca0..0000000000 --- a/pre-release/c101302079.lua +++ /dev/null @@ -1,69 +0,0 @@ ---命王の螺旋 ---Dominus Spiral ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If your opponent activated a monster effect in the hand or GY this turn, you can activate this card from your hand - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e0:SetCondition(function(e) return Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 end) - c:RegisterEffect(e0) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) - --Return 1 monster your opponent controls to the hand/Extra Deck, then if you have no Traps in your GY, they can Special Summon 1 monster from their GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) -end -function s.chainfilter(re,tp,cid) - return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) 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.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) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) - and not Duel.IsExistingMatchingCard(Card.IsTrap,tp,LOCATION_GRAVE,0,1,nil) - and Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,1-tp) - and Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(1-tp,s.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,1-tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,1-tp,1-tp,false,false,POS_FACEUP) - end - end - if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()==1 then - --If you activated this card from your hand, you cannot activate the effects of LIGHT and DARK monsters for the rest of this Duel - 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():IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) end) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c101302080.lua b/pre-release/c101302080.lua deleted file mode 100644 index 1968042bd9..0000000000 --- a/pre-release/c101302080.lua +++ /dev/null @@ -1,58 +0,0 @@ ---お菊さんの皿算用 ---Miss Okiku's Dishrithmetic ---scripted by pyrQ -local COUNTER_DISH=0x216 -local s,id=GetID() -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_DISH) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Place Dish Counters on this card equal to the Chain Link number of this effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_COUNTER,e:GetHandler(),Duel.GetCurrentChain(),tp,COUNTER_DISH) end) - e1:SetOperation(function(e) e:GetHandler():AddCounter(COUNTER_DISH,Duel.GetCurrentChain()) end) - c:RegisterEffect(e1) - --● 9 or less: Your opponent cannot target this card with card effects, also it cannot be destroyed by your opponent's card effects - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_SINGLE) - e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2a:SetRange(LOCATION_SZONE) - e2a:SetCondition(function(e) return e:GetHandler():GetCounter(COUNTER_DISH)<=9 end) - e2a:SetValue(aux.tgoval) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2b:SetValue(aux.indoval) - c:RegisterEffect(e2b) - --● 10 or more: Send this card to the GY - local e2c=Effect.CreateEffect(c) - e2c:SetType(EFFECT_TYPE_SINGLE) - e2c:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2c:SetCode(EFFECT_SELF_TOGRAVE) - e2c:SetRange(LOCATION_SZONE) - e2c:SetCondition(function(e) return e:GetHandler():GetCounter(COUNTER_DISH)>=10 end) - c:RegisterEffect(e2c) - --Send the top 10 cards of your Deck to the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) and rp==PLAYER_NONE end) - e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,10) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,10) end) - e3:SetOperation(function(e,tp) Duel.DiscardDeck(tp,10,REASON_EFFECT) end) - c:RegisterEffect(e3) -end -s.counter_place_list={COUNTER_DISH} \ No newline at end of file diff --git a/pre-release/c101302101.lua b/pre-release/c101302101.lua deleted file mode 100644 index aef09c86fb..0000000000 --- a/pre-release/c101302101.lua +++ /dev/null @@ -1,78 +0,0 @@ ---DDランス・ソルジャー ---D/D Lance Soldier ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.lvtg) - e1:SetOperation(s.lvop) - c:RegisterEffect(e1) - --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DARK_CONTRACT} -function s.lvfilter(c) - return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) - if ct==0 then return end - local lv=Duel.AnnounceLevel(tp,1,ct) - if lv then - tc:UpdateLevel(lv,nil,e:GetHandler()) - end -end -function s.desfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) - and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302102.lua b/pre-release/c101302102.lua deleted file mode 100644 index e331afd54a..0000000000 --- a/pre-release/c101302102.lua +++ /dev/null @@ -1,102 +0,0 @@ ---DDディフェンス・ソルジャー ---D/D Defense Soldier ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DDD} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.limcostfilter(c) - return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) - local b2=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - elseif op==2 then - e:SetCategory(0) - e:SetProperty(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - local op=e:GetLabel() - if op==1 then - --Special Summon 1 "D/D" card in your Pendulum Zone - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetCondition(s.actcon) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.actcon(e) - local tc=Duel.GetAttacker() - return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) -end -function s.thfilter(c) - return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101302103.lua b/pre-release/c101302103.lua deleted file mode 100644 index 98f9147c64..0000000000 --- a/pre-release/c101302103.lua +++ /dev/null @@ -1,104 +0,0 @@ ---DDD零死王ゼロ・マキナ ---D/D/D Zero Demise King Zero Machinex ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Check if it was activated this turn - local e0=Effect.CreateEffect(c) - e0:SetDescription(1160) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetRange(LOCATION_HAND) - e0:SetCost(s.actreg) - c:RegisterEffect(e0) - --Place 1 "Dark Contract" Continuous Spell/Trap on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_EXTRA) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Place this card in the Pendulum Zone if it's destroyed - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e3:SetOperation(s.penop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_CONTRACT,SET_DDD} -s.listed_names={id} -function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.plfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function s.spconfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) - and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.penop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua deleted file mode 100644 index d5735c5b62..0000000000 --- a/pre-release/c101302104.lua +++ /dev/null @@ -1,171 +0,0 @@ ---DDDD偉次元王アーク・クライシス ---D/D/D/D Great Dimension King Arc Crisis ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) - Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) - c:AddMustBeFusionSummoned() - --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY - Fusion.AddContactProc(c,s.contactfil,s.contactop,false,nil,1) - --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetCondition(s.regcon) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the effects of all face-up monsters your opponent currently controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Can attack all monsters your opponent controls once each - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetValue(1) - c:RegisterEffect(e3) - --Place this card in your Pendulum Zone - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e4:SetOperation(s.penop) - c:RegisterEffect(e4) -end -s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} -s.miracle_synchro_fusion=true -function s.matfilter(typ) - return function(c,fc,sumtype,tp) - return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) - end -end -function s.contactfil(tp) - local loc=LOCATION_ONFIELD|LOCATION_GRAVE - if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end - return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) -end -function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) -end -function s.regcon(e) - local c=e:GetHandler() - return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --Prevent another Fusion Summon or Special Summon by its alternate procedure of "D/D/D/D Great Dimension King Arc Crisis" that turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.desfilter(c,e,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) -end -function s.spfilter(c,e,tp,dc) - if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end - local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.rescon(mmz_ct,linkmz_ct) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct - and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if tg==0 then return end - local ct=Duel.Destroy(tg,REASON_EFFECT) - if ct==0 then return end - local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) - local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) - local ft=math.min(mmz_ct+emz_ct,ct) - if ft<=0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) - if #sg==0 then return end - local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) - local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) - local priority_0,priority_1 - if linkmz_ct0 - and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua deleted file mode 100644 index 72d419b6e3..0000000000 --- a/pre-release/c101302106.lua +++ /dev/null @@ -1,85 +0,0 @@ ---DDD智慧王ソロモン ---D/D/D Wisdom King Solomon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 "D/D" monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) - --Add 1 "D/D" card from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.DetachFromSelf(1)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --A targeted "D/D" Effect Monster gains an effect until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD} -function s.thfilter(c) - return c:IsSetCard(SET_DD) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.tgfilter(c) - return c:IsSetCard(SET_DD) and c:IsType(TYPE_EFFECT) and c:IsFaceup() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --Inflict damage to your opponent equal to the original ATK of a monster this card destroys a monster by battle - local e1=Effect.CreateEffect(tc) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdcon) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/pre-release/c101302107.lua b/pre-release/c101302107.lua deleted file mode 100644 index d33e3a2283..0000000000 --- a/pre-release/c101302107.lua +++ /dev/null @@ -1,70 +0,0 @@ ---DDD天空王ゼウス・ラグナロク ---D/D/D Sky King Zeus Ragnarok ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ "D/D" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) - --Destroy 1 "D/D" or "Dark Contract" card you control, also, you can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Negate the activation of monster effect your opponent activates in the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DARK_CONTRACT} -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return not Duel.HasFlagEffect(tp,id) --pending rulings on whether you can use this effect if you've already performed an extra Pendulum Summon or not - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_DD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,2),aux.Stringid(id,3),id) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc==LOCATION_HAND - and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end -function s.negcostfilter(c) - return (c:IsSetCard(SET_DARK_CONTRACT) or (c:IsSetCard(SET_DD) and c:IsMonster())) and c:IsAbleToRemoveAsCost() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_DARK_CONTRACT) and sg:IsExists(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,1,nil) -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.negcostfilter,tp,LOCATION_GRAVE,0,nil) - if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) -end \ No newline at end of file diff --git a/pre-release/c101302108.lua b/pre-release/c101302108.lua deleted file mode 100644 index f860d7103f..0000000000 --- a/pre-release/c101302108.lua +++ /dev/null @@ -1,81 +0,0 @@ ---零王の契約書 ---Dark Contract with the Zero King ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Destroy 1 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Take 1000 damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE|PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_DD} -function s.desfilter(c,tp) - return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon for the rest of this turn, except "D/D" monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_DD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c101302109.lua b/pre-release/c101302109.lua deleted file mode 100644 index a30b3256ec..0000000000 --- a/pre-release/c101302109.lua +++ /dev/null @@ -1,95 +0,0 @@ ---異次元の契約書 ---Dark Contract with the Different Dimension ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Take 1000 damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --Banish 1 card in your opponent's field or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCost(s.rmcost) - e2:SetTarget(s.rmtg) - e2:SetOperation(s.rmop) - c:RegisterEffect(e2) - --Gain 500 LP - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_RECOVER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.lptg) - e3:SetOperation(s.lpop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_CONTRACT} -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function s.rmcostfilter(c) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() -end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then - Duel.BreakEffect() - Duel.Recover(p,500,REASON_EFFECT) - end -end \ No newline at end of file From 661fd1c7d317b11bec1b66fb08c5f8e07a4fb0bc Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 30 Jul 2025 23:45:43 +0300 Subject: [PATCH 2/4] Add files via upload --- pre-release/c100201001.lua | 38 +++++++++++++ pre-release/c100201002.lua | 31 ++++++++++ pre-release/c100201003.lua | 56 ++++++++++++++++++ pre-release/c100348001.lua | 47 +++++++++++++++ pre-release/c100348002.lua | 48 ++++++++++++++++ pre-release/c100348005.lua | 88 ++++++++++++++++++++++++++++ pre-release/c100348032.lua | 114 +++++++++++++++++++++++++++++++++++++ pre-release/c100443001.lua | 78 +++++++++++++++++++++++++ pre-release/c100443003.lua | 80 ++++++++++++++++++++++++++ pre-release/c100443005.lua | 39 +++++++++++++ pre-release/c100443007.lua | 91 +++++++++++++++++++++++++++++ pre-release/c100443010.lua | 67 ++++++++++++++++++++++ pre-release/c100443101.lua | 101 ++++++++++++++++++++++++++++++++ pre-release/c100443102.lua | 62 ++++++++++++++++++++ pre-release/c100443103.lua | 66 +++++++++++++++++++++ pre-release/c100443104.lua | 76 +++++++++++++++++++++++++ pre-release/c100443105.lua | 37 ++++++++++++ pre-release/c100444101.lua | 19 +++++++ pre-release/c100444102.lua | 31 ++++++++++ pre-release/c100446001.lua | 82 ++++++++++++++++++++++++++ pre-release/c100446002.lua | 78 +++++++++++++++++++++++++ pre-release/c100446003.lua | 84 +++++++++++++++++++++++++++ pre-release/c100446004.lua | 75 ++++++++++++++++++++++++ pre-release/c100446005.lua | 69 ++++++++++++++++++++++ pre-release/c100446006.lua | 91 +++++++++++++++++++++++++++++ pre-release/c100446007.lua | 87 ++++++++++++++++++++++++++++ pre-release/c100446009.lua | 95 +++++++++++++++++++++++++++++++ pre-release/c100446010.lua | 46 +++++++++++++++ pre-release/c100446011.lua | 41 +++++++++++++ 29 files changed, 1917 insertions(+) create mode 100644 pre-release/c100201001.lua create mode 100644 pre-release/c100201002.lua create mode 100644 pre-release/c100201003.lua create mode 100644 pre-release/c100348001.lua create mode 100644 pre-release/c100348002.lua create mode 100644 pre-release/c100348005.lua create mode 100644 pre-release/c100348032.lua create mode 100644 pre-release/c100443001.lua create mode 100644 pre-release/c100443003.lua create mode 100644 pre-release/c100443005.lua create mode 100644 pre-release/c100443007.lua create mode 100644 pre-release/c100443010.lua create mode 100644 pre-release/c100443101.lua create mode 100644 pre-release/c100443102.lua create mode 100644 pre-release/c100443103.lua create mode 100644 pre-release/c100443104.lua create mode 100644 pre-release/c100443105.lua create mode 100644 pre-release/c100444101.lua create mode 100644 pre-release/c100444102.lua create mode 100644 pre-release/c100446001.lua create mode 100644 pre-release/c100446002.lua create mode 100644 pre-release/c100446003.lua create mode 100644 pre-release/c100446004.lua create mode 100644 pre-release/c100446005.lua create mode 100644 pre-release/c100446006.lua create mode 100644 pre-release/c100446007.lua create mode 100644 pre-release/c100446009.lua create mode 100644 pre-release/c100446010.lua create mode 100644 pre-release/c100446011.lua diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua new file mode 100644 index 0000000000..3a49209cce --- /dev/null +++ b/pre-release/c100201001.lua @@ -0,0 +1,38 @@ +--契約を結びし竜の戦士 +--Dragonic Warrior +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Discard(s.spcostfilter)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.spcostfilter(c,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua new file mode 100644 index 0000000000..9b0c446078 --- /dev/null +++ b/pre-release/c100201002.lua @@ -0,0 +1,31 @@ +--アイン・ロイド +--Einroid +local s,id=GetID() +function s.initial_effect(c) + --Send 2 Level 4 or lower Machine monsters from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) +end +function s.tgfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,2,2,nil) + if #g==2 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua new file mode 100644 index 0000000000..35f72f4627 --- /dev/null +++ b/pre-release/c100201003.lua @@ -0,0 +1,56 @@ +--妖魔ヌリカベ +--Nurikabe +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCondition(aux.exccon) + e1:SetCost(Cost.PayLP(1000)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + for sc in Group.FromCards(c,tc):Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(c) + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + sc:RegisterEffect(e1,true) + end + end + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100348001.lua b/pre-release/c100348001.lua new file mode 100644 index 0000000000..dd8bebde38 --- /dev/null +++ b/pre-release/c100348001.lua @@ -0,0 +1,47 @@ +--フルスピード・ウォリアー +--Fullspeed Warrior +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Junk Synchron" or 1 Spell/Trap that mentions "Junk Warrior" from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Monsters you control that mention "Junk Warrior", and Synchro Monsters you control with "Warrior" in their original names, gain 900 ATK during your Battle Phase only + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetCondition(function(e) return Duel.IsBattlePhase() and Duel.IsTurnPlayer(e:GetHandlerPlayer()) end) + e2:SetTarget(function(e,c) return c:ListsCode(CARD_JUNK_WARRIOR) or (c:IsType(TYPE_SYNCHRO) and c:IsOriginalSetCard(SET_WARRIOR)) end) + e2:SetValue(900) + c:RegisterEffect(e2) +end +s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR} +s.listed_series={SET_WARRIOR} +function s.thfilter(c) + return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsSpellTrap() and c:ListsCode(CARD_JUNK_WARRIOR))) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c100348002.lua b/pre-release/c100348002.lua new file mode 100644 index 0000000000..d9f0f2da51 --- /dev/null +++ b/pre-release/c100348002.lua @@ -0,0 +1,48 @@ +--アンカーボルト・ヘッジホッグ +--Anchorbolt Hedgehog +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card in Defense Position + 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_GRAVE) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_JUNK_WARRIOR,id} +function s.spconfilter(c) + return (c:IsCode(CARD_JUNK_WARRIOR) or c:ListsCode(CARD_JUNK_WARRIOR)) and not c:IsCode(id) +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,POS_FACEUP_DEFENSE) 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_DEFENSE) + 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,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:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100348005.lua b/pre-release/c100348005.lua new file mode 100644 index 0000000000..23e979b7a2 --- /dev/null +++ b/pre-release/c100348005.lua @@ -0,0 +1,88 @@ +--シンクロ・フェローズ +--Synchro Fellows +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Junk Synchron", and 1 monster that mentions "Junk Warrior" or "Stardust Dragon", from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Decrease the Level of 1 Synchro Monster you control by 1 + 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_GRAVE) + e2:SetCondition(function(e,tp) return Duel.IsPlayerCanAdditionalSummon(tp) end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON} +s.listed_series={SET_SYNCHRON} +function s.thfilter(c) + return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsMonster() and c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON))) and c:IsAbleToHand() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsCode,1,nil,CARD_JUNK_SYNCHRON) and sg:IsExists(Card.ListsCode,1,nil,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end +end +function s.lvfilter(c) + return c:IsType(TYPE_SYNCHRO) and c:HasLevel() and c:IsLevelAbove(2) and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsPlayerCanSummon(tp) + and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelAbove(2) and not tc:IsImmuneToEffect(e) then + --Decrease its Level by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(-1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + Duel.BreakEffect() + --You can Normal Summon 1 "Synchron" monster during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYNCHRON)) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100348032.lua b/pre-release/c100348032.lua new file mode 100644 index 0000000000..8af1adf8f5 --- /dev/null +++ b/pre-release/c100348032.lua @@ -0,0 +1,114 @@ +--ジャンク・ウォリアー・エクストリーム +--Junk Warrior Extreme +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: "Junk Synchron" + 1+ non-Tuner monsters + Synchro.AddProcedure(c,s.tunerfilter,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon as many Level 2 or lower monsters from your GY as possible + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.gysptg) + e1:SetOperation(s.gyspop) + c:RegisterEffect(e1) + --Special Summon 1 "Junk" Synchro Monster from your Extra Deck (this is treated as a Synchro Summon) + 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:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.bdocon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.exsptg) + e2:SetOperation(s.exspop) + c:RegisterEffect(e2) +end +s.material={CARD_JUNK_SYNCHRON} +s.listed_names={CARD_JUNK_SYNCHRON} +s.listed_series={SET_JUNK} +s.material_setcode=SET_SYNCHRON +function s.tunerfilter(c,lc,stype,tp) + return c:IsSummonCode(lc,stype,tp,CARD_JUNK_SYNCHRON) or c:IsHasEffect(20932152) +end +function s.gyspfilter(c,e,tp) + return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft>0 then + local g=Duel.GetMatchingGroup(s.gyspfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + ft=math.min(ft,#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + local og=Duel.GetOperatedGroup() + for sc in og:Iter() do + --They cannot activate their effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3302) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + end + end + --You can only Special Summon once 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:SetTarget(function(e,c,tp) return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)-e:GetLabel()>=1 end) + e1:SetLabel(Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_LEFT_SPSUMMON_COUNT) + e2:SetValue(s.countval) + Duel.RegisterEffect(e2,tp) +end +function s.countval(e,re,tp) + local label=e:GetLabel() + local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON) + if sp-label>=1 then + return 0 + else + return 1-sp+label + end +end +function s.exspfilter(c,e,tp,mc) + local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) + return #pg<=0 and c:IsSetCard(SET_JUNK) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.exsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.exspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end +end \ No newline at end of file diff --git a/pre-release/c100443001.lua b/pre-release/c100443001.lua new file mode 100644 index 0000000000..963cbfcef7 --- /dev/null +++ b/pre-release/c100443001.lua @@ -0,0 +1,78 @@ +--恋する乙女 +--Maiden in Love +--scripted by Naim +local s,id=GetID() +local COUNTER_MAIDEN=0x1090 +function s.initial_effect(c) + --Monsters your opponent controls that can attack must attack this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_MUST_ATTACK) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetRange(LOCATION_MZONE) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) + e2:SetValue(function(e,c) return c==e:GetHandler() end) + c:RegisterEffect(e2) + --Cannot be destroyed by battle + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(1) + c:RegisterEffect(e3) + --Activate 1 of these effects at the end of the Damage Step, if this card battled an opponent's monster + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_DAMAGE_STEP_END) + e4:SetCondition(s.effcon) + e4:SetTarget(s.efftg) + e4:SetOperation(s.effop) + c:RegisterEffect(e4) +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) +end +function s.controlfilter(c) + return c:HasCounter(COUNTER_MAIDEN) and c:IsControlerCanBeChanged() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_MAIDEN,1) + local b2=Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil) + local c=e:GetHandler() + if chk==0 then return c:IsLocation(LOCATION_MZONE) and c:IsRelateToBattle() and (b1 or b2) end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_COUNTER) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_MAIDEN) + elseif op==2 then + e:SetCategory(CATEGORY_CONTROL) + local g=Duel.GetMatchingGroup(s.controlfilter,tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Place 1 Maiden Counter on 1 face-up monster your opponent controls. + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) + local sc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_MAIDEN,1):GetFirst() + if sc then + sc:AddCounter(COUNTER_MAIDEN,1) + end + elseif op==2 then + --Take control of 1 opponent's monster with a Maiden Counter. + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local sc=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.GetControl(sc,tp) + end + end +end \ No newline at end of file diff --git a/pre-release/c100443003.lua b/pre-release/c100443003.lua new file mode 100644 index 0000000000..b1dacd544f --- /dev/null +++ b/pre-release/c100443003.lua @@ -0,0 +1,80 @@ +--ユーカリ・モール +--Eucalyptus Mole +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Beast monster from your Deck in face-down Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.fdsptg) + e1:SetOperation(s.fdspop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Special Summon 1 "Koala" monster from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.koalasptg) + e3:SetOperation(s.koalaspop) + c:RegisterEffect(e3) +end +s.listed_series={SET_KOALA} +function s.fdspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) +end +function s.fdsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.fdspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,tp,POS_FACEUP_DEFENSE) +end +function s.fdspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.fdspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then + Duel.ConfirmCards(1-tp,g) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsAttackPos() then + Duel.BreakEffect() + Duel.ChangePosition(c,POS_FACEUP_DEFENSE) + end + end +end +function s.koalaspfilter(c,e,tp) + return c:IsSetCard(SET_KOALA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.koalasptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.koalaspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.koalaspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.koalaspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) + --Non-Effect Beast monsters you control gain ATK equal to their own original DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsNonEffectMonster() and c:IsRace(RACE_BEAST) end) + e1:SetValue(function(e,c) return c:GetBaseDefense() end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100443005.lua b/pre-release/c100443005.lua new file mode 100644 index 0000000000..8a657b806a --- /dev/null +++ b/pre-release/c100443005.lua @@ -0,0 +1,39 @@ +--幻魔の扉 +--Illusion Gate +local s,id=GetID() +function s.initial_effect(c) + --Destroy as many monsters your opponent controls as possible, then you can Special Summon 1 monster from your opponent's GY to your field, ignoring its Summoning conditions + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(Cost.PayLP(1/2)) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return not Duel.HasFlagEffect(tp,id) and #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,0,0,1) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100443007.lua b/pre-release/c100443007.lua new file mode 100644 index 0000000000..0ffd8ecc80 --- /dev/null +++ b/pre-release/c100443007.lua @@ -0,0 +1,91 @@ +--プリマの光 +--Prima Light +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 Warrior or Fairy "Cyber" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CYBER} +function s.tribfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.nsfilter(c) + return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.CheckReleaseGroup(tp,s.tribfilter,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) + local b2=Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Tribute 1 EARTH Warrior monster, and if you do, Special Summon 1 LIGHT Warrior monster from your hand or Deck + local rg=Duel.SelectReleaseGroup(tp,s.tribfilter,1,1,nil,tp) + if #rg>0 and Duel.Release(rg,REASON_EFFECT)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + elseif op==2 then + --Immediately after this effect resolves, Normal Summon 1 Warrior monster from your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end + end +end +function s.thfilter(c) + return c:IsRace(RACE_WARRIOR|RACE_FAIRY) and c:IsSetCard(SET_CYBER) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c100443010.lua b/pre-release/c100443010.lua new file mode 100644 index 0000000000..c5890ee4ea --- /dev/null +++ b/pre-release/c100443010.lua @@ -0,0 +1,67 @@ +--魂の結束-ソウル・ユニオン +--Soul Union +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.atkfilter(c) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:HasNonZeroAttack() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + e:SetLabelObject(tc) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.fusconfilter(c) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsFaceup() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg~=2 then return end + local fc=e:GetLabelObject() + local gc=(tg-fc):GetFirst() + if fc:IsFaceup() and not fc:IsImmuneToEffect(e) then + --That monster on the field gains ATK equal to the ATK of that other monster in the GY until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(gc:GetAttack()) + e1:SetReset(RESETS_STANDARD_PHASE_END) + fc:RegisterEffect(e1) + if not Duel.IsExistingMatchingCard(s.fusconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) then return end + local params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),matfilter=function(c) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() end,extrafil=s.fextra,extraop=Fusion.BanishMaterial} + if Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Fusion.SummonEffOP(params)(e,tp,eg,ep,ev,re,r,rp) + end + end +end +function s.fextra(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end \ No newline at end of file diff --git a/pre-release/c100443101.lua b/pre-release/c100443101.lua new file mode 100644 index 0000000000..b4a1065c52 --- /dev/null +++ b/pre-release/c100443101.lua @@ -0,0 +1,101 @@ +--超電導戦士 リニア・マグナム± +--Conduction Warrior Linear Magnum ± +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must first be Special Summoned (from your hand) by sending 2 "Magnet Warrior" monsters whose original Level is 4 or lower from your hand, Deck, and/or face-up field to the GY + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --Gains ATK equal to half of the ATK 1 other EARTH monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,1}) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Add this card to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,2}) + e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_DESTROY) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MAGNET_WARRIOR} +function s.spconfilter(c) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsMonster() and c:GetOriginalLevel()<=4 + and c:IsAbleToGraveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.SendtoGrave(g,REASON_COST) + g:DeleteGroup() +end +function s.atkfilter(c) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:HasNonZeroAttack() +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,tc:GetAttack()//2) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local c=e:GetHandler() + if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then + --Gains ATK equal to half of that monster's ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(tc:GetAttack()//2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100443102.lua b/pre-release/c100443102.lua new file mode 100644 index 0000000000..6ed9b65020 --- /dev/null +++ b/pre-release/c100443102.lua @@ -0,0 +1,62 @@ +--錬金釜-カオス・ディスティル +--Chaos Distill +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Any card sent to your GY is banished instead + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) + e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_ALL,0) + e1:SetValue(LOCATION_REMOVED) + e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) + c:RegisterEffect(e1) + --Activate 1 of these effects + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MACRO_COSMOS,id} +function s.macrofilter(c) + return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.monsterfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) + local c=e:GetHandler() + local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==2 then + Duel.Remove(c,POS_FACEUP,REASON_COST) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua new file mode 100644 index 0000000000..dfaf24888f --- /dev/null +++ b/pre-release/c100443103.lua @@ -0,0 +1,66 @@ +--ヒーローズルール1 ファイブ・フリーダムス +--Hero's Rule 1: Five Freedoms +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish up to 5 cards from the GYs + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.rmvtg) + e1:SetOperation(s.rmvop) + c:RegisterEffect(e1) + --Special Summon 1 of your banished "Elemental HERO" monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.rmvfilter(c) + return c:IsAbleToRemove() and aux.SpElimFilter(c) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua new file mode 100644 index 0000000000..6e4745de52 --- /dev/null +++ b/pre-release/c100443104.lua @@ -0,0 +1,76 @@ +--デーモンズ・マタドール +--Archfiend Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Cannot be destroyed by battle, also you take no battle damage from battles involving this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + c:RegisterEffect(e3) + --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e4:SetCode(EVENT_BATTLED) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_names={100443105,id} --"Ritual of the Matador" +s.listed_series={SET_ARCHFIEND} +function s.thfilter(c) + return c:IsSetCard(SET_ARCHFIEND) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil) + if #g==2 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + --This card cannot attack for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return bc and bc:IsRelateToBattle() end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,1000,REASON_EFFECT) + end +end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua new file mode 100644 index 0000000000..61c24806c2 --- /dev/null +++ b/pre-release/c100443105.lua @@ -0,0 +1,37 @@ +--マタドール降臨の儀式 ダーク・パセオ +--Ritual of the Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon "Archfiend Matador" + Ritual.AddProcGreaterCode(c,6,nil,100443104) + --Special Summon 1 non-Ritual "Archfiend" monster from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfBanish) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={100443104} --"Archfiend Matador" +s.listed_series={SET_ARCHFIEND} +function s.spfilter(c,e,tp) + return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100444101.lua b/pre-release/c100444101.lua new file mode 100644 index 0000000000..021a1608f2 --- /dev/null +++ b/pre-release/c100444101.lua @@ -0,0 +1,19 @@ +--Japanese name +--WINDS OF VICTORY +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + aux.AddEquipProcedure(c) + --The equipped monster gains 300 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(300) + c:RegisterEffect(e1) + --Also it becomes WIND + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_EQUIP) + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(ATTRIBUTE_WIND) + c:RegisterEffect(e2) +end \ No newline at end of file diff --git a/pre-release/c100444102.lua b/pre-release/c100444102.lua new file mode 100644 index 0000000000..af31d4360c --- /dev/null +++ b/pre-release/c100444102.lua @@ -0,0 +1,31 @@ +--毒サソリの罠毒 +--Trap of the Poisonous Scorpion +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Destroy an opponent's attacking monster, then inflict 300 damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_ATTACK_ANNOUNCE) + e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc=Duel.GetAttacker() + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + if bc:IsRelateToEffect(e) and bc:IsMonster() and Duel.Destroy(bc,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,300,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100446001.lua b/pre-release/c100446001.lua new file mode 100644 index 0000000000..1b1d013e4b --- /dev/null +++ b/pre-release/c100446001.lua @@ -0,0 +1,82 @@ +--見えざる手イブエル +--Hecatoncheire Ibel +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Shuffle this card into the Deck, then Special Summon 1 "Hecatoncheire" monster from your Deck in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) + --Special Summon 1 "Hecatoncheire" monster from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECATONCHEIRE} +s.listed_names={id} +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.deckspfilter(c,e,tp) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) +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/c100446002.lua b/pre-release/c100446002.lua new file mode 100644 index 0000000000..c65cec30f4 --- /dev/null +++ b/pre-release/c100446002.lua @@ -0,0 +1,78 @@ +--見えざる手ヤドエル +--Hecatoncheire Yadel +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Shuffle this card into the Deck, then add 1 "Hecatoncheire" Spell/Trap from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Set 1 "Hecatoncheire" Spell/Trap from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECATONCHEIRE} +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.thfilter(c) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsSpellTrap() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #hg>0 then + Duel.BreakEffect() + Duel.SendtoHand(hg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,hg) + end + end +end +function s.setfilter(c) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.setfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local tc=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SSet(tp,tc) + end +end \ No newline at end of file diff --git a/pre-release/c100446003.lua b/pre-release/c100446003.lua new file mode 100644 index 0000000000..f950589805 --- /dev/null +++ b/pre-release/c100446003.lua @@ -0,0 +1,84 @@ +--見えざる手ゴッドス +--Hecatoncheire Goddus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_HAND) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon to your field 1 monster from your opponent's GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +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.spfilter(c,e,tp) + return 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(1-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,0,LOCATION_GRAVE,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,0,LOCATION_GRAVE,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) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + tc:RegisterEffect(e1,true) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100446004.lua b/pre-release/c100446004.lua new file mode 100644 index 0000000000..77e641fe1b --- /dev/null +++ b/pre-release/c100446004.lua @@ -0,0 +1,75 @@ +--見えざる手ガイガス +--Hecatoncheire Gygas +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_HAND) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Excavate the top 3 cards of your opponent's Deck and you can Special Summon 1 excavated monster + 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) +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +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.spfilter(c,e,tp) + return 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.GetFieldGroupCount(tp,0,LOCATION_DECK)>=3 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end + Duel.ConfirmDecktop(1-tp,3) + local g=Duel.GetDecktopGroup(1-tp,3) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:IsExists(s.spfilter,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=g:FilterSelect(tp,s.spfilter,1,1,nil,e,tp):GetFirst() + if sc then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + end + Duel.ShuffleDeck(1-tp) +end \ No newline at end of file diff --git a/pre-release/c100446005.lua b/pre-release/c100446005.lua new file mode 100644 index 0000000000..0063d0045b --- /dev/null +++ b/pre-release/c100446005.lua @@ -0,0 +1,69 @@ +--見えざる手ブレアス +--Hecatoncheire Breus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_HAND) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Look at 1 random card in your opponent's hand, and if it is a monster, you can Special Summon it to your field + 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) +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +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.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) + if #g==0 then return end + local sc=g:RandomSelect(tp,1):GetFirst() + Duel.ConfirmCards(tp,sc) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + Duel.ShuffleHand(1-tp) +end \ No newline at end of file diff --git a/pre-release/c100446006.lua b/pre-release/c100446006.lua new file mode 100644 index 0000000000..94bc5265a5 --- /dev/null +++ b/pre-release/c100446006.lua @@ -0,0 +1,91 @@ +--見えざる神ジャウザー +--Hecatoncheire Jawza +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Hecatoncheire" monster + 1 Illusion monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECATONCHEIRE),aux.FilterBoolFunctionEx(Card.IsRace,RACE_ILLUSION)) + c:AddMustFirstBeFusionSummoned() + --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 Illusion monster and 1 face-up monster you control owned by your opponent + 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) + --Add 1 "Hecatoncheire" card from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card battles a monster, neither can be destroyed by that battle + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetTarget(s.indestg) + e2:SetValue(1) + c:RegisterEffect(e2) +end +s.listed_series={SET_HECATONCHEIRE} +s.material_setcode=SET_HECATONCHEIRE +function s.selfspcostfilter(c,tp,fc) + return (c:IsRace(RACE_ILLUSION) or (c:IsFaceup() and c:IsOwner(1-tp))) and c:IsReleasable() + and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) +end +function s.rescon(sg,e,tp,mg) + return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 + and sg:IsExists(Card.IsRace,1,nil,RACE_ILLUSION) and sg:IsExists(aux.FaceupFilter(Card.IsOwner,1-tp),1,nil) +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,0,nil,tp,c) + 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_MZONE,0,nil,tp,c) + 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.thfilter(c) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end \ No newline at end of file diff --git a/pre-release/c100446007.lua b/pre-release/c100446007.lua new file mode 100644 index 0000000000..adc21e2fe0 --- /dev/null +++ b/pre-release/c100446007.lua @@ -0,0 +1,87 @@ +--見えざる神ゼノ +--Hecatoncheire Xeno +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 "Hecatoncheire" monsters + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECATONCHEIRE),3) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Look at 2 random face-down cards in your opponent's Extra Deck, and if you do, you can Special Summon 1 of them to your field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Take control of any number of monsters your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_CONTROL) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.ctrlcon) + e3:SetTarget(s.ctrltg) + e3:SetOperation(s.ctrlop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECATONCHEIRE} +s.material_setcode=SET_HECATONCHEIRE +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil)>=2 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spfilter(c,e,tp) + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local exg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil) + if #exg==0 then return end + local g=exg:RandomSelect(tp,2) + Duel.ConfirmCards(tp,g) + if g:IsExists(s.spfilter,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:FilterSelect(tp,s.spfilter,1,1,nil,e,tp) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + Duel.ShuffleExtra(1-tp) +end +function s.ctrlcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return rp==1-tp and c:IsFusionSummoned() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) +end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,ft,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100446009.lua b/pre-release/c100446009.lua new file mode 100644 index 0000000000..e370882807 --- /dev/null +++ b/pre-release/c100446009.lua @@ -0,0 +1,95 @@ +--見えざる幽獄 +--Hecatoncheire Tartarus +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects (but you can only use each effect of "Hecatoncheire Tartarus" once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --If you use a face-up monster(s) you control owned by your opponent, you can treat it as a "Hecatoncheire" monster + aux.GlobalCheck(s,function() + local e0a=Effect.CreateEffect(c) + e0a:SetType(EFFECT_TYPE_FIELD) + e0a:SetCode(EFFECT_ADD_SETCODE) + e0a:SetTargetRange(LOCATION_MZONE,0) + e0a:SetTarget(function(e,c) local tp=e:GetHandlerPlayer() return c:IsFaceup() and c:IsControler(tp) and c:IsOwner(1-tp) end) + e0a:SetOperation(s.chngcon) + e0a:SetValue(SET_HECATONCHEIRE) + Duel.RegisterEffect(e0a,0) + local e0b=e0a:Clone() + Duel.RegisterEffect(e0b,1) + end) +end +s.listed_series={SET_HECATONCHEIRE} +function s.chngcon(scard,sumtype,tp) + return Fusion.SummonEffect and Fusion.SummonEffect:GetHandler():IsCode(id) and ((sumtype&MATERIAL_FUSION)~=0 or (sumtype&SUMMON_TYPE_FUSION)~=0) +end +function s.fextra(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+100) + and Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) + if chk==0 then return b1 or b2 end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return e:GetLabel()==1 and chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end + local cost_skip=e:GetLabel()~=-100 + local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) + local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) + and Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) + if chk==0 then e:SetLabel(0) 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_TOHAND) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,1,nil) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_FUSION_SUMMON) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end + Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Return 1 Spell/Trap your opponent controls to the hand + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end + elseif op==2 then + --Fusion Summon 1 "Hecatoncheire" Fusion Monster from your Extra Deck, by banishing its materials from your field and/or GY + local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + end +end \ No newline at end of file diff --git a/pre-release/c100446010.lua b/pre-release/c100446010.lua new file mode 100644 index 0000000000..b616dc663c --- /dev/null +++ b/pre-release/c100446010.lua @@ -0,0 +1,46 @@ +--えざる誘う手 +--Ipt al Hecatoncherie +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation of an opponent's monster effect, and if you do, destroy it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + 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) +end +s.listed_series={SET_HECATONCHEIRE} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return re:IsMonsterEffect() and rp==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsChainNegatable(ev) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,rc,1,tp,0) + end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and not rc:IsLocation(LOCATION_HAND|LOCATION_DECK) and aux.nvfilter(rc) + and rc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + if rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,rc)<=0 then + return + elseif not rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then + return + end + if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100446011.lua b/pre-release/c100446011.lua new file mode 100644 index 0000000000..5596ebe41a --- /dev/null +++ b/pre-release/c100446011.lua @@ -0,0 +1,41 @@ +--見えざる招き手 +--Yad al Hecatoncheire +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation of an opponent's Spell/Trap Card, and if you do, destroy it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + 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) +end +s.listed_series={SET_HECATONCHEIRE} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsChainNegatable(ev) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + if rc:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,rc,1,tp,0) + end + end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and not rc:IsLocation(LOCATION_HAND|LOCATION_DECK) + and aux.nvfilter(rc) and rc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.SSet(tp,rc) + end +end \ No newline at end of file From 0ffd259986a4c0e355b7c9dcfb725bfa48a40f3f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 30 Jul 2025 23:47:06 +0300 Subject: [PATCH 3/4] Add files via upload --- archetype_setcode_constants.lua | 5 +- official/c10966439.lua | 91 +++++++++++++++++ official/c11688916.lua | 120 ++++++++++++++++++++++ official/c12800564.lua | 108 ++++++++++++++++++++ official/c16693934.lua | 57 +++++++++++ official/c16922142.lua | 89 +++++++++++++++++ official/c17719582.lua | 95 ++++++++++++++++++ official/c19743887.lua | 97 ++++++++++++++++++ official/c20508881.lua | 98 ++++++++++++++++++ official/c20715411.lua | 104 +++++++++++++++++++ official/c21720439.lua | 87 ++++++++++++++++ official/c27755794.lua | 70 +++++++++++++ official/c28531163.lua | 87 ++++++++++++++++ official/c28653611.lua | 93 +++++++++++++++++ official/c28877382.lua | 76 ++++++++++++++ official/c29099860.lua | 91 +++++++++++++++++ official/c29876299.lua | 103 +++++++++++++++++++ official/c30998403.lua | 70 +++++++++++++ official/c31010081.lua | 79 +++++++++++++++ official/c32232538.lua | 85 ++++++++++++++++ official/c32442017.lua | 94 ++++++++++++++++++ official/c32665564.lua | 81 +++++++++++++++ official/c33171768.lua | 78 +++++++++++++++ official/c33781156.lua | 77 ++++++++++++++ official/c33955120.lua | 90 +++++++++++++++++ official/c36849933.lua | 10 +- official/c40725446.lua | 81 +++++++++++++++ official/c42091632.lua | 69 +++++++++++++ official/c44293356.lua | 88 ++++++++++++++++ official/c45016904.lua | 50 ++++++++++ official/c46148485.lua | 102 +++++++++++++++++++ official/c47082621.lua | 81 +++++++++++++++ official/c47960073.lua | 88 ++++++++++++++++ official/c53813120.lua | 122 +++++++++++++++++++++++ official/c53927851.lua | 69 +++++++++++++ official/c54143349.lua | 54 ++++++++++ official/c54265980.lua | 72 ++++++++++++++ official/c54936778.lua | 95 ++++++++++++++++++ official/c55088578.lua | 69 +++++++++++++ official/c55158350.lua | 78 +++++++++++++++ official/c56870908.lua | 129 ++++++++++++++++++++++++ official/c58205203.lua | 96 ++++++++++++++++++ official/c5848934.lua | 65 ++++++++++++ official/c6260560.lua | 72 ++++++++++++++ official/c63056220.lua | 10 +- official/c6560411.lua | 93 +++++++++++++++++ official/c66092596.lua | 97 ++++++++++++++++++ official/c66100116.lua | 77 ++++++++++++++ official/c67115133.lua | 86 ++++++++++++++++ official/c67322708.lua | 78 +++++++++++++++ official/c67515699.lua | 64 ++++++++++++ official/c68231287.lua | 95 ++++++++++++++++++ official/c68831625.lua | 115 +++++++++++++++++++++ official/c69053263.lua | 72 ++++++++++++++ official/c69176851.lua | 104 +++++++++++++++++++ official/c69453825.lua | 84 ++++++++++++++++ official/c70576413.lua | 64 ++++++++++++ official/c71398055.lua | 171 ++++++++++++++++++++++++++++++++ official/c71410542.lua | 101 +++++++++++++++++++ official/c72632190.lua | 88 ++++++++++++++++ official/c73355772.lua | 70 +++++++++++++ official/c7382007.lua | 74 ++++++++++++++ official/c7782069.lua | 65 ++++++++++++ official/c80208225.lua | 55 ++++++++++ official/c80320877.lua | 96 ++++++++++++++++++ official/c80538047.lua | 54 ++++++++++ official/c81143465.lua | 60 +++++++++++ official/c81650695.lua | 98 ++++++++++++++++++ official/c84477320.lua | 70 +++++++++++++ official/c84693918.lua | 95 ++++++++++++++++++ official/c85315450.lua | 65 ++++++++++++ official/c8805661.lua | 62 ++++++++++++ official/c89086647.lua | 58 +++++++++++ official/c90444325.lua | 10 +- official/c92269002.lua | 90 +++++++++++++++++ official/c92472273.lua | 86 ++++++++++++++++ official/c92595825.lua | 86 ++++++++++++++++ official/c93317313.lua | 102 +++++++++++++++++++ official/c93481594.lua | 85 ++++++++++++++++ official/c94103142.lua | 86 ++++++++++++++++ official/c94326720.lua | 72 ++++++++++++++ official/c94503794.lua | 76 ++++++++++++++ official/c95448372.lua | 75 ++++++++++++++ official/c95626382.lua | 87 ++++++++++++++++ official/c9627299.lua | 64 ++++++++++++ 85 files changed, 6838 insertions(+), 17 deletions(-) create mode 100644 official/c10966439.lua create mode 100644 official/c11688916.lua create mode 100644 official/c12800564.lua create mode 100644 official/c16693934.lua create mode 100644 official/c16922142.lua create mode 100644 official/c17719582.lua create mode 100644 official/c19743887.lua create mode 100644 official/c20508881.lua create mode 100644 official/c20715411.lua create mode 100644 official/c21720439.lua create mode 100644 official/c27755794.lua create mode 100644 official/c28531163.lua create mode 100644 official/c28653611.lua create mode 100644 official/c28877382.lua create mode 100644 official/c29099860.lua create mode 100644 official/c29876299.lua create mode 100644 official/c30998403.lua create mode 100644 official/c31010081.lua create mode 100644 official/c32232538.lua create mode 100644 official/c32442017.lua create mode 100644 official/c32665564.lua create mode 100644 official/c33171768.lua create mode 100644 official/c33781156.lua create mode 100644 official/c33955120.lua create mode 100644 official/c40725446.lua create mode 100644 official/c42091632.lua create mode 100644 official/c44293356.lua create mode 100644 official/c45016904.lua create mode 100644 official/c46148485.lua create mode 100644 official/c47082621.lua create mode 100644 official/c47960073.lua create mode 100644 official/c53813120.lua create mode 100644 official/c53927851.lua create mode 100644 official/c54143349.lua create mode 100644 official/c54265980.lua create mode 100644 official/c54936778.lua create mode 100644 official/c55088578.lua create mode 100644 official/c55158350.lua create mode 100644 official/c56870908.lua create mode 100644 official/c58205203.lua create mode 100644 official/c5848934.lua create mode 100644 official/c6260560.lua create mode 100644 official/c6560411.lua create mode 100644 official/c66092596.lua create mode 100644 official/c66100116.lua create mode 100644 official/c67115133.lua create mode 100644 official/c67322708.lua create mode 100644 official/c67515699.lua create mode 100644 official/c68231287.lua create mode 100644 official/c68831625.lua create mode 100644 official/c69053263.lua create mode 100644 official/c69176851.lua create mode 100644 official/c69453825.lua create mode 100644 official/c70576413.lua create mode 100644 official/c71398055.lua create mode 100644 official/c71410542.lua create mode 100644 official/c72632190.lua create mode 100644 official/c73355772.lua create mode 100644 official/c7382007.lua create mode 100644 official/c7782069.lua create mode 100644 official/c80208225.lua create mode 100644 official/c80320877.lua create mode 100644 official/c80538047.lua create mode 100644 official/c81143465.lua create mode 100644 official/c81650695.lua create mode 100644 official/c84477320.lua create mode 100644 official/c84693918.lua create mode 100644 official/c85315450.lua create mode 100644 official/c8805661.lua create mode 100644 official/c89086647.lua create mode 100644 official/c92269002.lua create mode 100644 official/c92472273.lua create mode 100644 official/c92595825.lua create mode 100644 official/c93317313.lua create mode 100644 official/c93481594.lua create mode 100644 official/c94103142.lua create mode 100644 official/c94326720.lua create mode 100644 official/c94503794.lua create mode 100644 official/c95448372.lua create mode 100644 official/c95626382.lua create mode 100644 official/c9627299.lua diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index 56870cdfb9..7facafc918 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -589,12 +589,13 @@ SET_TELEPORT = 0x1c5 SET_POWER_PATRON = 0x1c6 SET_ARTMAGE = 0x1c7 SET_RB = 0x1ca ---Released but the official English name is unconfirmed SET_DRAGONTAIL = 0x1c0 SET_YUMMY = 0x1c1 SET_K9 = 0x1c4 ---Pre-release archetypes SET_DOOM_KING = 0x1c8 SET_MAGNIFISTORM = 0x1c9 SET_DOOM_Z = 0x1cb +--Released but the official English name is unconfirmed +-- +--Pre-release archetypes SET_HECATONCHEIRE = 0x1cc diff --git a/official/c10966439.lua b/official/c10966439.lua new file mode 100644 index 0000000000..ea35e992a9 --- /dev/null +++ b/official/c10966439.lua @@ -0,0 +1,91 @@ +--マシュマオ☆ヤミー +--Marshmao☆Yummy +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Yummy" Spell/Trap from your GY to your hand, or, if this card was Special Summoned by the effect of a Synchro Monster, you can place 1 "Yummy" Field Spell or "Yummy" Continuous Spell/Trap from your Deck or banishment face-up on your field instead + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thpltg) + e2a:SetOperation(s.thplop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_YUMMY} +function s.spconfilter(c) + return not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsFaceup()) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not 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:IsSetCard(SET_YUMMY) and c:IsSpellTrap() and c:IsAbleToHand() +end +function s.plfilter(c,tp,szone_chk) + return c:IsSetCard(SET_YUMMY) and (c:IsFieldSpell() or (szone_chk and c:IsContinuousSpellTrap())) + and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.thpltg(e,tp,eg,ep,ev,re,r,rp,chk) + local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) + or (sp_chk and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil,tp,Duel.GetLocationCount(tp,LOCATION_SZONE)>0)) end + e:SetLabel(sp_chk and 1 or 0) + if sp_chk then + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + else + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + end +end +function s.thplop(e,tp,eg,ep,ev,re,r,rp) + local sp_chk=e:GetLabel()==1 + local szone_chk=sp_chk and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil) + if sp_chk then + g:Merge(Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,nil,tp,szone_chk)) + end + if #g==0 then return end + local hint=sp_chk and aux.Stringid(id,2) or HINTMSG_ATOHAND + Duel.Hint(HINT_SELECTMSG,tp,hint) + local sc=g:Select(tp,1,1,nil):GetFirst() + if not sc then return end + if sc:IsLocation(LOCATION_GRAVE) then + --Add 1 "Yummy" Spell/Trap from your GY to your hand + Duel.HintSelection(sc) + Duel.SendtoHand(sc,nil,REASON_EFFECT) + else + --Place 1 "Yummy" Field Spell or "Yummy" Continuous Spell/Trap from your Deck or banishment face-up on your field + if sc:IsLocation(LOCATION_REMOVED) then Duel.HintSelection(sc) end + local place_location=sc:IsFieldSpell() and LOCATION_FZONE or LOCATION_SZONE + Duel.MoveToField(sc,tp,tp,place_location,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/official/c11688916.lua b/official/c11688916.lua new file mode 100644 index 0000000000..a9783f4bed --- /dev/null +++ b/official/c11688916.lua @@ -0,0 +1,120 @@ +--ドレミコード・プリモア +--Solfachord Primoria +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --Return 1 "Solfachord" card in your Pendulum Zone to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(function(e,tp,eg) return eg:IsExists(s.pendthconfilter,1,nil,tp) end) + e1:SetTarget(s.pendthtg) + e1:SetOperation(s.pendthop) + c:RegisterEffect(e1) + --While you have "Solfachord" cards with even and odd Pendulum Scales in your Pendulum Zone, your activated "Solfachord" cards' effects cannot be negated + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_DISEFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.immcon) + e2:SetValue(s.immval) + c:RegisterEffect(e2) + --Add 1 "Solfachord" card from your Deck to your hand, except "Solfachord Primoria" + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetCountLimit(1,id) + e3a:SetTarget(s.deckthtg) + e3a:SetOperation(s.deckthop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) + --Add 1 "Solfachord" card from your GY or face-up Extra Deck 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:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(function(e,tp,eg) return eg:IsExists(s.gyedthconfilter,1,nil,tp) end) + e4:SetTarget(s.gyedthtg) + e4:SetOperation(s.gyedthop) + c:RegisterEffect(e4) +end +s.listed_names={id} +s.listed_series={SET_SOLFACHORD} +function s.pendthconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() +end +function s.pendthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsAbleToHand() +end +function s.pendthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and s.pendthfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.pendthfilter,tp,LOCATION_PZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.pendthfilter,tp,LOCATION_PZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.pendthop(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.immcon(e) + local g=Duel.GetMatchingGroup(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil,SET_SOLFACHORD) + local a,b=g:GetFirst(),g:GetNext() + return a and b and ((a:GetScale()+b:GetScale())%2==1) +end +function s.immval(e,ct) + local trig_player,trig_setcodes=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) + if trig_player==1-e:GetHandlerPlayer() then return false end + for _,setcode in ipairs(trig_setcodes) do + if (SET_SOLFACHORD&0xfff)==(setcode&0xfff) and (SET_SOLFACHORD&setcode)==SET_SOLFACHORD then return true end + end +end +function s.deckthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.gyedthconfilter(c,tp) + return c:IsLinkSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsSummonPlayer(tp) +end +function s.gyedthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsFaceup() and c:IsAbleToHand() +end +function s.gyedthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.gyedthfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) +end +function s.gyedthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gyedthfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,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/c12800564.lua b/official/c12800564.lua new file mode 100644 index 0000000000..3ff8d52489 --- /dev/null +++ b/official/c12800564.lua @@ -0,0 +1,108 @@ +--真竜魔王マスターP +--Master Peace, The True Dracoverlord +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Requires 3 Tributes to Normal Summon (cannot be Normal Set) + local e0a=aux.AddNormalSummonProcedure(c,true,false,3,3,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0)) + local e0b=aux.AddNormalSetProcedure(c) + --To Tribute Summon this card face-up, you can Tribute Continuous Spells/Traps you control, as well as monsters + local e0c=Effect.CreateEffect(c) + e0c:SetType(EFFECT_TYPE_SINGLE) + e0c:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0c:SetCode(EFFECT_ADD_EXTRA_TRIBUTE) + e0c:SetTargetRange(LOCATION_SZONE,0) + e0c:SetTarget(aux.TargetBoolFunction(Card.IsContinuousSpellTrap)) + e0c:SetValue(POS_FACEUP) + c:RegisterEffect(e0c) + --Negate the activation of an opponent's monster effect activated in the hand or field, and if you do, destroy that card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.negcon) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --Skip your opponent's next Main Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + 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.skipcon) + e2:SetOperation(s.skipop) + c:RegisterEffect(e2) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_HAND|LOCATION_MZONE)>0 and c:IsTributeSummoned() + and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) +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.skipcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and rp==1-tp)) and c:IsTributeSummoned() + and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) +end +function s.skipop(e,tp,eg,ep,ev,re,r,rp) + local oppo_main1_flag=nil + local effect_code=0 + local turn_count=Duel.GetTurnCount() + local current_phase=Duel.GetCurrentPhase() + local reset_count=(Duel.IsTurnPlayer(1-tp) and (current_phase==PHASE_MAIN1 or current_phase>=PHASE_MAIN2)) and 2 or 1 + if Duel.IsTurnPlayer(tp) or current_phase<=PHASE_STANDBY or current_phase>=PHASE_MAIN2 then + effect_code=EFFECT_SKIP_M1 + elseif Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() then + effect_code=EFFECT_SKIP_M2 + else + oppo_main1_flag=true + effect_code=EFFECT_SKIP_M1 + end + local c=e:GetHandler() + --Skip your opponent's next Main Phase + 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_code) + e1:SetTargetRange(0,1) + e1:SetCondition(function() return not oppo_main1_flag or turn_count~=Duel.GetTurnCount() end) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,reset_count) + Duel.RegisterEffect(e1,tp) + if oppo_main1_flag then + --If this effect was used during the opponent's Main Phase 1 which Main Phase gets skipped depends on what they do + local e2=e1:Clone() + e2:SetCode(EFFECT_SKIP_M2) + e2:SetCondition(aux.TRUE) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) + Duel.RegisterEffect(e2,tp) + --Reset the effect that skips their Main Phase 1 if they enter the Battle Phase that turn + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCountLimit(1) + e3:SetCondition(function() return Duel.IsTurnPlayer(1-tp) end) + e3:SetOperation(function() e1:Reset() end) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) + end +end \ No newline at end of file diff --git a/official/c16693934.lua b/official/c16693934.lua new file mode 100644 index 0000000000..303c6d630b --- /dev/null +++ b/official/c16693934.lua @@ -0,0 +1,57 @@ +--凶導の聖獣 +--Quadogmatika Beast +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Send to the GY 1 monster with an ATK equal or higher than the targeted monster's ATK, and if you do, Special Summon the targeted monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + 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.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={SET_DOGMATIKA} +function s.spfilter(c,e,tp,atk) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c:GetAttack()) +end +function s.tgfilter(c,atk) + return c:IsMonster() and (c:IsLocation(LOCATION_EXTRA) or c:IsSetCard(SET_DOGMATIKA)) + and c:IsAbleToGrave() and c:IsAttackAbove(atk) +end +function s.target(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.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc:GetAttack()):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --Until the end of your next turn after this card resolves, you cannot Special Summon from the Extra Deck + 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 c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c16922142.lua b/official/c16922142.lua new file mode 100644 index 0000000000..afc372648c --- /dev/null +++ b/official/c16922142.lua @@ -0,0 +1,89 @@ +--絢嵐たるスエン +--Magnifistorming Crothea +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Cannot be destroyed by battle or card effects while your opponent controls no Spells/Traps + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCondition(function(e) return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil) end) + e1a:SetValue(1) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e1b) + --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_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Magnifistorm" card and/or 1 "Mystical Space Typhoon" from your Deck and/or GY to your hand + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetCountLimit(1,{id,1}) + e3a:SetTarget(s.thtg) + e3a:SetOperation(s.thop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={id,CARD_MYSTICAL_SPACE_TYPHOON} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.rescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsSetCard,nil,SET_MAGNIFISTORM)<=1 and sg:FilterCount(Card.IsCode,nil,CARD_MYSTICAL_SPACE_TYPHOON)<=1 +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) + if #g>0 then + local sg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg>0 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end + --You cannot Special Summon for the rest of this turn, except WIND 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:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c17719582.lua b/official/c17719582.lua new file mode 100644 index 0000000000..6f3afb2d90 --- /dev/null +++ b/official/c17719582.lua @@ -0,0 +1,95 @@ +--アルトメギア・ペリペティア-激動- +--Artmage Peripeteia -Turmoil- +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Return 1 "Artmage" monster you control to the hand/Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END+TIMING_STANDBY_PHASE) + e1:SetCost(s.cost) + e1:SetTarget(s.rthtetg) + e1:SetOperation(s.rthteop) + c:RegisterEffect(e1) + --Add 1 "Artmage" Spell from your GY or banishment to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetCost(s.cost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Checks to see if non-Fusion Monsters were Summoned from the Extra Deck + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) end) +end +s.listed_series={74733322} --"Artmage Academic Arcane Arts Acropolis" +s.listed_series={SET_ARTMAGE} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon from the Extra Deck the turn you activate this effect, except Fusion Monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.rthtefilter(c,tp) + return c:IsSetCard(SET_ARTMAGE) and (c:IsAbleToHand() or c:IsAbleToExtra()) + and c:IsFaceup() and (not tp or Duel.GetMZoneCount(tp,c)>0) +end +function s.rthtetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.rthtefilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) + 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,g,1,tp,0) +end +function s.rthteop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local g=Duel.SelectMatchingCard(tp,s.rthtefilter,tp,LOCATION_MZONE,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 + and g:GetFirst():IsLocation(LOCATION_HAND|LOCATION_EXTRA) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and tc:IsRelateToEffect(e) + and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then + --Its effects are negated + tc:NegateEffects(e:GetHandler()) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)==74733322 +end +function s.thfilter(c) + return c:IsSetCard(SET_ARTMAGE) and c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c19743887.lua b/official/c19743887.lua new file mode 100644 index 0000000000..2593f5bd43 --- /dev/null +++ b/official/c19743887.lua @@ -0,0 +1,97 @@ +--蹴神-VARefar +--VARefar the Kick Deity +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand, then you can reveal 1 card in your hand and apply an effect based on the type of card revealed + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) + e1a:SetType(EFFECT_TYPE_QUICK_O) + e1a:SetRange(LOCATION_HAND) + e1a:SetCode(EVENT_CHAINING) + e1a:SetCountLimit(1,id) + e1a:SetCondition(s.spcon1) + e1a:SetTarget(s.sptg) + e1a:SetOperation(s.spop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_BE_BATTLE_TARGET) + e1b:SetCondition(s.spcon2) + c:RegisterEffect(e1b) +end +function s.spcontgfilter(c,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) +end +function s.spcon1(e,tp,eg,ep,ev,re,r,rp) + if not (rp==1-tp and re:IsMonsterEffect() and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return trig_loc==LOCATION_MZONE and tg and tg:IsExists(s.spcontgfilter,1,nil,tp) +end +function s.spcon2(e,tp,eg,ep,ev,re,r,rp) + local at=Duel.GetAttacker() + local bt=Duel.GetAttackTarget() + return at and bt and at:IsControler(1-tp) and bt:IsControler(tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + local opp_mon=(Duel.CheckEvent(EVENT_BE_BATTLE_TARGET) and Duel.GetAttacker()) + or (re:GetHandler():IsRelateToEffect(re) and eg:GetFirst()) + or nil + if opp_mon then + e:SetLabelObject(opp_mon) + if not opp_mon:IsLinkMonster() then + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,opp_mon,1,tp,POS_FACEUP_DEFENSE) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,opp_mon,1,tp,opp_mon:GetAttack()) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,opp_mon,1,tp,0) + end +end +function s.revealfilter(c,types) + return c:IsType(types) and not c:IsPublic() +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 opp_mon=e:GetLabelObject() + if not opp_mon then return end + if Duel.CheckEvent(EVENT_BE_BATTLE_TARGET) then + if not opp_mon:IsRelateToBattle() then return false end + else + if not opp_mon:IsRelateToEffect(re) then return false end + end + local types=TYPE_SPELL + if opp_mon:IsCanChangePosition() and opp_mon:IsAttackPos() then types=types|TYPE_MONSTER end + if opp_mon:IsAbleToRemove() then types=types|TYPE_TRAP end + if Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil,types) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil,types):GetFirst() + if not rc then return end + Duel.BreakEffect() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + local op=rc:GetMainCardType() + Duel.BreakEffect() + if op==TYPE_MONSTER then + --Change it to Defense Position + Duel.ChangePosition(opp_mon,POS_FACEUP_DEFENSE) + elseif op==TYPE_SPELL then + --Its ATK becomes doubled + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK) + e1:SetValue(opp_mon:GetAttack()*2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + opp_mon:RegisterEffect(e1) + elseif op==TYPE_TRAP then + --Banish it + Duel.Remove(opp_mon,POS_FACEUP,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/official/c20508881.lua b/official/c20508881.lua new file mode 100644 index 0000000000..5f736e2b45 --- /dev/null +++ b/official/c20508881.lua @@ -0,0 +1,98 @@ +--絢嵐たる見神 +--Magnifistorming Sight Trance +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + 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_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tgfilter(c) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() +end +function s.thfilter(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) and Duel.IsPlayerCanDraw(tp,2) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) + elseif op==2 then + e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.discardfilter(c) + return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsQuickPlaySpell()) and c:IsDiscardable(REASON_EFFECT) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Draw 2 cards, then discard 1 "Magnifistorm" card or 1 Quick-Play Spell, or, if you do not have any in your hand, discard your entire hand + if Duel.Draw(tp,2,REASON_EFFECT)>0 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + local handg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) + if handg:IsExists(s.discardfilter,1,nil) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local dg=handg:FilterSelect(tp,s.discardfilter,1,1,nil) + if #dg>0 then + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) + end + else + Duel.SendtoGrave(handg,REASON_EFFECT|REASON_DISCARD) + end + end + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + 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 +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 + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/official/c20715411.lua b/official/c20715411.lua new file mode 100644 index 0000000000..98f9147c64 --- /dev/null +++ b/official/c20715411.lua @@ -0,0 +1,104 @@ +--DDD零死王ゼロ・マキナ +--D/D/D Zero Demise King Zero Machinex +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Check if it was activated this turn + local e0=Effect.CreateEffect(c) + e0:SetDescription(1160) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetRange(LOCATION_HAND) + e0:SetCost(s.actreg) + c:RegisterEffect(e0) + --Place 1 "Dark Contract" Continuous Spell/Trap on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_EXTRA) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place this card in the Pendulum Zone if it's destroyed + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e3:SetOperation(s.penop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT,SET_DDD} +s.listed_names={id} +function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.plfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.spconfilter(c,tp) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) + and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/official/c21720439.lua b/official/c21720439.lua new file mode 100644 index 0000000000..053e67232e --- /dev/null +++ b/official/c21720439.lua @@ -0,0 +1,87 @@ +--アルトメギア・ムーヴメント-血統- +--Artmage Movement -Lineage- +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Artmage" monster from your Deck in Defense Position, with a different name from the cards you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end) + e1:SetCost(s.cost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Artmage" Trap from your GY or banishment to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetCost(s.cost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Checks to see if non-Fusion Monsters were Summoned from the Extra Deck + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) end) +end +s.listed_series={74733322} --"Artmage Academic Arcane Arts Acropolis" +s.listed_series={SET_ARTMAGE} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon from the Extra Deck the turn you activate this effect, except Fusion Monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spfilter(c,e,tp,...) + return c:IsSetCard(SET_ARTMAGE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not (... and c:IsCode(...)) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end + local codes=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil):GetClass(Card.GetCode) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,table.unpack(codes)) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + local codes=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil):GetClass(Card.GetCode) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,table.unpack(codes)) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)==74733322 +end +function s.thfilter(c) + return c:IsSetCard(SET_ARTMAGE) and c:IsTrap() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c27755794.lua b/official/c27755794.lua new file mode 100644 index 0000000000..29b8b7dde0 --- /dev/null +++ b/official/c27755794.lua @@ -0,0 +1,70 @@ +--絢嵐たるメガラ +--Magnifistorming Megala +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, 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.selfspcon) + c:RegisterEffect(e1) + --Special Summon 1 "Magnifistorm" monster from your Deck with a different name from the monsters you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + 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_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (rc:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) or (rc:IsSetCard(SET_MAGNIFISTORM) and rc:IsQuickPlaySpell())) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_MZONE,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except WIND 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:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c28531163.lua b/official/c28531163.lua new file mode 100644 index 0000000000..592176dffd --- /dev/null +++ b/official/c28531163.lua @@ -0,0 +1,87 @@ +--黙歯録 +--Apocaries +--scripted by Naim +local s,id=GetID() +local COUNTER_CARIES=0x215 +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_CARIES) + --When this card is activated: Place C Counters on this card equal to the number of cards your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_COUNTER) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(function(e,tp) e:GetHandler():AddCounter(COUNTER_CARIES,Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)) end) + c:RegisterEffect(e1) + --Apply effects to a target based on the number of C Counters removed from this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.counter_place_list={COUNTER_CARIES} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) + if chk==0 then return ct>0 and Duel.IsCanAddCounter(tp,COUNTER_CARIES,ct,c) end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,COUNTER_CARIES,ct) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_CARIES,1,REASON_COST) + and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + local b1=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_CARIES,1,REASON_COST) + local b2=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_CARIES,2,REASON_COST) and not tc:IsAttack(0) + local b3=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_CARIES,3,REASON_COST) and tc:IsNegatableMonster() + local b4=Duel.IsCanRemoveCounter(tp,1,0,COUNTER_CARIES,4,REASON_COST) + local ct=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}, + {b3,aux.Stringid(id,4)}, + {b4,aux.Stringid(id,5)}) + Duel.RemoveCounter(tp,1,1,COUNTER_CARIES,ct,REASON_COST) + e:SetLabel(ct) + if (ct==1 or ct==2) then + e:SetCategory(CATEGORY_ATKCHANGE) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,(ct==1 and -500 or -tc:GetAttack())) + elseif ct==3 then + e:SetCategory(CATEGORY_DISABLE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) + elseif ct==4 then + e:SetCategory(CATEGORY_DESTROY) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) then return end + local ct=e:GetLabel() + local c=e:GetHandler() + if ct==1 and tc:IsFaceup() then + --It loses 500 ATK + tc:UpdateAttack(-500,nil,c) + elseif ct==2 and tc:IsFaceup() then + --Change its ATK to 0 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + elseif ct==3 and tc:IsFaceup() then + --Negate its effects + tc:NegateEffects(c) + elseif ct==4 and tc:IsMonster() then + --Destroy it + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c28653611.lua b/official/c28653611.lua new file mode 100644 index 0000000000..da3cfdc777 --- /dev/null +++ b/official/c28653611.lua @@ -0,0 +1,93 @@ +--ヘル・パニッシャー +--Infernal Punisher +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +function s.thfilter(c) + return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_DINOSAUR) and c:IsAbleToHand() +end +function s.spfilter(c,e,tp) + return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.CheckReleaseGroupCost(tp,nil,1,false,aux.ReleaseCheckMMZ,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,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) + if op==2 then + local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,false,aux.ReleaseCheckMMZ,nil) + Duel.Release(g,REASON_COST) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local cost_skip=e:GetLabel()~=-100 + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+1)) + and (not cost_skip or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) + if chk==0 then e:SetLabel(0) return b1 or b2 end + local op=e:GetLabel() + if op==0 then + cost_skip=true + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + else + cost_skip=false + end + e:SetLabel(0) + Duel.SetTargetParam(op) + if op==1 then + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if op==1 then + --Add 1 WATER Dinosaur monster from your Deck to your hand, then if your opponent controls a monster, you can Special Summon the added monster + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + end + elseif op==2 then + --Special Summon 1 Level 6 or higher FIRE monster from your hand, Deck, or GY, but if you Special Summoned a non-Fiend monster by this effect, negate its effects + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and not sc:IsRace(RACE_FIEND) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + end +end \ No newline at end of file diff --git a/official/c28877382.lua b/official/c28877382.lua new file mode 100644 index 0000000000..6846511786 --- /dev/null +++ b/official/c28877382.lua @@ -0,0 +1,76 @@ +--終刻竜機Ⅴ-アマルテ +--Doom-Z Five - Amalthe +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Doom-Z" monster from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EVENT_DESTROYED) + e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + c:RegisterEffect(e1c) + --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +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,lv,mc) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) + and mc:GetEquipGroup():FilterCount(Card.IsCanBeXyzMaterial,nil,c,tp,REASON_EFFECT)==mc:GetEquipCount() + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),c) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel(),c):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + Duel.Overlay(sc,c+c:GetEquipGroup(),true) + end +end \ No newline at end of file diff --git a/official/c29099860.lua b/official/c29099860.lua new file mode 100644 index 0000000000..9dc7f1a534 --- /dev/null +++ b/official/c29099860.lua @@ -0,0 +1,91 @@ +--剛鬼マシン・スープレックス +--Gouki Mashin Suprex +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both this card and 1 "Gouki" monster in your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex" + 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_ONFIELD) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +s.listed_names={id} +function s.spcostfilter(c,e,tp) + return c:IsSetCard(SET_GOUKI) and not c:IsPublic() 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 not c:IsPublic() + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() + e:SetLabelObject(rc) + rc:CreateEffectRelation(e) + Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) + Duel.ShuffleHand(tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0) +end +function s.spfilter(c,e,tp) + return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + local sg=Group.FromCards(c,e:GetLabelObject()) + if sg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + for sc in sg:Iter() do + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --You cannot Special Summon, except "Gouki" monsters, while you control either of those face-up monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c29876299.lua b/official/c29876299.lua new file mode 100644 index 0000000000..78d4e249f7 --- /dev/null +++ b/official/c29876299.lua @@ -0,0 +1,103 @@ +--メガリス・アナスタシス +--Megalith Anastasis +--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) + --Add 2 "Megalith" monsters (1 Level 4 or lower and 1 Level 8 or higher) 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_SZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Discard()) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Activate 1 of these effects + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.effcon) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +function s.thfilter(c) + return (c:IsLevelBelow(4) or c:IsLevelAbove(8)) and c:IsSetCard(SET_MEGALITH) and c:IsAbleToHand() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsLevelBelow,1,nil,4) and sg:IsExists(Card.IsLevelAbove,1,nil,8) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg>0 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end +end +function s.effconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsRitualSummoned() and c:IsSetCard(SET_MEGALITH) and c:IsFaceup() +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.effconfilter,1,nil,tp) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsPlayerCanDraw(tp,2) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_RELEASE) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Draw 2 cards, then discard 1 card + if Duel.Draw(tp,2,REASON_EFFECT)==2 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end + elseif op==2 then + --Tribute 1 monster your opponent controls + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Release(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c30998403.lua b/official/c30998403.lua new file mode 100644 index 0000000000..d33e3a2283 --- /dev/null +++ b/official/c30998403.lua @@ -0,0 +1,70 @@ +--DDD天空王ゼウス・ラグナロク +--D/D/D Sky King Zeus Ragnarok +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ "D/D" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) + --Destroy 1 "D/D" or "Dark Contract" card you control, also, you can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Negate the activation of monster effect your opponent activates in the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end + if chk==0 then return not Duel.HasFlagEffect(tp,id) --pending rulings on whether you can use this effect if you've already performed an extra Pendulum Summon or not + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_DD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,2),aux.Stringid(id,3),id) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc==LOCATION_HAND + and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) +end +function s.negcostfilter(c) + return (c:IsSetCard(SET_DARK_CONTRACT) or (c:IsSetCard(SET_DD) and c:IsMonster())) and c:IsAbleToRemoveAsCost() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_DARK_CONTRACT) and sg:IsExists(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,1,nil) +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.negcostfilter,tp,LOCATION_GRAVE,0,nil) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) + Duel.Remove(rg,POS_FACEUP,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) +end \ No newline at end of file diff --git a/official/c31010081.lua b/official/c31010081.lua new file mode 100644 index 0000000000..187e2b6445 --- /dev/null +++ b/official/c31010081.lua @@ -0,0 +1,79 @@ +--終刻獄徒 ディアクトロス +--Doom-Z Break Diactorus +--Scripted by Hatter +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 "Doom-Z" card in your hand or face-up field, then you can destroy 1 monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Add to your hand, or send to the GY, 1 Equip Spell from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE) + 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.thtgcon) + e2:SetTarget(s.thtgtg) + e2:SetOperation(s.thtgop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MEDIUS_THE_PURE} +s.listed_series={SET_DOOM_Z} +function s.desfilter(c) + return c:IsSetCard(SET_DOOM_Z) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_HAND|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 + and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end +function s.thtgconfilter(c) + return (c:IsSetCard(SET_DOOM_Z) and c:IsMonster()) or c:IsCode(CARD_MEDIUS_THE_PURE) +end +function s.thtgcon(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayGroup():IsExists(s.thtgconfilter,1,nil) +end +function s.thtgfilter(c) + return c:IsEquipSpell() and (c:IsAbleToHand() or c:IsAbleToGrave()) +end +function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thtgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.thtgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local g=Duel.SelectMatchingCard(tp,s.thtgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + aux.ToHandOrElse(g,tp) + end +end diff --git a/official/c32232538.lua b/official/c32232538.lua new file mode 100644 index 0000000000..72d419b6e3 --- /dev/null +++ b/official/c32232538.lua @@ -0,0 +1,85 @@ +--DDD智慧王ソロモン +--D/D/D Wisdom King Solomon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 "D/D" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) + --Add 1 "D/D" card from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.DetachFromSelf(1)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --A targeted "D/D" Effect Monster gains an effect until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_REMOVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD} +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.tgfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_EFFECT) and c:IsFaceup() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --Inflict damage to your opponent equal to the original ATK of a monster this card destroys a monster by battle + local e1=Effect.CreateEffect(tc) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(aux.bdcon) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() + if dam<0 then dam=0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end diff --git a/official/c32442017.lua b/official/c32442017.lua new file mode 100644 index 0000000000..a3de63f896 --- /dev/null +++ b/official/c32442017.lua @@ -0,0 +1,94 @@ +--終刻撃針 +--Doom-Z Raider +--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) + --Destroy 1 other "Doom-Z" card in your hand or face-up field, then add to your hand, or Special Summon, 1 "Doom-Z" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.desthsptg) + e1:SetOperation(s.desthspop) + c:RegisterEffect(e1) + --Destroy 1 face-up monster on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.desfilter(c,e,tp) + if not (c:IsSetCard(SET_DOOM_Z) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))) then return false end + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) +end +function s.thspfilter(c,e,tp,exc) + return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() + and (c:IsAbleToHand() or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp,exc)>0)) +end +function s.desthsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.desthspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,e,tp) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc then + Duel.BreakEffect() + aux.ToHandOrElse(sc,tp, + function() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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) + ) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_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) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsFaceup,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 \ No newline at end of file diff --git a/official/c32665564.lua b/official/c32665564.lua new file mode 100644 index 0000000000..f860d7103f --- /dev/null +++ b/official/c32665564.lua @@ -0,0 +1,81 @@ +--零王の契約書 +--Dark Contract with the Zero King +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Destroy 1 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Take 1000 damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_DD} +function s.desfilter(c,tp) + return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except "D/D" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c33171768.lua b/official/c33171768.lua new file mode 100644 index 0000000000..205074e3c5 --- /dev/null +++ b/official/c33171768.lua @@ -0,0 +1,78 @@ +--サイキッカー・オラクル +--Axon Kicker Oracle +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Psychic monster + 1 Synchro, Xyz, or Link Monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK)) + --After this card is Fusion Summoned, it gains 1000 ATK for each Synchro, Xyz, and Link Monster used as it material until the end of the next turn + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():FilterCount(Card.IsType,nil,TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK)) end) + c:RegisterEffect(e0) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) + e1:SetOperation(function(e) e:GetHandler():UpdateAttack(e0:GetLabel()*1000,RESETS_STANDARD_DISABLE_PHASE_END,nil,2) end) + c:RegisterEffect(e1) + --Negate an opponent's Special Summon and banish that monster(s) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_SPSUMMON) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep) return ep==1-tp and Duel.GetCurrentChain()==0 end) + e2:SetTarget(s.negsumtg) + e2:SetOperation(s.negsumop) + c:RegisterEffect(e2) + --Special Summon this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e) local c=e:GetHandler() return c:IsFusionSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end) + e3:SetCost(s.spcost) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.miracle_synchro_fusion=true +s.listed_series={SET_TELEPORT} +function s.negsumtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return eg:IsExists(Card.IsAbleToRemove,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,#eg,tp,0) +end +function s.negsumop(e,tp,eg,ep,ev,re,r,rp) + Duel.NegateSummon(eg) + Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) +end +function s.spcostfilter(c) + return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:IsAbleToRemoveAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c33781156.lua b/official/c33781156.lua new file mode 100644 index 0000000000..5d92dc2ed7 --- /dev/null +++ b/official/c33781156.lua @@ -0,0 +1,77 @@ +--鉄獣式撃滅兵争“Mouser” +--Tri-Brigade Arms Mouser +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon Procedure: 2 Beast, Beast-Warrior, and/or Winged Beast monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACES_BEAST_BWARRIOR_WINGB),2,2) + --Send 2 "Tri-Brigade" cards with different names from your Deck and/or Extra Deck to the GY, except "Tri-Brigade Arms Mouser" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --Change 1 face-up monster on the field to face-down Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION) + 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:SetTarget(s.postg) + e2:SetOperation(s.posop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_TRI_BRIGADE} +function s.tgfilter(c) + return c:IsSetCard(SET_TRI_BRIGADE) and not c:IsCode(id) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil) + return #g>=2 and g:GetClassCount(Card.GetCode)>=2 + end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_TOGRAVE) + if #sg==2 then + Duel.SendtoGrave(sg,REASON_EFFECT) + end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Beast, Beast-Warrior, or Winged Beast monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACES_BEAST_BWARRIOR_WINGB) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACES_BEAST_BWARRIOR_WINGB) end) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsMonster() then + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c33955120.lua b/official/c33955120.lua new file mode 100644 index 0000000000..ca44dc58e4 --- /dev/null +++ b/official/c33955120.lua @@ -0,0 +1,90 @@ +--黒薔薇と荊棘の魔女 +--Hate Rose Witch +--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) + --Plant monsters you control cannot be destroyed by card effects + 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:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PLANT)) + e1:SetValue(1) + c:RegisterEffect(e1) + --Send up to 2 Plant monsters to the GY (1 from your Deck and/or 1 from your Extra Deck) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) + --Special Summon this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.tgfilter(c) + return c:IsRace(RACE_PLANT) 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|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil) + if #g>0 then + local tg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.dpcheck(Card.GetLocation),1,tp,HINTMSG_TOGRAVE) + if #tg>0 then + Duel.SendtoGrave(tg,REASON_EFFECT) + end + end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end +function s.spconfilter(c) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil) and not eg:IsContains(e:GetHandler()) +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/c36849933.lua b/official/c36849933.lua index 4d19417b92..b35510b798 100644 --- a/official/c36849933.lua +++ b/official/c36849933.lua @@ -28,11 +28,11 @@ function s.initial_effect(c) e2:SetCondition(function() return Duel.IsMainPhase() end) e2:SetTarget(Ritual.Target(ritual_params)) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) then - Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) - end - end) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) then + Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) + end + end) c:RegisterEffect(e2) end s.listed_series={SET_MEGALITH} diff --git a/official/c40725446.lua b/official/c40725446.lua new file mode 100644 index 0000000000..34770c3d24 --- /dev/null +++ b/official/c40725446.lua @@ -0,0 +1,81 @@ +--熒焅聖 アレクゥス +--Arequus the Shining Mars Saint +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If you control a face-up card in your Spell & Trap Zone, 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) + --Destroy both 1 face-up Spell/Trap you control and this card, then draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Attach this card to 1 Xyz Monster you control + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.attachtg) + e3:SetOperation(s.attachop) + c:RegisterEffect(e3) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_STZONE,0,1,nil) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsSpellTrap() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsPlayerCanDraw(tp,1) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+e:GetHandler(),2,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +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 tc:IsRelateToEffect(e) and Duel.Destroy(Group.FromCards(c,tc),REASON_EFFECT)==2 + and Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end +end +function s.attachfilter(c,mc,tp) + return c:IsType(TYPE_XYZ) and c:IsFaceup() and mc: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.attachfilter(chkc,c,tp) end + if chk==0 then return Duel.IsExistingTarget(s.attachfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.attachfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp) + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +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) + end +end \ No newline at end of file diff --git a/official/c42091632.lua b/official/c42091632.lua new file mode 100644 index 0000000000..303efa3ca0 --- /dev/null +++ b/official/c42091632.lua @@ -0,0 +1,69 @@ +--命王の螺旋 +--Dominus Spiral +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If your opponent activated a monster effect in the hand or GY this turn, you can activate this card from your hand + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) + e0:SetCondition(function(e) return Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 end) + c:RegisterEffect(e0) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) + --Return 1 monster your opponent controls to the hand/Extra Deck, then if you have no Traps in your GY, they can Special Summon 1 monster from their GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.chainfilter(re,tp,cid) + return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) 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.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) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) + and not Duel.IsExistingMatchingCard(Card.IsTrap,tp,LOCATION_GRAVE,0,1,nil) + and Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,1-tp) + and Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(1-tp,s.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,1-tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,1-tp,1-tp,false,false,POS_FACEUP) + end + end + if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()==1 then + --If you activated this card from your hand, you cannot activate the effects of LIGHT and DARK monsters for the rest of this Duel + 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():IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) end) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/official/c44293356.lua b/official/c44293356.lua new file mode 100644 index 0000000000..1a3ba0d95c --- /dev/null +++ b/official/c44293356.lua @@ -0,0 +1,88 @@ +--メガリス・ノートラ・プルーラ +--Megalith Nortra Phulra +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeRitualSummoned() + --Apply a "this turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects" effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) + e1:SetCost(Cost.SelfReveal) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Negate the activation of an opponent's card or effect, and if you do, destroy that card, then if that effect targeted a card(s) on the field, you can Tribute 1 monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_RELEASE) + 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(function(e,tp,eg,ep,ev) return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +s.mat_filter=Card.IsRitualMonster +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() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --This turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAINING) + e1:SetOperation(s.inactop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.inactop(e,tp,eg,ep,ev,re,r,rp) + if ep==1-tp then return end + local trig_typ,trig_setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) + if trig_typ&(TYPE_RITUAL|TYPE_MONSTER)~=(TYPE_RITUAL|TYPE_MONSTER) then return end + for _,setcode in ipairs(trig_setcodes) do + if (SET_MEGALITH&0xfff)==(setcode&0xfff) and (SET_MEGALITH&setcode)==SET_MEGALITH then + return Duel.SetChainLimit(function(e,rp,tp) return rp==tp end) + end + end +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 + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + if tg and tg:IsExists(Card.IsOnField,1,nil) then + e:SetLabel(100) + Duel.SetPossibleOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) + else + e:SetLabel(0) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) then + if re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end + if e:GetLabel()==100 and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Release(g,REASON_EFFECT) + end + end + end +end diff --git a/official/c45016904.lua b/official/c45016904.lua new file mode 100644 index 0000000000..7b7c097f8b --- /dev/null +++ b/official/c45016904.lua @@ -0,0 +1,50 @@ +--陰陽師 タオタオ +--Taotao the Chanter +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon 1 Level 3 or higher Illusion monster from your hand or GY, or, if you took 2000 or more damage, you can Special Summon it from your Deck or Extra Deck instead + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetRange(LOCATION_MZONE) + e2:SetCode(EVENT_DAMAGE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==tp and r&(REASON_BATTLE|REASON_EFFECT)>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.spfilter(c,e,tp,mmz_chk) + if not (c:IsLevelAbove(3) and c:IsRace(RACE_ILLUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + local is_in_extra_deck=c:IsLocation(LOCATION_EXTRA) + return (not is_in_extra_deck and mmz_chk) or (is_in_extra_deck and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local extra_locations=ev>=2000 and LOCATION_DECK|LOCATION_EXTRA or 0 + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|extra_locations,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|extra_locations) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local extra_locations=ev>=2000 and LOCATION_DECK|LOCATION_EXTRA or 0 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|extra_locations,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)) + 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/c46148485.lua b/official/c46148485.lua new file mode 100644 index 0000000000..21702bf1c7 --- /dev/null +++ b/official/c46148485.lua @@ -0,0 +1,102 @@ +--転輪のスフィンクス +--Chakravartin Sphinx +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Return 1 card on the field to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_CHANGE_POS) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(s.rthcon) + e1:SetTarget(s.rthtg) + e1:SetOperation(s.rthop) + c:RegisterEffect(e1) + --Special Summon this card from your hand or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_CHANGE_POS) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.spcon) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Set 1 "Book of Taiyou" and/or 1 "Book of Moon" from your Deck and/or GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_names={38699854,14087893} --"Book of Taiyou", "Book of Moon" +function s.posconfilter(c) + return (c:IsPosition(POS_ATTACK) and c:IsPreviousPosition(POS_DEFENSE)) or (c:IsPosition(POS_DEFENSE) and c:IsPreviousPosition(POS_ATTACK)) +end +function s.rthcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.posconfilter,1,e:GetHandler()) +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.rthop(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.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.posconfilter,1,nil) +end +function s.spcostfilter(c) + return c:IsSpell() and c:IsAbleToRemoveAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.setfilter(c) + return c:IsCode(38699854,14087893) 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|LOCATION_GRAVE,0,1,nil) end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,math.min(ft,2),aux.dncheck,1,tp,HINTMSG_SET) + if #sg>0 then + Duel.SSet(tp,sg) + end +end \ No newline at end of file diff --git a/official/c47082621.lua b/official/c47082621.lua new file mode 100644 index 0000000000..90bccc8fa6 --- /dev/null +++ b/official/c47082621.lua @@ -0,0 +1,81 @@ +--葬世の神 デーヴァリーム +--Regenesis Demiurge +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your GY) by banishing 2 monsters from your GY with 2500 ATK or DEF + 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_GRAVE) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Return cards in your opponent's field and/or GY up to the number of your banished monsters with 2500 ATK or DEF to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + 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:SetTarget(s.rthtg) + e1:SetOperation(s.rthop) + c:RegisterEffect(e1) + --Monsters your opponent controls lose 2500 ATK during the Battle Phase only + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,LOCATION_MZONE) + e2:SetCondition(function() return Duel.IsBattlePhase() end) + e2:SetValue(-2500) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.selfspconfilter(c) + return (c:IsAttack(2500) or c:IsDefense(2500)) and c:IsFaceup() and c:IsAbleToRemoveAsCost() + and aux.SpElimFilter(c,true) +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|LOCATION_GRAVE,0,c) + return #g>=2 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|LOCATION_GRAVE,0,c) + local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) + if #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.rthctfilter(c) + return (c:IsAttack(2500) or c:IsDefense(2500)) and c:IsFaceup() +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToHand() end + local ct=Duel.GetMatchingGroupCount(s.rthctfilter,tp,LOCATION_REMOVED,0,nil) + if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) +end +function s.rthop(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/c47960073.lua b/official/c47960073.lua new file mode 100644 index 0000000000..21cf91af8d --- /dev/null +++ b/official/c47960073.lua @@ -0,0 +1,88 @@ +--K9-04号 咒 +--K9-04 Noroi +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(s.ntcon) + c:RegisterEffect(e1) + --Special Summon 1 non-Machine "K9" monster from your Deck, but you cannot Special Summon from the Extra Deck, except "K9" monsters, while you control that face-up monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Look at your opponent's hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(s.lookcost) + e3:SetTarget(s.looktg) + e3:SetOperation(s.lookop) + c:RegisterEffect(e3) +end +s.listed_series={SET_K9} +function s.ntcon(e,c,minc) + if c==nil then return true end + local tp=c:GetControler() + return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 +end +function s.spfilter(c,e,tp) + return not c:IsRace(RACE_MACHINE) and c:IsSetCard(SET_K9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + --You cannot Special Summon from the Extra Deck while you control that face-up monster, except "K9" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_K9) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end +end +function s.lookcostfilter(c) + return c:IsSetCard(SET_K9) and c:IsFaceup() and c:IsAbleToGraveAsCost() +end +function s.lookcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.lookcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.lookcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_HAND,1,nil) end +end +function s.lookop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_HAND,nil) + if #g>0 then + Duel.ConfirmCards(tp,g) + Duel.ShuffleHand(1-tp) + end +end \ No newline at end of file diff --git a/official/c53813120.lua b/official/c53813120.lua new file mode 100644 index 0000000000..565395848d --- /dev/null +++ b/official/c53813120.lua @@ -0,0 +1,122 @@ +--絢嵐たる権能 +--Magnifistorming Sovereign Tyranny +--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) + --Apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Negate the effects 1 face-up card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Set this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,id) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tdfilter(c,e) + return c:IsQuickPlaySpell() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) + and #g>=3 and g:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) + end + local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,0,tp,300) + Duel.SetPossibleOperationInfo(0,CATEGORY_DEFCHANGE,nil,0,tp,300) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local break_chk=false + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + break_chk=true + Duel.ShuffleDeck(tp) + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + if break_chk then Duel.BreakEffect() end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) + --WIND monsters you control will gain 300 ATK/DEF 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:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetValue(300) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + Duel.RegisterEffect(e2,tp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and c:IsControler(1-tp) and chkc:IsNegatable() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Negate its effects + tc:NegateEffects(e:GetHandler(),nil,true) + 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 + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end diff --git a/official/c53927851.lua b/official/c53927851.lua new file mode 100644 index 0000000000..edee6484a5 --- /dev/null +++ b/official/c53927851.lua @@ -0,0 +1,69 @@ +--絢嵐渦麗ヴァルルーン +--Magnifistorm Vortex Beauty Valrune +--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_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate a monster effect activated by the opponent, then if you have 2 or more "Mystical Space Typhoon" in your GY, you can destroy that monster. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.discon) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Special Summon this card from your GY if "Mystical Space Typhoon" is activated + local e3=e1:Clone() + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +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.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) +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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable() + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,CARD_MYSTICAL_SPACE_TYPHOON) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c54143349.lua b/official/c54143349.lua new file mode 100644 index 0000000000..8abade161a --- /dev/null +++ b/official/c54143349.lua @@ -0,0 +1,54 @@ +--絢嵐たるエルダム +--Magnifistorming Erdam +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, 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.selfspcon) + c:RegisterEffect(e1) + --Add 1 "Magnifistorm" monster or 1 "Mystical Space Typhoon" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON,id} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) 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/c54265980.lua b/official/c54265980.lua new file mode 100644 index 0000000000..c73298c972 --- /dev/null +++ b/official/c54265980.lua @@ -0,0 +1,72 @@ +--終刻竜機Ⅶ-エララ +--Doom-Z Seven - Elara +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Set 1 "Doom-Z" Spell/Trap directly from your Deck + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.settg) + e1a:SetOperation(s.setop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EVENT_DESTROYED) + e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + c:RegisterEffect(e1c) + --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.setfilter(c) + return c:IsSetCard(SET_DOOM_Z) 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 +function s.spfilter(c,e,tp,lv,mc) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) + and mc:GetEquipGroup():FilterCount(Card.IsCanBeXyzMaterial,nil,c,tp,REASON_EFFECT)==mc:GetEquipCount() + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),c) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel(),c):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + Duel.Overlay(sc,c+c:GetEquipGroup(),true) + end +end \ No newline at end of file diff --git a/official/c54936778.lua b/official/c54936778.lua new file mode 100644 index 0000000000..a30b3256ec --- /dev/null +++ b/official/c54936778.lua @@ -0,0 +1,95 @@ +--異次元の契約書 +--Dark Contract with the Different Dimension +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Take 1000 damage + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Banish 1 card in your opponent's field or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCost(s.rmcost) + e2:SetTarget(s.rmtg) + e2:SetOperation(s.rmop) + c:RegisterEffect(e2) + --Gain 500 LP + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_RECOVER) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.lptg) + e3:SetOperation(s.lpop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT} +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end +function s.rmcostfilter(c) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() +end +function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end +function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then + Duel.BreakEffect() + Duel.Recover(p,500,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c55088578.lua b/official/c55088578.lua new file mode 100644 index 0000000000..32c0a8dd1e --- /dev/null +++ b/official/c55088578.lua @@ -0,0 +1,69 @@ +--オノマトカゲ +--Onomatokage +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --This card is always treated as a "Zubaba" card (required due to current cdb limitations) + c:AddSetcodesRule(id,true,SET_ZUBABA) + --Special Summon this card, but banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Return up to 2 Xyz Monsters from your GY to the Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOEXTRA) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.textg) + e2:SetOperation(s.texop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}),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) 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.texfilter(c) + return c:IsType(TYPE_XYZ) and c:IsAbleToExtra() +end +function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.texfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE) +end +function s.texop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.texfilter,tp,LOCATION_GRAVE,0,1,2,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c55158350.lua b/official/c55158350.lua new file mode 100644 index 0000000000..bb2bcb5fec --- /dev/null +++ b/official/c55158350.lua @@ -0,0 +1,78 @@ +--融合募兵 +--Fusion Recruitment +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 1 of the Fusion Materials whose name is mentioned on the revealed monster from your Deck or GY to your hand, except the discarded card, then if you added a Normal Monster, you can add a second such monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.revealfilter(c,tp,cost_card) + return c:IsFusionMonster() and not c:IsPublic() and c.material + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,cost_card,c.material) +end +function s.thfilter(c,codes) + return c:IsCode(codes) and c:IsAbleToHand() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) + and Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) + local cost_card=Duel.GetOperatedGroup():GetFirst() + e:SetLabelObject(cost_card) + cost_card:CreateEffectRelation(e) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local reveal_card=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp,cost_card):GetFirst() + Duel.ConfirmCards(1-tp,reveal_card) + Duel.ShuffleExtra(tp) + e:SetLabel(table.unpack(reveal_card.material)) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local cost_chk=e:GetLabel()==-100 + e:SetLabel(0) + return cost_chk + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local codes={e:GetLabel()} + local cost_card=e:GetLabelObject() + local exc=cost_card:IsRelateToEffect(e) and cost_card or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,exc,codes):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) + if sc:IsType(TYPE_NORMAL) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,exc,codes) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,exc,codes) + if #g>0 then + Duel.BreakEffect() + 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 from the Extra Deck for the rest of this turn after this card resolves, except Fusion 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 c:IsLocation(LOCATION_EXTRA) and not c:IsFusionMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c56870908.lua b/official/c56870908.lua new file mode 100644 index 0000000000..05634eafef --- /dev/null +++ b/official/c56870908.lua @@ -0,0 +1,129 @@ +--Yum☆Yum☆ヤミーズ +--Yum☆Yum☆Yummys +--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) + --Each time 2 or more "Yummy" monsters are Special Summoned to your field at the same time, gain 500 LP, and if you do, your opponent pays 500 LP + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_SZONE) + e1:SetCondition(s.lpcon) + e1:SetOperation(s.lpop) + c:RegisterEffect(e1) + --Send 2 face-up monsters, including "Yummy★Snatchy", from the field to the GY, and if you do, Special Summon 1 "Yummy" Synchro Monster from your Extra Deck (this is treated as a Synchro Summon) + 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,id) + e2:SetCost(Cost.PayLP(500)) + e2:SetTarget(s.syncsptg) + e2:SetOperation(s.syncspop) + c:RegisterEffect(e2) + --Immediately after this effect resolves, Link Summon 1 "Yummy" Link Monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_SZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e3:SetCost(Cost.PayLP(100)) + e3:SetTarget(s.linksptg) + e3:SetOperation(s.linkspop) + c:RegisterEffect(e3) +end +s.listed_series={SET_YUMMY} +s.listed_names={30581601} --"Yummy★Snatchy" +function s.lpconfilter(c,tp) + return c:IsSetCard(SET_YUMMY) and c:IsFaceup() and c:IsControler(tp) +end +function s.lpcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.lpconfilter,2,nil,tp) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.IsChainSolving() then + Duel.Hint(HINT_CARD,0,id) + if Duel.Recover(tp,500,REASON_EFFECT)>0 then + Duel.PayLPCost(1-tp,500) + end + else + --Gain 500 LP, and if you do, your opponent pays 500 LP (at the end of the current Chain Link) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVED) + e1:SetRange(LOCATION_SZONE) + e1:SetOperation(function(e,tp) + Duel.Hint(HINT_CARD,0,id) + if Duel.Recover(tp,500,REASON_EFFECT)>0 then + Duel.PayLPCost(1-tp,500) + end + end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) + c:RegisterEffect(e1) + --Reset "e1" at the end of the Chain Link + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVED) + e2:SetOperation(function() e1:Reset() end) + e2:SetReset(RESET_CHAIN) + Duel.RegisterEffect(e2,tp) + end +end +function s.tgfilter(c,e) + return c:IsFaceup() and c:IsCanBeEffectTarget(e) and c:IsAbleToGrave() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsCode,1,nil,30581601) and Duel.IsExistingMatchingCard(s.syncfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg) +end +function s.syncfilter(c,e,tp,sg) + local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) + return #pg<=0 and c:IsSetCard(SET_YUMMY) and c:IsSynchroMonster() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) + and Duel.GetLocationCountFromEx(tp,tp,sg,c)>0 +end +function s.syncsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TOGRAVE) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,2,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.syncspop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==2 and Duel.SendtoGrave(tg,REASON_EFFECT)==2 and tg:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.syncfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end + end +end +function s.linkfilter(c) + return c:IsSetCard(SET_YUMMY) and c:IsLinkSummonable() +end +function s.linksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.linkfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.linkspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.linkfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc then + Duel.LinkSummon(tp,sc) + end +end \ No newline at end of file diff --git a/official/c58205203.lua b/official/c58205203.lua new file mode 100644 index 0000000000..f75b63e7e1 --- /dev/null +++ b/official/c58205203.lua @@ -0,0 +1,96 @@ +--真竜凰騎マリアムネP +--Mariamne Paradox, the True Dracophoenix Knight +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --To Tribute Summon this card face-up, you can Tribute a Continuous Spell/Trap you control, instead of a monster + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_ADD_EXTRA_TRIBUTE) + e0:SetTargetRange(LOCATION_SZONE,0) + e0:SetTarget(aux.TargetBoolFunction(Card.IsContinuousSpellTrap)) + e0:SetValue(POS_FACEUP) + c:RegisterEffect(e0) + --Destroy 1 other "True Draco" or "True King" card in your hand or face-up field, and if you do, Special Summon this card to either field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Banish the top 4 cards of your Deck + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_REMOVE) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND) end) + e2a:SetTarget(s.rmtg) + e2a:SetOperation(s.rmop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_TRUE_DRACO_KING} +function s.desfilter(c,e,tp,hc,resolution_chk) + return c:IsSetCard(SET_TRUE_DRACO_KING) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + and (resolution_chk or s.spcheck(c,e,tp,hc)) +end +function s.spcheck(c,e,tp,hc) + local ctrl=c:GetControler() + return (Duel.GetMZoneCount(ctrl,c,tp)>0 and hc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,ctrl)) + or (Duel.GetMZoneCount(1-ctrl,nil,tp)>0 and hc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-ctrl)) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local oppo_location=Duel.IsPlayerAffectedByEffect(tp,88581108) and LOCATION_MZONE or 0 + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,oppo_location,c,e,tp,c,false) + if chk==0 then return #g>0 end + if not g:IsExists(Card.IsOnField,1,nil) or ((Duel.GetMZoneCount(tp)>0 or Duel.GetMZoneCount(1-tp)>0) + and (Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,LOCATION_HAND,0,1,c) + or g:IsExists(aux.FaceupFilter(Card.IsLocation,LOCATION_HAND),1,nil))) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) + else + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + 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() + local relation_chk=c:IsRelateToEffect(e) + local exc=relation_chk and c or nil + local oppo_location=Duel.IsPlayerAffectedByEffect(tp,88581108) and LOCATION_MZONE or 0 + local resolution_chk=not (relation_chk and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,oppo_location,1,exc,e,tp,c,false)) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,oppo_location,1,1,exc,e,tp,c,resolution_chk):GetFirst() + if not sc then return end + if sc:IsOnField() then Duel.HintSelection(sc) end + if Duel.Destroy(sc,REASON_EFFECT)>0 and relation_chk then + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) + if not (b1 or b2) then return end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + local target_player=op==1 and tp or 1-tp + Duel.SpecialSummon(c,0,tp,target_player,false,false,POS_FACEUP) + end +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetDecktopGroup(tp,4) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetDecktopGroup(tp,4) + if #g>0 then + Duel.DisableShuffleCheck() + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c5848934.lua b/official/c5848934.lua new file mode 100644 index 0000000000..eb5b34e36e --- /dev/null +++ b/official/c5848934.lua @@ -0,0 +1,65 @@ +--静寂のサイコソーサレス +--Serene Psychic Sorceress +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Set 1 "Teleport" Normal or Quick-Play Spell from your Deck, GY, or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetCost(Cost.PayLP(1000)) + e1:SetTarget(s.settg) + e1:SetOperation(s.setop) + c:RegisterEffect(e1) + --Return 1 card 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_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) local c=e:GetHandler() return c:IsSynchroSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) + c:RegisterEffect(e2) +end +s.listed_series={SET_TELEPORT} +function s.setfilter(c) + return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) 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,LOCATION_GRAVE) +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 +function s.target2con(c) + return c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_FUSION|TYPE_SYNCHRO) and c:IsFaceup() +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end + local ct=Duel.IsExistingMatchingCard(s.target2con,tp,LOCATION_MZONE,0,1,nil) and 2 or 1 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) +end +function s.rthop(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/c6260560.lua b/official/c6260560.lua new file mode 100644 index 0000000000..c78b29c400 --- /dev/null +++ b/official/c6260560.lua @@ -0,0 +1,72 @@ +--炎魔刃レーヴァテイン +--Laevateinn the Burning Blade +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon Procedure: 2 FIRE monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE),2) + --Special Summon 1 FIRE monster from your GY with the same original Type but a lower original Level than the Tributed FIRE monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If a face-down card(s) in your Spell & Trap Zone would be destroyed by an opponent's card effect, you can banish this card you control 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()) end) + e2:SetOperation(function(e) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end) + c:RegisterEffect(e2) +end +function s.spcostfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_FIRE) and c:HasLevel() and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalRace(),c:GetOriginalLevel()) +end +function s.spfilter(c,e,tp,race,lv) + return c:IsAttribute(ATTRIBUTE_FIRE) and c:HasLevel() and c:IsOriginalRace(race) and c:GetOriginalLevel()0 then + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) + --All monsters they control lose 600 ATK + g:ForEach(function(tc) tc:UpdateAttack(-600,nil,c) end) + end +end +function s.exspfilter(c,e,tp,mc) + return c:IsCode(CARD_BLACK_ROSE_DRAGON) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.exsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.exspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end +end +function s.gyspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_TUNER) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.gyspop(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.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c66092596.lua b/official/c66092596.lua new file mode 100644 index 0000000000..a005e73d9d --- /dev/null +++ b/official/c66092596.lua @@ -0,0 +1,97 @@ +--竜呼双搏 +--Draco Stand-off +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can add 1 "True Draco" or "True King" monster, or 1 "Dracoslayer" or "Dracoverlord" Pendulum 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_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Place 1 of your destroyed "True Draco" or "True King" monsters in your Spell & Trap Zone as a Continuous Spell + 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+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.pltg) + e2:SetOperation(s.plop) + e2:SetLabelObject(Group.CreateGroup()) + c:RegisterEffect(e2) + --Keep track of the destroyed monsters + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_SZONE) + e3:SetLabelObject(e2) + e3:SetOperation(s.regop) + c:RegisterEffect(e3) +end +s.listed_series={SET_TRUE_DRACO_KING,SET_DRACOSLAYER,SET_DRACOVERLORD} +function s.thfilter(c) + return ((c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsMonster()) or (c:IsSetCard({SET_DRACOSLAYER,SET_DRACOVERLORD}) and c:IsPendulumMonster())) 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 sc=g:Select(tp,1,1,nil):GetFirst() + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + end + end +end +function s.plfilter(c,e,tp) + return c:IsPreviousSetCard(SET_TRUE_DRACO_KING) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) + and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) + and c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsCanBeEffectTarget(e) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.plfilter,nil,e,tp) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=e:GetLabelObject():Filter(s.plfilter,nil,e,tp) + if chkc then return g:IsContains(chkc) and s.plfilter(chkc,e,tp) end + if chk==0 then return #g>0 end + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then + --Treated as a Continuous Spell + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c66100116.lua b/official/c66100116.lua new file mode 100644 index 0000000000..7f166ce6cb --- /dev/null +++ b/official/c66100116.lua @@ -0,0 +1,77 @@ +--バイオレンス・ウィッチ +--Violence Witch +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_ONFIELD,0,1,nil) end) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Special Summon 1 Plant monster with 1500 or less DEF from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.Discard()) + e2:SetTarget(s.decksptg) + e2:SetOperation(s.deckspop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_BLACK_ROSE_DRAGON} +function s.selfspconfilter(c) + return (c:IsCode(CARD_BLACK_ROSE_DRAGON) or ((c:ListsCode(CARD_BLACK_ROSE_DRAGON) and c:IsMonster()) or (c:IsRace(RACE_PLANT) and c:IsSynchroMonster()))) + and c:IsFaceup() +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.deckspfilter(c,e,tp) + return c:IsRace(RACE_PLANT) and c:IsDefenseBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSynchroMonster),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.deckspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end \ No newline at end of file diff --git a/official/c67115133.lua b/official/c67115133.lua new file mode 100644 index 0000000000..60275297c2 --- /dev/null +++ b/official/c67115133.lua @@ -0,0 +1,86 @@ +--絢嵐たる献詠 +--Magnifistorming Stanza Tribute +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + 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_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.thfilter1(c) + return c:IsLevelBelow(4) and c:IsSetCard(SET_MAGNIFISTORM) and c:IsAbleToHand() +end +function s.thfilter2(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Add 1 Level 4 or lower "Magnifistorm" monster from your Deck to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),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 +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 + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end diff --git a/official/c67322708.lua b/official/c67322708.lua new file mode 100644 index 0000000000..aef09c86fb --- /dev/null +++ b/official/c67322708.lua @@ -0,0 +1,78 @@ +--DDランス・ソルジャー +--D/D Lance Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.lvtg) + e1:SetOperation(s.lvop) + c:RegisterEffect(e1) + --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.lvfilter(c) + return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if ct==0 then return end + local lv=Duel.AnnounceLevel(tp,1,ct) + if lv then + tc:UpdateLevel(lv,nil,e:GetHandler()) + end +end +function s.desfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) + and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/official/c67515699.lua b/official/c67515699.lua new file mode 100644 index 0000000000..4457917691 --- /dev/null +++ b/official/c67515699.lua @@ -0,0 +1,64 @@ +--K9-666号 “Jacks” +--K9-666 "Jacks" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 5 monsters + Xyz.AddProcedure(c,nil,5,2) + --Destroy 1 monster on the field + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DESTROY) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SPSUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1a:SetCost(Cost.DetachFromSelf(1)) + e1a:SetTarget(s.destg) + e1a:SetOperation(s.desop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1b:SetCode(EVENT_CHAINING) + e1b:SetRange(LOCATION_MZONE) + e1b:SetCondition(s.descon) + c:RegisterEffect(e1b) + --A "K9" Xyz Monster that has this card as material gains this effect: ● During any turn in which your opponent has activated a monster effect in the hand or GY, any battle damage this card inflicts to your opponent is doubled + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_XMATERIAL) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.doubledamcon) + e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) + c:RegisterEffect(e2) + --Keep track of monster effects activated in the hand or GY + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) +end +s.listed_series={SET_K9} +function s.chainfilter(re,tp,cid) + return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp,chk) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_HAND|LOCATION_GRAVE)>0 +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) and tc:IsMonster() then + Duel.Destroy(tc,REASON_EFFECT) + end +end +function s.doubledamcon(e) + local c=e:GetHandler() + return c:IsSetCard(SET_K9) and c:IsXyzMonster() and Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 +end \ No newline at end of file diff --git a/official/c68231287.lua b/official/c68231287.lua new file mode 100644 index 0000000000..e28d6cfd0a --- /dev/null +++ b/official/c68231287.lua @@ -0,0 +1,95 @@ +--壊獄神ユピテル +--Jupiter the Power Patron of Destruction +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 10 monsters + Xyz.AddProcedure(c,nil,10,3,function(c) return c:GetEquipCount()>=3 end,aux.Stringid(id,0),3,s.altprocop) + --You can equip any number of appropriate Equip Spells from your GY to this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(s.eqtg) + e1:SetOperation(s.eqop) + c:RegisterEffect(e1) + --Gains 3000 ATK while it has an Xyz Monster as material + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) end) + e2:SetValue(3000) + c:RegisterEffect(e2) + --Special Summon 1 "Doom-Z" monster from your GY, then you can destroy 1 card on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCost(Cost.DetachFromSelf(1)) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={id} +s.listed_series={SET_DOOM_Z} +function s.altprocop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.eqfilter(c,tp,ec) + return c:IsEquipSpell() and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_GRAVE) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFacedown() or not c:IsRelateToEffect(e) then return end + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft==0 then return end + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,nil,tp,c) + if #g==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local sg=g:Select(tp,1,math.min(ft,#g),nil) + if #sg>0 then + for tc in sg:Iter() do + Duel.Equip(tp,tc,c,true,true) + end + Duel.EquipComplete() + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DOOM_Z) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end diff --git a/official/c68831625.lua b/official/c68831625.lua new file mode 100644 index 0000000000..594519672c --- /dev/null +++ b/official/c68831625.lua @@ -0,0 +1,115 @@ +--終刻起動『D.O.O.M.D.U.R.G.』 +--Doom-Z Command "D.O.O.M.D.U.R.G" +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + aux.AddEquipProcedure(c) + --Inflict 500 damage to the equipped monster's controller during the Standby Phase + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Your opponent cannot target this card with card effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetValue(aux.tgoval) + --Destroy 1 other face-up card you control, also this card gains ATK equal to its own Level/Rank x 100, it can attack directly and if it battles destroy it at the end of the Damage Step + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCondition(aux.StatChangeDamageStepCondition) + e3:SetTarget(s.desatktg) + e3:SetOperation(s.desatkop) + --Grant the above effects to a "Doom-Z" monster equipped with this card + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) + e4:SetRange(LOCATION_SZONE) + e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e4:SetTarget(function(e,c) return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(SET_DOOM_Z) end) + e4:SetLabelObject(e2) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetLabelObject(e3) + c:RegisterEffect(e5) + --Grant the above protection effect (e2) to a WIND Machine Xyz Monster that has it as material + local e6=e2:Clone() + e6:SetType(EFFECT_TYPE_XMATERIAL) + e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e6:SetRange(LOCATION_MZONE) + c:RegisterEffect(e6) + --Grant the above destruction+atk change effect (e3) to a WIND Machine Xyz Monster that has it as material + local e7=e3:Clone() + e7:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) + e7:SetRange(LOCATION_MZONE) + e7:SetCondition(function(e) local c=e:GetHandler() return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) end) + c:RegisterEffect(e7) +end +s.listed_series={SET_DOOM_Z} +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local p=e:GetHandler():GetEquipTarget():GetControler() + Duel.SetTargetPlayer(p) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,1,p,500) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + Duel.Damage(e:GetHandler():GetEquipTarget():GetControler(),500,REASON_EFFECT) +end +function s.desatktg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local dg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,c) + if chk==0 then return #dg>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) + local atk=(c:HasLevel() and c:GetLevel() or c:GetRank())*100 + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,atk) +end +function s.desatkop(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_DESTROY) + local desg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,exc) + if #desg==0 then return end + Duel.HintSelection(desg) + if Duel.Destroy(desg,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + if c:IsFaceup() then + local atk=(c:HasLevel() and c:GetLevel() or c:GetRank())*100 + --This card gains ATK equal to its own Level/Rank x 100 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(atk) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end + --It can attack directly + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e2) + --If it battles, destroy it at the end of the Damage Step + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_DAMAGE_STEP_END) + e3:SetCondition(function(e) return e:GetHandler():IsRelateToBattle() end) + e3:SetOperation(function(e) Duel.Hint(HINT_CARD,0,c:GetOriginalCodeRule()) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end) + e3:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e3) + end +end \ No newline at end of file diff --git a/official/c69053263.lua b/official/c69053263.lua new file mode 100644 index 0000000000..eb82a866af --- /dev/null +++ b/official/c69053263.lua @@ -0,0 +1,72 @@ +--黒薔薇の華園 +--Black Rose Garden +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can add 1 "Rose Dragon" 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) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Face-up monsters on the field become Plant monsters + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CHANGE_RACE) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetValue(RACE_PLANT) + c:RegisterEffect(e2) + --Inflict 100 damage to your opponent for each Plant monster in your GY and banishment, then if this card was destroyed by the effect of "Black Rose Dragon", inflict 2400 damage to your opponent + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DAMAGE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.damtg) + e3:SetOperation(s.damop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ROSE_DRAGON} +s.listed_names={CARD_BLACK_ROSE_DRAGON} +function s.thfilter(c) + return c:IsSetCard(SET_ROSE_DRAGON) and c:IsMonster() and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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) + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=100*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) + if e:GetHandler():IsReason(REASON_EFFECT) and re:GetHandler():IsCode(CARD_BLACK_ROSE_DRAGON) then + e:SetLabel(1) + if dam>0 then dam=dam+2400 end + else + e:SetLabel(0) + end + Duel.SetTargetPlayer(1-tp) + if dam>0 then + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + local dam=100*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) + if dam>0 and Duel.Damage(p,dam,REASON_EFFECT)>0 and e:GetLabel()==1 then + Duel.BreakEffect() + Duel.Damage(p,2400,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c69176851.lua b/official/c69176851.lua new file mode 100644 index 0000000000..7a6bffd757 --- /dev/null +++ b/official/c69176851.lua @@ -0,0 +1,104 @@ +--瘴煙の死霊術師 +--Miasma Necromancer +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters, including a DARK Spellcaster monster + Link.AddProcedure(c,nil,2,2,s.matcheck) + --Add 1 Level 5 or higher DARK Spellcaster monster from your GY 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) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Normal Summon 1 Spellcaster monster + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SUMMON) + e2a:SetType(EFFECT_TYPE_IGNITION) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCost(s.sumcost) + e2a:SetTarget(s.sumtg) + e2a:SetOperation(s.sumop) + c:RegisterEffect(e2a) + --Workaround so that the card to be sent as cost for "e2a" isn't considered for the potential Tributes (same as "Ancient Gear Commander" [27483935]) + --"e2a" currently won't work when trying to summon a monster without Tributes while all the player's MMZs are full + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD) + e2b:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e2b:SetCode(EFFECT_UNRELEASABLE_SUM) + e2b:SetRange(LOCATION_MZONE) + e2b:SetTargetRange(LOCATION_MZONE,0) + e2b:SetTarget(function(e,c) return c==e:GetLabelObject() end) + e2b:SetValue(1) + c:RegisterEffect(e2b) + e2a:SetLabelObject(e2b) +end +function s.matfilter(c,lc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_DARK,lc,sumtype,tp) and c:IsRace(RACE_SPELLCASTER,lc,sumtype,tp) +end +function s.matcheck(g,lc,sumtype,tp) + return g:IsExists(s.matfilter,1,nil,lc,sumtype,tp) +end +function s.thfilter(c) + return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + local code=sc:GetCode() + --But you cannot activate cards, or the effects of cards, with its name for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(function(e,re,tp) return re:GetHandler():IsCode(code) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.sumcostfilter(c,tp,eff) + if not (c:IsSpellTrap() and c:IsAbleToGraveAsCost()) then return false end + eff:SetLabelObject(c) + local res=Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,c) + eff:SetLabelObject(nil) + return res +end +function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) + local eff=e:GetLabelObject() + if chk==0 then return Duel.IsExistingMatchingCard(s.sumcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp,eff) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.sumcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp,eff) + Duel.SendtoGrave(g,REASON_COST) +end +function s.sumfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsSummonable(true,nil) +end +function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.sumop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end +end diff --git a/official/c69453825.lua b/official/c69453825.lua new file mode 100644 index 0000000000..8f251719c5 --- /dev/null +++ b/official/c69453825.lua @@ -0,0 +1,84 @@ +--剛鬼ドラゴン・オーガ +--Gouki Dragon Ogre +--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) + --Add 1 "Gouki" Spell from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_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.deckthtg) + e1:SetOperation(s.deckthop) + c:RegisterEffect(e1) + --Add 1 "Gouki" monster with lower ATK than a targeted EARTH monster you control from your GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.gythtg) + e2:SetOperation(s.gythop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.deckthfilter(c) + return c:IsSetCard(SET_GOUKI) 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 +function s.earthfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.gythfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack()) +end +function s.gythfilter(c,atk) + return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:GetAttack()0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --Your opponent's monsters can only target that face-up monster on your field for attacks + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/official/c70576413.lua b/official/c70576413.lua new file mode 100644 index 0000000000..927e055a1e --- /dev/null +++ b/official/c70576413.lua @@ -0,0 +1,64 @@ +--DDD創始王クロヴィス +--D/D/D Founder King Clovis +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 of your banished "D/D" monsters, or if a "Dark Contract" card is on the field, from your GY instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + 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_REMOVE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) 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) + local REMOVED_AND_OR_GRAVE=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and (LOCATION_GRAVE|LOCATION_REMOVED) or LOCATION_REMOVED + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(loc) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c71398055.lua b/official/c71398055.lua new file mode 100644 index 0000000000..d5735c5b62 --- /dev/null +++ b/official/c71398055.lua @@ -0,0 +1,171 @@ +--DDDD偉次元王アーク・クライシス +--D/D/D/D Great Dimension King Arc Crisis +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) + Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) + c:AddMustBeFusionSummoned() + --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY + Fusion.AddContactProc(c,s.contactfil,s.contactop,false,nil,1) + --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the effects of all face-up monsters your opponent currently controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Can attack all monsters your opponent controls once each + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_ATTACK_ALL) + e3:SetValue(1) + c:RegisterEffect(e3) + --Place this card in your Pendulum Zone + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e4:SetOperation(s.penop) + c:RegisterEffect(e4) +end +s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} +s.miracle_synchro_fusion=true +function s.matfilter(typ) + return function(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) + end +end +function s.contactfil(tp) + local loc=LOCATION_ONFIELD|LOCATION_GRAVE + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end + return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) +end +function s.contactop(g) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --Prevent another Fusion Summon or Special Summon by its alternate procedure of "D/D/D/D Great Dimension King Arc Crisis" that turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.desfilter(c,e,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) +end +function s.spfilter(c,e,tp,dc) + if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end + local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.rescon(mmz_ct,linkmz_ct) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct + and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if tg==0 then return end + local ct=Duel.Destroy(tg,REASON_EFFECT) + if ct==0 then return end + local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) + local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) + local ft=math.min(mmz_ct+emz_ct,ct) + if ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) + if #sg==0 then return end + local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) + local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) + local priority_0,priority_1 + if linkmz_ct=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0) +end +function s.spfilter(c,e,tp) + return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Group.FromCards(c,e:GetLabelObject()) + if g:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==2 then + Duel.ConfirmCards(1-tp,g) + end +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEDOWN_DEFENSE) end + if chk==0 then return true end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) + local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,POS_FACEDOWN_DEFENSE) + if #g>0 then + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) + end +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc and tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_ATTACK) + end +end \ No newline at end of file diff --git a/official/c72632190.lua b/official/c72632190.lua new file mode 100644 index 0000000000..7c7443095b --- /dev/null +++ b/official/c72632190.lua @@ -0,0 +1,88 @@ +--ドリ・ドル・ドラ +--Tri-Headed Behemoth +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_DESTROYED) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --During the End Phase of this turn, Special Summon 1 WIND monster from your GY, but its ATK/DEF become 1000 + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) + e2a:SetTarget(s.efftg) + e2a:SetOperation(s.effop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +function s.selfspconfilter(c,tp) + return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) + and c:IsPreviousControler(tp) +end +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.selfspconfilter,1,nil,tp) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + --During the End Phase of this turn, Special Summon 1 WIND monster from your GY, but its ATK/DEF become 1000 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_PHASE+PHASE_END) + e1:SetCountLimit(1) + e1:SetOperation(s.gyspop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.gyspfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_CARD,0,id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gyspfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Its ATK/DEF become 1000 + local e1a=Effect.CreateEffect(e:GetHandler()) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1a:SetCode(EFFECT_SET_ATTACK) + e1a:SetValue(1000) + e1a:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_SET_DEFENSE) + sc:RegisterEffect(e1b) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c73355772.lua b/official/c73355772.lua new file mode 100644 index 0000000000..610a47dc4b --- /dev/null +++ b/official/c73355772.lua @@ -0,0 +1,70 @@ +--教導の雷霆フルルドリス +--Dogmatika Fleurdelis, the Thunderous +--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_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Set 1 "Dogmatika" 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:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOGMATIKA} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,LOCATION_EXTRA) +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.setfilter(c) + return c:IsSetCard(SET_DOGMATIKA) and c:IsTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end +end +function s.actcondfilter(c) + return c:IsType(TYPE_EXTRA) and c:IsAttackAbove(2500) and c:IsFaceup() +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SSet(tp,sc)>0 then + --It can be activated this turn, while your opponent controls a Fusion, Synchro, Xyz, or Link Monster with 2500 or more ATK + 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_CLIENT_HINT) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetCondition(function() return Duel.IsExistingMatchingCard(s.actcondfilter,tp,0,LOCATION_MZONE,1,nil) end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c7382007.lua b/official/c7382007.lua new file mode 100644 index 0000000000..d341bd7ce3 --- /dev/null +++ b/official/c7382007.lua @@ -0,0 +1,74 @@ +--剛鬼シーク・オーガ +--Gouki Sheik Ogre +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 "Gouki" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) + --Special Summon any number of "Gouki" monsters from your hand with different Levels from each other + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_TO_HAND) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Fusion Summon 1 "Gouki" Fusion Monster from your Extra Deck, using monsters from your hand or field + local params={function(c) return c:IsSetCard(SET_GOUKI) end} + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(Fusion.SummonEffTG(params)) + e2:SetOperation(Fusion.SummonEffOP(params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.spconfilter(c,tp) + return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:IsPreviousLocation(LOCATION_DECK) + and c:IsControler(tp) and not c:IsReason(REASON_DRAW) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GOUKI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g==0 then return end + ft=math.min(ft,#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_SPSUMMON) + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + for sc in sg:Iter() do + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --You cannot Special Summon, except "Gouki" monsters, while you control any of those face-up monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end + end +end \ No newline at end of file diff --git a/official/c7782069.lua b/official/c7782069.lua new file mode 100644 index 0000000000..058362801f --- /dev/null +++ b/official/c7782069.lua @@ -0,0 +1,65 @@ +--剛鬼ザ・タイラント・オーガ +--Gouki The Tyrant Ogre +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Gouki" Link Monster + 1 Warrior, Dinosaur, or Cyberse monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE)) + --Register the Link Rating of the materials used for its Fusion Summon + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --Destroy cards on the field up to the total Link Rating of the "Gouki" Link Monsters used as material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()>0 end) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + e0:SetLabelObject(e1) + --If this card battles, your opponent cannot activate cards or effects until the end of the Damage Step + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,1) + e2:SetValue(1) + e2:SetCondition(function(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.matfilter(c) + return c:IsSetCard(SET_GOUKI) and c:IsLinkMonster() +end +function s.valcheck(e,c) + local g=c:GetMaterial() + local total=g:Filter(Card.IsSetCard,nil,SET_GOUKI):GetSum(Card.GetLink) + local link3=g:IsExists(Card.IsLinkAbove,1,nil,3) and 100 or 0 + e:GetLabelObject():SetLabel(total,link3) +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 + local total,link3=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,total,nil) + if link3==100 then + Duel.SetChainLimit(function(te) return not Duel.GetTargetCards(e):IsContains(te:GetHandler()) end) + end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c80208225.lua b/official/c80208225.lua new file mode 100644 index 0000000000..51518b6236 --- /dev/null +++ b/official/c80208225.lua @@ -0,0 +1,55 @@ +--星辰の刺毒 +--Dracotail Sting +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Banish 1 monster and/or 1 Spell/Trap from your opponent's GY, then you can place 1 "Dracotail" card from your GY or banishment on the bottom of the Deck, except "Dracotail Sting", then draw 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK+CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_DRAGONTAIL} +s.listed_names={id} +function s.rmfilter(c,e) + return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) +end +function s.rescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsMonster,nil)<=1 and sg:FilterCount(Card.IsSpellTrap,nil)<=1 +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_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end + local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_GRAVE,nil,e) + local tg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_REMOVE) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,#tg,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) +end +function s.tdfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) + and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + Duel.BreakEffect() + if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c80320877.lua b/official/c80320877.lua new file mode 100644 index 0000000000..759abfc62d --- /dev/null +++ b/official/c80320877.lua @@ -0,0 +1,96 @@ +--終刻決壊 +--Doom-Z Destruction +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Equip this card to 1 "Doom-Z" Xyz Monster you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(aux.RemainFieldCost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) + --Equip 1 "Doom-Z" monster from your Deck to a monster on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + e2:SetTarget(s.eqptg) + e2:SetOperation(s.eqpop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.xyzfilter(c) + return c:IsSetCard(SET_DOOM_Z) and c:IsType(TYPE_XYZ) and c:IsFaceup() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then + --Your opponent cannot add cards from the Deck to the hand, except by drawing them + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_TO_HAND) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(0,LOCATION_DECK) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + --Equip limit + local e2=Effect.CreateEffect(c) + 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) + c:RegisterEffect(e2) + else + c:CancelToGrave(false) + end +end +function s.eqfilter(c,tp) + return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() and c:CheckUniqueOnField(tp) and not c:IsForbidden() +end +function s.eqptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) +end +function s.eqpop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if ec and Duel.Equip(tp,ec,tc) then + --Equip limit + local e1=Effect.CreateEffect(ec) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + ec:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c80538047.lua b/official/c80538047.lua new file mode 100644 index 0000000000..b5f232509a --- /dev/null +++ b/official/c80538047.lua @@ -0,0 +1,54 @@ +--絢嵐たるスエン +--Magnifistorming Suen +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, 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.selfspcon) + c:RegisterEffect(e1) + --Add 1 "Magnifistorm" Spell/Trap or 1 "Mystical Space Typhoon" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsSpellTrap()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c81143465.lua b/official/c81143465.lua new file mode 100644 index 0000000000..07b59f8d33 --- /dev/null +++ b/official/c81143465.lua @@ -0,0 +1,60 @@ +--あないみじや玉の緒ふたつ +--Tragic Twin Threads +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Equip only to a monster you control that was Special Summoned from the Extra Deck + aux.AddEquipProcedure(c,0,aux.FilterBoolFunction(Card.IsSummonLocation,LOCATION_EXTRA)) + --Destroy it, also the equipped monster, and if you do, take damage equal to the total original ATK of the destroyed monsters, then inflict damage to your opponent equal to the damage you took + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(s.descon) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) +end +function s.desconfilter(c,tp,atk) + return c:IsSummonPlayer(1-tp) and c:IsSummonLocation(LOCATION_EXTRA) and c:GetAttack()>atk +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local ec=e:GetHandler():GetEquipTarget() + return ec and eg:IsExists(s.desconfilter,1,nil,tp,ec:GetAttack()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local ec=e:GetHandler():GetEquipTarget() + local g=eg:Filter(s.desconfilter,nil,tp,ec:GetAttack()):Match(Card.IsCanBeEffectTarget,nil,e) + if chkc then return g:IsContains(chkc) end + if chk==0 then return #g>0 end + local tg=nil + if #g==1 then + tg=g + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + tg=g:Select(tp,1,1,nil) + end + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg+ec,2,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,tg:GetSum(Card.GetBaseAttack)) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local g=Group.FromCards(e:GetHandler():GetEquipTarget()) + if tc:IsRelateToEffect(e) then + g:AddCard(tc) + end + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local dam=Duel.GetOperatedGroup():GetSum(Card.GetBaseAttack) + if dam==0 then return end + local val=Duel.Damage(tp,dam,REASON_EFFECT) + if val>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,val,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c81650695.lua b/official/c81650695.lua new file mode 100644 index 0000000000..eddadf272d --- /dev/null +++ b/official/c81650695.lua @@ -0,0 +1,98 @@ +--獄神機Doom-Z +--Power Patron Machine Doom-Z +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You cannot Special Summon from the Extra Deck, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) + c:RegisterEffect(e1) + aux.addContinuousLizardCheck(c,LOCATION_MZONE,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) + --Special Summon from your Extra Deck, 1 "Doom-Z" Xyz Monster or "Jupiter the Power Patron of Destruction" by using another Effect monster as material + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Doom-Z" card from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DOOM_Z} +s.listed_names={68231287} --"Jupiter the Power Patron of Destruction" +function s.xyzmatfilter(c,e,tp) + local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return #mustg<=1 and c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetLevel(),mustg) +end +function s.spfilter(c,e,tp,mc,lv,mustg) + return c:IsType(TYPE_XYZ) and (c:IsSetCard(SET_DOOM_Z) or c:IsCode(101302044)) + and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) + and (#mustg<=0 or mustg:IsContains(mc)) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc~=c and s.xyzmatfilter(chkc,e,tp)end + if chk==0 then return Duel.IsExistingTarget(s.xyzmatfilter,tp,LOCATION_MZONE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzmatfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,LOCATION_MZONE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and not tc:IsImmuneToEffect(e)) then return end + local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetLevel(),mustg):GetFirst() + if sc then + sc:SetMaterial(tc) + Duel.Overlay(sc,tc) + if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end + sc:CompleteProcedure() + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Equip(tp,c,sc) then + --Equip limit + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_DOOM_Z) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c84477320.lua b/official/c84477320.lua new file mode 100644 index 0000000000..f8280f0ebc --- /dev/null +++ b/official/c84477320.lua @@ -0,0 +1,70 @@ +--星辰響手プリクル +--Dracotail Phrixl +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Dracotail" monster from your GY, then return 1 monster you control to the hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.sptg) + e1a:SetOperation(s.spop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Set 1 "Dracotail" 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_BE_MATERIAL) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGONTAIL} +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DRAGONTAIL) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,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.setfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) 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/c84693918.lua b/official/c84693918.lua new file mode 100644 index 0000000000..1ee6aab373 --- /dev/null +++ b/official/c84693918.lua @@ -0,0 +1,95 @@ +--ドレミコード・ソルフェージア +--Solfachord Solfeggia +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --Negate a monster effect activated by your opponent, then destroy this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.discon) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --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:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_SOLFACHORD)),tp,LOCATION_MZONE,0,1,nil) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon 1 "Solfachord" monster from your hand, except "Solfachord Solfeggia" + 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) +end +s.listed_names={id} +s.listed_series={SET_GRANSOLFACHORD,SET_SOLFACHORD} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GRANSOLFACHORD),tp,LOCATION_MZONE,0,1,nil) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.Hint(HINT_CARD,0,id) + if Duel.NegateEffect(ev) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.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.spfilter(c,e,tp,exc) + if not (c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) then + return Duel.GetMZoneCount(tp,exc)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,exc,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local cost_chk=Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,0) + local exc=cost_chk and e:GetHandler() or nil + local location=cost_chk and LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA or LOCATION_HAND + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,location,0,1,nil,e,tp,exc) end + local hand_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + if cost_chk and (not hand_chk or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then + Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,1) + e:SetLabel(LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) + else + e:SetLabel(LOCATION_HAND) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,e:GetLabel()) +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,e:GetLabel(),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/c85315450.lua b/official/c85315450.lua new file mode 100644 index 0000000000..b14388bfcc --- /dev/null +++ b/official/c85315450.lua @@ -0,0 +1,65 @@ +--絢嵐豪火フォニクス +--Magnifistorm Great Pyre Phonix +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand if a Quick-Play Spell Card is activated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Shuffle up to 2 cards your opponent controls into the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) + --Special Summon this card from your GY if "Mystical Space Typhoon" is activated + local e3=e1:Clone() + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +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.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c8805661.lua b/official/c8805661.lua new file mode 100644 index 0000000000..9dd7f92fa0 --- /dev/null +++ b/official/c8805661.lua @@ -0,0 +1,62 @@ +--メガリス・フローチュ +--Megalith Phuloch +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Add 1 "Megalith" card from your GY 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) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e1:SetCost(Cost.HardOncePerChain(id)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local ritual_params={ + handler=c, + filter=function(c) return c:IsSetCard(SET_MEGALITH) and not c:IsCode(id) end, + lvtype=RITPROC_GREATER, + location=LOCATION_GRAVE, + forcedselection=function(e,tp,g,sc) return g:IsContains(e:GetHandler()) end + } + --Ritual Summon 1 "Megalith" Ritual Monster from your GY, by Tributing monsters from your hand or field, including this card on your field, whose total Levels equal or exceed the Level of the Ritual Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetCost(Cost.HardOncePerChain(id)) + e2:SetTarget(Ritual.Target(ritual_params)) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) then + Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) + end + end) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_MEGALITH) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c89086647.lua b/official/c89086647.lua new file mode 100644 index 0000000000..1968042bd9 --- /dev/null +++ b/official/c89086647.lua @@ -0,0 +1,58 @@ +--お菊さんの皿算用 +--Miss Okiku's Dishrithmetic +--scripted by pyrQ +local COUNTER_DISH=0x216 +local s,id=GetID() +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_DISH) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Place Dish Counters on this card equal to the Chain Link number of this effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_COUNTER) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_COUNTER,e:GetHandler(),Duel.GetCurrentChain(),tp,COUNTER_DISH) end) + e1:SetOperation(function(e) e:GetHandler():AddCounter(COUNTER_DISH,Duel.GetCurrentChain()) end) + c:RegisterEffect(e1) + --● 9 or less: Your opponent cannot target this card with card effects, also it cannot be destroyed by your opponent's card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_SINGLE) + e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2a:SetRange(LOCATION_SZONE) + e2a:SetCondition(function(e) return e:GetHandler():GetCounter(COUNTER_DISH)<=9 end) + e2a:SetValue(aux.tgoval) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2b:SetValue(aux.indoval) + c:RegisterEffect(e2b) + --● 10 or more: Send this card to the GY + local e2c=Effect.CreateEffect(c) + e2c:SetType(EFFECT_TYPE_SINGLE) + e2c:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2c:SetCode(EFFECT_SELF_TOGRAVE) + e2c:SetRange(LOCATION_SZONE) + e2c:SetCondition(function(e) return e:GetHandler():GetCounter(COUNTER_DISH)>=10 end) + c:RegisterEffect(e2c) + --Send the top 10 cards of your Deck to the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DECKDES) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) and rp==PLAYER_NONE end) + e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,10) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,10) end) + e3:SetOperation(function(e,tp) Duel.DiscardDeck(tp,10,REASON_EFFECT) end) + c:RegisterEffect(e3) +end +s.counter_place_list={COUNTER_DISH} \ No newline at end of file diff --git a/official/c90444325.lua b/official/c90444325.lua index 53b4b02e62..3221e49699 100644 --- a/official/c90444325.lua +++ b/official/c90444325.lua @@ -25,11 +25,11 @@ function s.initial_effect(c) e2:SetCountLimit(1,id) e2:SetTarget(Ritual.Target(ritual_params)) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) then - Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) - end - end) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) then + Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) + end + end) c:RegisterEffect(e2) end s.listed_series={SET_MEGALITH} diff --git a/official/c92269002.lua b/official/c92269002.lua new file mode 100644 index 0000000000..aebc6bf5a8 --- /dev/null +++ b/official/c92269002.lua @@ -0,0 +1,90 @@ +--鉄獣の撃鉄 +--Tri-Brigade Hammer +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects (but you can only use each effect of "Tri-Brigade Hammer" once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_names={id} +s.listed_series={SET_TRI_BRIGADE} +function s.thfilter(c) + return c:IsSetCard(SET_TRI_BRIGADE) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() +end +function s.spcostfilter(c) + return c:IsSetCard(SET_TRI_BRIGADE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) +end +function s.spfilter(c,e,tp,g,link) + return c:IsSetCard(SET_TRI_BRIGADE) and c:IsLinkMonster() and (not link or c:IsLink(link)) + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + local lg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,g) + local _,min_link=lg:GetMinGroup(Card.GetLink) + local b2=not Duel.HasFlagEffect(tp,id+1) and min_link and min_link<=#rg + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + local link_map={} + for lc in lg:Iter() do + link_map[lc:GetLink()]=true + end + local rescon=function(sg) return link_map[#sg] end + local sg=aux.SelectUnselectGroup(rg,e,tp,min_link,#rg,rescon,1,tp,HINTMSG_REMOVE,rescon) + Duel.Remove(sg,POS_FACEUP,REASON_COST) + e:SetLabel(op,#sg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op,link=e:GetLabel() + if op==1 then + --Add 1 "Tri-Brigade" Spell/Trap from your Deck to your hand, except "Tri-Brigade Hammer" + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + elseif op==2 and link then + --Special Summon 1 "Tri-Brigade" Link Monster from your Extra Deck, with Link Rating equal to the number banished, ignoring its Summoning conditions + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil,link) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) + end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Beast, Beast-Warrior, or Winged Beast monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACES_BEAST_BWARRIOR_WINGB) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACES_BEAST_BWARRIOR_WINGB) end) + end +end \ No newline at end of file diff --git a/official/c92472273.lua b/official/c92472273.lua new file mode 100644 index 0000000000..854778d6b0 --- /dev/null +++ b/official/c92472273.lua @@ -0,0 +1,86 @@ +--終刻竜機ⅩⅡ-ドラスティア +--Doom-Z Zero - Drastia +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Destroy 1 "Doom-Z" card you control, and if you do, Special Summon this card from the hand then you can equip 1 Equip Spell from your Deck to it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.desfilter(c,tp) + return c:IsSetCard(SET_DOOM_Z) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) +end +function s.eqsfilter(c,tp,ec) + return c:IsEquipSpell() and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) + and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_DECK,0,1,nil,tp,c) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local eqc=Duel.SelectMatchingCard(tp,s.eqsfilter,tp,LOCATION_DECK,0,1,1,nil,tp,c):GetFirst() + if eqc then + Duel.BreakEffect() + Duel.Equip(tp,eqc,c) + end + end +end +function s.spfilter(c,e,tp,lv,mc) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) + and mc:GetEquipGroup():FilterCount(Card.IsCanBeXyzMaterial,nil,c,tp,REASON_EFFECT)==mc:GetEquipCount() + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),c) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel(),c):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + Duel.Overlay(sc,c+c:GetEquipGroup(),true) + end +end \ No newline at end of file diff --git a/official/c92595825.lua b/official/c92595825.lua new file mode 100644 index 0000000000..e70906b960 --- /dev/null +++ b/official/c92595825.lua @@ -0,0 +1,86 @@ +--夜薔薇の黒騎士 +--Twilight Rose Black Knight +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Plant monsters you control gain 1000 ATK while you control a Synchro Monster + 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(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) + e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PLANT)) + e1:SetValue(1000) + c:RegisterEffect(e1) + --Special Summon 1 "Black Rose Dragon" or 1 Level 4 or lower Plant monster from your GY, but negate its effects + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetTarget(s.sptg) + e2a:SetOperation(s.spop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Increase or decrease the Level of 1 other Plant monster you control by 1 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_BLACK_ROSE_DRAGON} +function s.spfilter(c,e,tp) + return (c:IsCode(CARD_BLACK_ROSE_DRAGON) or (c:IsLevelBelow(4) and c:IsRace(RACE_PLANT))) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end +end +function s.lvfilter(c) + return c:IsRace(RACE_PLANT) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(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 chkc~=c and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:HasLevel() then + local op=tc:IsLevelAbove(2) and Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) or 0 + local lv=op==0 and 1 or -1 + --Increase or decrease its Level by 1 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c93317313.lua b/official/c93317313.lua new file mode 100644 index 0000000000..e331afd54a --- /dev/null +++ b/official/c93317313.lua @@ -0,0 +1,102 @@ +--DDディフェンス・ソルジャー +--D/D Defense Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DDD} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.limcostfilter(c) + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) + local b2=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + elseif op==2 then + e:SetCategory(0) + e:SetProperty(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 "D/D" card in your Pendulum Zone + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,1) + e1:SetCondition(s.actcon) + e1:SetValue(1) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.actcon(e) + local tc=Duel.GetAttacker() + return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) +end +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c93481594.lua b/official/c93481594.lua new file mode 100644 index 0000000000..b0d8b05106 --- /dev/null +++ b/official/c93481594.lua @@ -0,0 +1,85 @@ +--幸せの多重奏 +--Solfachord Happiness +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_names={id} +s.listed_series={SET_SOLFACHORD} +function s.thfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) + and Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetScale)>=2 + local b2=not Duel.HasFlagEffect(tp,id+2) + and Pendulum.PlayerCanGainAdditionalPendulumSummon(tp,id) + local b3=not Duel.HasFlagEffect(tp,id+3) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,2,nil,e,tp) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + Duel.RegisterFlagEffect(tp,id+op*1,RESET_PHASE|PHASE_END,0,1) + if op==1 then + e:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + elseif op==2 then + e:SetCategory(0) + elseif op==3 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_PZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Discard 1 card, and if you do, add 2 "Solfachord" Pendulum Monsters with different Pendulum Scales from your Deck to your hand + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end + local dg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + local sdg=aux.SelectUnselectGroup(dg,e,tp,2,2,aux.dpcheck(Card.GetScale),1,tp,HINTMSG_ATOHAND) + if #sdg~=2 or Duel.SendtoHand(sdg,nil,REASON_EFFECT)~=2 then return end + Duel.ConfirmCards(1-tp,sdg:Match(Card.IsLocation,nil,LOCATION_HAND)) + Duel.ShuffleHand(tp) + local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ct==0 then return end + local hg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end + ct=math.min(ct,Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)+1) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local shg=hg:Select(tp,1,ct,nil) + if #shg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(shg,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --During your Main Phase this turn, you can conduct 1 Pendulum Summon of a "Solfachord" monster(s) in addition to your Pendulum Summon + Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_SOLFACHORD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,5),aux.Stringid(id,6),id) + elseif op==3 then + --Special Summon 2 "Solfachord" cards from your Pendulum Zone + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_PZONE,0,nil,e,tp) + if #g==2 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c94103142.lua b/official/c94103142.lua new file mode 100644 index 0000000000..0ed8c8d078 --- /dev/null +++ b/official/c94103142.lua @@ -0,0 +1,86 @@ +--絢嵐たる顕現 +--Magnifistorming Summoning Technique +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + 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_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tgfilter(c) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() +end +function s.thfilter(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_TOGRAVE) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Send 1 "Magnifistorm" monster from your Deck to the GY + 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 + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + 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 +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 + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end diff --git a/official/c94326720.lua b/official/c94326720.lua new file mode 100644 index 0000000000..c953881178 --- /dev/null +++ b/official/c94326720.lua @@ -0,0 +1,72 @@ +--破滅なる予幻視 +--Theorealize Overdrive +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Medius the Pure" from your GY or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1: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) + --Change the Level of 1 face-up 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_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MEDIUS_THE_PURE} +function s.spfilter(c,e,tp) + return c:IsCode(CARD_MEDIUS_THE_PURE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() +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.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + 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:IsControler(tp) and chkc:HasLevel() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local lv=Duel.AnnounceNumberRange(tp,1,10,tc:GetLevel()) + e:SetLabel(lv) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tc,1,tp,0) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsFaceup() and tc:HasLevel() and tc:IsRelateToEffect(e)) then return end + local lv=e:GetLabel() + if lv>0 and not tc:IsLevel(lv) then + --Its Level becomes the declared Level until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c94503794.lua b/official/c94503794.lua new file mode 100644 index 0000000000..08925296b8 --- /dev/null +++ b/official/c94503794.lua @@ -0,0 +1,76 @@ +--漆梏の喰獣 ケルゼブス +--Cerzebuth, Laimargia of the Ebon Irons +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2+ Level 7 monsters + Xyz.AddProcedure(c,nil,7,2,nil,nil,Xyz.InfiniteMats) + --Gains 700 ATK for each material attached to it + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return c:GetOverlayCount()*700 end) + c:RegisterEffect(e1) + --Attach that activated Normal or Quick-Play Spell Card on the field to this face-up card, and if you do, this card is unaffected by that activated effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(s.attachcon) + e2:SetOperation(s.attachop) + c:RegisterEffect(e2) + --Set 1 Spell attached to this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +function s.attachcon(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (rc:IsNormalSpell() or rc:IsQuickPlaySpell()) and rc:IsOnField() + and rc:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local rc=re:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and rc:IsRelateToEffect(re) + and not c:IsImmuneToEffect(e) and not rc:IsImmuneToEffect(e) + and rc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) then + Duel.Overlay(c,rc) + if not c:GetOverlayGroup():IsContains(rc) then return end + rc:CancelToGrave() + --This card is unaffected by that activated effect + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetValue(function(e,te) return te==re end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) + c:RegisterEffect(e1) + end +end +function s.setfilter(c) + return c:IsSpell() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():GetOverlayGroup():IsExists(s.setfilter,1,nil) end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=c:GetOverlayGroup():FilterSelect(tp,s.setfilter,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/official/c95448372.lua b/official/c95448372.lua new file mode 100644 index 0000000000..4862868f03 --- /dev/null +++ b/official/c95448372.lua @@ -0,0 +1,75 @@ +--剛鬼闘魂 +--Gouki Fighting Spirit +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can Special Summon 1 Level 4 or lower EARTH monster (Warrior, Dinosaur, or Cyberse) from your hand in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Special Summon 1 "Dinowrestler" or "G Golem" monster from your Deck or Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.deckexspcost) + e2:SetTarget(s.deckexsptg) + e2:SetOperation(s.deckexspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI,SET_DINOWRESTLER,SET_G_GOLEM} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.handspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local g=Duel.GetMatchingGroup(s.handspfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.deckexcostfilter(c,e,tp) + return c:IsLinkAbove(3) and c:IsSetCard(SET_GOUKI) + and Duel.IsExistingMatchingCard(s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.deckexspfilter(c,e,tp,cost_card) + if not (c:IsSetCard({SET_DINOWRESTLER,SET_G_GOLEM}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp,cost_card)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,cost_card,c)>0 + end +end +function s.deckexspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.deckexcostfilter,1,false,nil,nil,e,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.deckexcostfilter,1,1,false,nil,nil,e,tp) + Duel.Release(g,REASON_COST) +end +function s.deckexsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.deckexspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c95626382.lua b/official/c95626382.lua new file mode 100644 index 0000000000..c619825d69 --- /dev/null +++ b/official/c95626382.lua @@ -0,0 +1,87 @@ +--終刻龍機ⅩⅡ-ドラストリウス +--Doom-Z End - Drastrius +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 8 monsters + Xyz.AddProcedure(c,nil,8,3) + --The first time this card would be destroyed by battle each turn, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetValue(function(e,re,r) return (r&REASON_BATTLE|REASON_EFFECT)>0 end) + c:RegisterEffect(e1) + --You can equip 1 other face-up monster on the field to this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetTarget(s.eqtg) + e2:SetOperation(s.eqop) + c:RegisterEffect(e2) + aux.AddEREquipLimit(c,nil,aux.TRUE,Card.EquipByEffectAndLimitRegister,e2) + --Negate an opponent's monster effect activated on the field or in the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE+CATEGORY_EQUIP) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.discon) + e3:SetCost(Cost.DetachFromSelf(1)) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) + aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsControler(1-tp) end,Card.EquipByEffectAndLimitRegister,e3) +end +s.listed_series={SET_DOOM_Z} +function s.eqfilter(c,tp) + return c:IsFaceup() and (c:IsControler(tp) or c:IsAbleToChangeControler()) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFacedown() or not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp):GetFirst() + if ec then + Duel.HintSelection(ec) + c:EquipByEffectAndLimitRegister(e,tp,ec) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp,chk) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_MZONE|LOCATION_GRAVE)>0 and Duel.IsChainDisablable(ev) +end +function s.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) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,1-tp,LOCATION_MZONE) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.NegateEffect(ev) then return end + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or c:IsFacedown() then return end + local g=Duel.GetMatchingGroup(s.eqfilter,tp,0,LOCATION_MZONE,c,tp) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=g:Select(tp,1,1,nil):GetFirst() + if ec then + Duel.HintSelection(ec) + Duel.BreakEffect() + c:EquipByEffectAndLimitRegister(e,tp,ec) + end +end diff --git a/official/c9627299.lua b/official/c9627299.lua new file mode 100644 index 0000000000..c2ee35ab73 --- /dev/null +++ b/official/c9627299.lua @@ -0,0 +1,64 @@ +--斎キ狭依姫 +--Ichiki Sayori Hime +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:AddCannotBeSpecialSummoned() + Spirit.AddProcedure(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP) + --Immediately after this effect resolves, Normal Summon this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.nscon) + e1:SetTarget(s.nstg) + e1:SetOperation(s.nsop) + c:RegisterEffect(e1) + --Add 1 Level 4 LIGHT or DARK monster with 800 ATK or DEF 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) +end +s.listed_names={id} +function s.nsconfilter(c) + return (c:IsAttack(800) or c:IsDefense(800)) and c:IsFaceup() +end +function s.nscon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.nsconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSummonable(true,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,tp,0) +end +function s.nsop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.Summon(tp,c,true,nil) + end +end +function s.thfilter(c) + return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and (c:IsAttack(800) or c:IsDefense(800)) + 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 From f2a6304c6ad4d5e1c3017158398b7e75139d7570 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 30 Jul 2025 23:57:43 +0300 Subject: [PATCH 4/4] *1 --- official/c93481594.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/official/c93481594.lua b/official/c93481594.lua index b0d8b05106..c591638ca9 100644 --- a/official/c93481594.lua +++ b/official/c93481594.lua @@ -36,7 +36,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) {b2,aux.Stringid(id,2)}, {b3,aux.Stringid(id,3)}) e:SetLabel(op) - Duel.RegisterFlagEffect(tp,id+op*1,RESET_PHASE|PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+op,RESET_PHASE|PHASE_END,0,1) if op==1 then e:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) @@ -82,4 +82,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end