From ff86b3d7796632c79a539722a5eba9fb5001490a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 14 Jul 2025 21:21:27 +0300 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c100200277.lua | 81 ------------------ pre-release/c100201001.lua | 42 --------- 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 | 112 ------------------------ 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 | 63 -------------- pre-release/c100443103.lua | 66 -------------- pre-release/c100443104.lua | 76 ----------------- pre-release/c100443105.lua | 37 -------- 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/c101301081.lua | 78 ----------------- pre-release/c101301082.lua | 86 ------------------- pre-release/c101301083.lua | 48 ----------- pre-release/c101301084.lua | 64 -------------- pre-release/c101301085.lua | 93 -------------------- pre-release/c101301086.lua | 85 ------------------ pre-release/c101301087.lua | 98 --------------------- pre-release/c101301088.lua | 81 ------------------ pre-release/c101301089.lua | 72 ---------------- pre-release/c101301090.lua | 59 ------------- pre-release/c101301091.lua | 62 -------------- pre-release/c101301092.lua | 61 ------------- pre-release/c101301093.lua | 86 ------------------- pre-release/c101301094.lua | 69 --------------- pre-release/c101301095.lua | 83 ------------------ pre-release/c101301096.lua | 69 --------------- pre-release/c101302006.lua | 91 -------------------- pre-release/c101302007.lua | 69 --------------- pre-release/c101302008.lua | 82 ------------------ pre-release/c101302009.lua | 72 ---------------- pre-release/c101302010.lua | 68 --------------- 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/c101302020.lua | 95 --------------------- pre-release/c101302021.lua | 120 -------------------------- pre-release/c101302030.lua | 64 -------------- pre-release/c101302032.lua | 101 ---------------------- pre-release/c101302033.lua | 65 -------------- pre-release/c101302034.lua | 85 ------------------ pre-release/c101302036.lua | 65 -------------- pre-release/c101302037.lua | 78 ----------------- 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/c101302050.lua | 74 ---------------- pre-release/c101302053.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/c101302065.lua | 85 ------------------ pre-release/c101302066.lua | 103 ---------------------- pre-release/c101302069.lua | 93 -------------------- pre-release/c101302070.lua | 78 ----------------- pre-release/c101302071.lua | 60 ------------- pre-release/c101302074.lua | 96 --------------------- pre-release/c101302075.lua | 95 --------------------- pre-release/c101302076.lua | 122 -------------------------- 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 --------------------- 96 files changed, 7545 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/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/c101301081.lua delete mode 100644 pre-release/c101301082.lua delete mode 100644 pre-release/c101301083.lua delete mode 100644 pre-release/c101301084.lua delete mode 100644 pre-release/c101301085.lua delete mode 100644 pre-release/c101301086.lua delete mode 100644 pre-release/c101301087.lua delete mode 100644 pre-release/c101301088.lua delete mode 100644 pre-release/c101301089.lua delete mode 100644 pre-release/c101301090.lua delete mode 100644 pre-release/c101301091.lua delete mode 100644 pre-release/c101301092.lua delete mode 100644 pre-release/c101301093.lua delete mode 100644 pre-release/c101301094.lua delete mode 100644 pre-release/c101301095.lua delete mode 100644 pre-release/c101301096.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/c101302020.lua delete mode 100644 pre-release/c101302021.lua delete mode 100644 pre-release/c101302030.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/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/c101302050.lua delete mode 100644 pre-release/c101302053.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/c101302065.lua delete mode 100644 pre-release/c101302066.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/c101302074.lua delete mode 100644 pre-release/c101302075.lua delete mode 100644 pre-release/c101302076.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 8ee5fa9d59..0000000000 --- a/pre-release/c100201001.lua +++ /dev/null @@ -1,42 +0,0 @@ ---契約を結びし竜の戦士 ---Dragonic Warrior -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.spcostfilter(c,e,tp) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - Duel.SpecialSummonComplete() -end diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua deleted file mode 100644 index 9b0c446078..0000000000 --- a/pre-release/c100201002.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アイン・ロイド ---Einroid -local s,id=GetID() -function s.initial_effect(c) - --Send 2 Level 4 or lower Machine monsters from your Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DESTROYED) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) -end -function s.tgfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,2,2,nil) - if #g==2 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua deleted file mode 100644 index 35f72f4627..0000000000 --- a/pre-release/c100201003.lua +++ /dev/null @@ -1,56 +0,0 @@ ---妖魔ヌリカベ ---Nurikabe -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCondition(aux.exccon) - e1:SetCost(Cost.PayLP(1000)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - for sc in Group.FromCards(c,tc):Iter() do - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(c) - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - sc:RegisterEffect(e1,true) - end - end - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/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 eccd2eb38e..0000000000 --- a/pre-release/c100348032.lua +++ /dev/null @@ -1,112 +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 sc and 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 8341e1eb8a..0000000000 --- a/pre-release/c100443102.lua +++ /dev/null @@ -1,63 +0,0 @@ ---錬金釜-カオス・ディスティル ---Chaos Distill ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Any card sent to your GY is banished instead - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_ALL,0) - e1:SetValue(LOCATION_REMOVED) - e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) - c:RegisterEffect(e1) - --Activate 1 of these effects - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -local CARD_MACRO_COSMOS=30241314 -s.listed_names={CARD_MACRO_COSMOS,id} -function s.macrofilter(c) - return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.monsterfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) - local c=e:GetHandler() - local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==2 then - Duel.Remove(c,POS_FACEUP,REASON_COST) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua deleted file mode 100644 index dfaf24888f..0000000000 --- a/pre-release/c100443103.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ヒーローズルール1 ファイブ・フリーダムス ---Hero's Rule 1: Five Freedoms ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish up to 5 cards from the GYs - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.rmvtg) - e1:SetOperation(s.rmvop) - c:RegisterEffect(e1) - --Special Summon 1 of your banished "Elemental HERO" monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.rmvfilter(c) - return c:IsAbleToRemove() and aux.SpElimFilter(c) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua deleted file mode 100644 index 6e4745de52..0000000000 --- a/pre-release/c100443104.lua +++ /dev/null @@ -1,76 +0,0 @@ ---デーモンズ・マタドール ---Archfiend Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Cannot be destroyed by battle, also you take no battle damage from battles involving this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - c:RegisterEffect(e3) - --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_names={100443105,id} --"Ritual of the Matador" -s.listed_series={SET_ARCHFIEND} -function s.thfilter(c) - return c:IsSetCard(SET_ARCHFIEND) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil) - if #g==2 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - --This card cannot attack for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3206) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua deleted file mode 100644 index 61c24806c2..0000000000 --- a/pre-release/c100443105.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マタドール降臨の儀式 ダーク・パセオ ---Ritual of the Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Ritual Summon "Archfiend Matador" - Ritual.AddProcGreaterCode(c,6,nil,100443104) - --Special Summon 1 non-Ritual "Archfiend" monster from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfBanish) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={100443104} --"Archfiend Matador" -s.listed_series={SET_ARCHFIEND} -function s.spfilter(c,e,tp) - return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/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/c101301081.lua b/pre-release/c101301081.lua deleted file mode 100644 index cf76d0be32..0000000000 --- a/pre-release/c101301081.lua +++ /dev/null @@ -1,78 +0,0 @@ ---Japanese name ---Buio the Dawn's Light ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Monsters in your leftmost or rightmost Main Monster Zones 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(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Negate the effects of 1 Fiend Effect Monster you control, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Mutiny in the Sky" from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={101301083} --"Mutiny in the Sky" -function s.disfilter(c) - return c:IsRace(RACE_FIEND) and c:IsType(TYPE_EFFECT) and c:IsNegatableMonster() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - --Negate its effects - tc:NegateEffects(c) - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.thfilter(c) - return c:IsCode(101301083) 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/c101301082.lua b/pre-release/c101301082.lua deleted file mode 100644 index eaab6fd385..0000000000 --- a/pre-release/c101301082.lua +++ /dev/null @@ -1,86 +0,0 @@ ---Japanese name ---Luce the Dusk's Dark ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Fiend and/or Fairy monsters in your GY - Fusion.AddProcMixN(c,true,true,s.fusionmatfilter,3) - --Monsters in your leftmost or rightmost Main Monster Zones 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(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Send 1 Fiend or Fairy monster from your Deck to the GY, and if you do, destroy 1 card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.tgdestg) - e2:SetOperation(s.tgdesop) - c:RegisterEffect(e2) - --Destroy 1 card on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.descon) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -function s.fusionmatfilter(c,fc,sumtype,tp) - return c:IsRace(RACE_FIEND|RACE_FAIRY,fc,sumtype,tp) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) -end -function s.tgfilter(c) - return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToGrave() -end -function s.tgdestg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.tgdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT) and g:GetFirst():IsLocation(LOCATION_GRAVE) then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function s.desconfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.desconfilter,1,nil,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301083.lua b/pre-release/c101301083.lua deleted file mode 100644 index b17574ac88..0000000000 --- a/pre-release/c101301083.lua +++ /dev/null @@ -1,48 +0,0 @@ ---Japanese name ---Mutiny in the Sky ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Fiend or Fairy Fusion Monster from your Extra Deck, by shuffling Fiend and/or Fairy monsters from your GY into the Deck - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND|RACE_FAIRY),aux.FALSE,s.fextra,Fusion.ShuffleMaterial) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCountLimit(1,id) - 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_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -function s.matfilter(c) - return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToDeck() -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil) -end -function s.thcostfilter(c) - return c:IsRace(RACE_FIEND|RACE_FAIRY) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301084.lua b/pre-release/c101301084.lua deleted file mode 100644 index 82ec4b92a0..0000000000 --- a/pre-release/c101301084.lua +++ /dev/null @@ -1,64 +0,0 @@ --- ---Miracle Raven ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c) - c:AddMustBeRitualSummoned() - --Ritual Summon this card, by Tributing monsters from your hand or field whose total Levels equal or exceed 1 - local e1=Ritual.CreateProc({ - handler=c, - lvtype=RITPROC_GREATER, - filter=function(rc) return rc==c end, - lv=1, - location=LOCATION_PZONE, - desc=aux.Stringid(id,0), - self=true - }) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1) - c:RegisterEffect(e1) - --This Ritual Summoned card is unaffected by your opponent's activated effects - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e2:SetValue(function(e,te) return te:IsActivated() and te:GetOwnerPlayer()==1-e:GetHandlerPlayer() end) - c:RegisterEffect(e2) - --If you Ritual Summon exactly 1 Ritual Monster with a card effect that requires use of monsters, this card you control can be used as the entire Tribute - local e3=Ritual.AddWholeLevelTribute(c,aux.TRUE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - --Add 1 Ritual Monster from your Deck to your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_RELEASE) - e4:SetCountLimit(1,id) - e4:SetCondition(function(e) return e:GetHandler():IsReason(REASON_RITUAL) end) - e4:SetTarget(s.thtg) - e4:SetOperation(s.thop) - c:RegisterEffect(e4) -end -s.listed_names={id} -function s.thfilter(c) - return c:IsRitualMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/pre-release/c101301085.lua b/pre-release/c101301085.lua deleted file mode 100644 index ae89096a2d..0000000000 --- a/pre-release/c101301085.lua +++ /dev/null @@ -1,93 +0,0 @@ --- ---ASHLAN U1000 ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 monsters with different Types and Attributes - Link.AddProcedure(c,nil,2,nil,s.spcheck) - --If a Ritual Monster this card points to attacks a Defense Position monster, inflict piercing battle damage to your opponent - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(function(e,c) return c:IsRitualMonster() and e:GetHandler():GetLinkedGroup():IsContains(c) end) - c:RegisterEffect(e1) - --Add 1 Ritual Monster with a different Type and Attribute than the revealed monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Return 1 face-up card your opponent controls to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.rthcon) - e3:SetTarget(s.rthtg) - e3:SetOperation(s.rthop) - c:RegisterEffect(e3) -end -function s.spcheck(g,lc,sumtype,tp) - return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) and g:CheckDifferentPropertyBinary(Card.GetAttribute,lc,sumtype,tp) -end -function s.thcostfilter(c,tp) - return c:IsRitualMonster() and not c:IsPublic() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace(),c:GetAttribute()) -end -function s.thfilter(c,race,attribute) - return c:IsRitualMonster() and c:IsDifferentRace(race) and c:IsAttributeExcept(attribute) and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() - Duel.ConfirmCards(1-tp,rc) - Duel.ShuffleHand(tp) - e:SetLabelObject(rc) - rc:CreateEffectRelation(e) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetLabelObject() - if not rc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetRace(),rc:GetAttribute()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.rthconfilter(c,tp) - return c:IsRitualSummoned() and c:IsSummonPlayer(tp) -end -function s.rthcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.rthconfilter,1,nil,tp) -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,0,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 \ No newline at end of file diff --git a/pre-release/c101301086.lua b/pre-release/c101301086.lua deleted file mode 100644 index 097e6665c9..0000000000 --- a/pre-release/c101301086.lua +++ /dev/null @@ -1,85 +0,0 @@ --- ---Readying of Rites ---scripted by pyrQ -local s,id=GetID() -local TOKEN_SACIFICIAL_OFFERING=id+100 -function s.initial_effect(c) - --Add 1 Fiend Ritual Monster from your Deck to your hand, then if you added a Pendulum Monster, you can Special Summon 1 "Sacrificial Offering Token" (Fiend/DARK/Level 1/ATK 300/DEF 300) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.drcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_SACIFICIAL_OFFERING} -function s.thfilter(c) - return c:IsRace(RACE_FIEND) and c:IsRitualMonster() and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - if sc:IsType(TYPE_PENDULUM) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SACIFICIAL_OFFERING,0,TYPES_TOKEN,300,300,1,RACE_FIEND,ATTRIBUTE_DARK) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local token=Duel.CreateToken(tp,TOKEN_SACIFICIAL_OFFERING) - Duel.BreakEffect() - if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then - token:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) - --While you control that Token, you cannot Special Summon from the Extra Deck - 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 c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - token:RegisterEffect(e1,true) - end - end - end -end -function s.drconfilter(c,tp) - return c:IsRitualMonster() and c:IsControler(tp) -end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and eg:IsExists(s.drconfilter,1,nil,tp) -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c101301087.lua b/pre-release/c101301087.lua deleted file mode 100644 index 30ed6052bb..0000000000 --- a/pre-release/c101301087.lua +++ /dev/null @@ -1,98 +0,0 @@ --- ---Steel-Stringed Sacrifice ---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_HAND|LOCATION_GRAVE) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -function s.effcostfilter(c) - return c:IsLevelAbove(5) and not c:IsPublic() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - Duel.ConfirmCards(1-tp,rc) - Duel.ShuffleHand(tp) - e:SetLabelObject(rc) - e:SetLabel(rc:GetOriginalCodeRule()) - rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) -end -function s.thfilter(c) - return c:IsLevelAbove(5) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local b1=c:IsLocation(LOCATION_HAND) and not Duel.HasFlagEffect(tp,id) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - local b2=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+100) and c:IsAbleToHand() - local b3=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+200) - and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) - if chk==0 then return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}, - {b3,aux.Stringid(id,4)}) - Duel.SetTargetParam(op) - Duel.RegisterFlagEffect(tp,id+(op-1)*100,RESET_PHASE|PHASE_END,0,1) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_TOHAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) - elseif op==3 then - e:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local code=e:GetLabel() - local rc=e:GetLabelObject() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,5)) - --Register if the player Normal Summons the revealed monster or a monster with the same original name - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp,eg,ep) return ep==tp and ((rc:HasFlagEffect(id) and eg:IsContains(rc) and rc:IsFaceup()) or eg:IsExists(aux.FaceupFilter(Card.IsOriginalCodeRule,code),1,nil)) end) - e1:SetOperation(function(e) e:SetLabel(1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --During the End Phase of this turn, lose 1000 LP if you did not Normal Summon the revealed monster, or a monster with the same original name - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(id,6)) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(function() return e1:GetLabel()==0 end) - e2:SetOperation(function(e,tp) Duel.SetLP(tp,Duel.GetLP(tp)-1000) end) - Duel.RegisterEffect(e2,tp) - if not c:IsRelateToEffect(e) then return end - local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if op==1 then - --Special Summon this card from your hand - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - elseif op==2 then - --Add this card from your GY to your hand - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - elseif op==3 then - --Banish this card from your GY, and if you do, add 1 Level 5 or higher monster from your GY to your hand - if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_REMOVED) then return end - 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 -end \ No newline at end of file diff --git a/pre-release/c101301088.lua b/pre-release/c101301088.lua deleted file mode 100644 index f66e6fb0ce..0000000000 --- a/pre-release/c101301088.lua +++ /dev/null @@ -1,81 +0,0 @@ ---Japanese name ---Xyz Lay ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - local e0=aux.AddEquipProcedure(c) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - --The equipped monster gains 200 ATK for each Xyz Material attached to a monster on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(function(e) return 200*Duel.GetOverlayCount(0,1,1) end) - c:RegisterEffect(e1) - --Activate the following effect, based on the equipped monster's card type - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) - e2:SetCost(s.effcost) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_XYZ} -function s.thcfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsDiscardable() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetEquipTarget() - if chk==0 then return not ec:IsType(TYPE_XYZ) or Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_COST) end - if ec:IsType(TYPE_XYZ) then - Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST) - end -end -function s.setfilter(c) - return c:IsSetCard(SET_XYZ) and c:IsSpellTrap() and c:IsSSetable() -end -function s.spfilter(c,e,tp,lv) - return c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetEquipTarget() - local b1=ec:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - local b2=not ec:IsType(TYPE_XYZ) and ec:HasLevel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,ec:GetLevel()) - if chk==0 then return b1 or b2 end - if b1 then - e:SetLabel(1) - e:SetCategory(0) - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) - elseif b2 then - e:SetLabel(2) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Set 1 "Xyz" Spell/Trap from your Deck - 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 - elseif op==2 then - --Special Summon 1 monster with the same Level as the equipped monster from your hand in Defense Position - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,c:GetEquipTarget():GetLevel()):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --Negate its effects - sc:NegateEffects(c) - end - Duel.SpecialSummonComplete() - end -end \ No newline at end of file diff --git a/pre-release/c101301089.lua b/pre-release/c101301089.lua deleted file mode 100644 index 2175ab4fba..0000000000 --- a/pre-release/c101301089.lua +++ /dev/null @@ -1,72 +0,0 @@ --- ---Psychic Omnibuster ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Psychic monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) - --Look at 1 random card in your opponent's hand, and if it is the declared card type, apply these effects in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&(LOCATION_MZONE|LOCATION_SZONE)>0 end) - e1:SetCost(Cost.PayLP(2000)) - e1:SetTarget(s.looktg) - e1:SetOperation(s.lookop) - c:RegisterEffect(e1) - aux.GlobalCheck(s,function() - s.declared_types={} - s.declared_types[0]=0 - s.declared_types[1]=0 - aux.AddValuesReset(function() - s.declared_types[0]=0 - s.declared_types[1]=0 - end) - end) -end -function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) - local declared_types=s.declared_types[tp] - if chk==0 then return declared_types~=(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local op=Duel.SelectEffect(tp, - {declared_types&TYPE_MONSTER==0,DECLTYPE_MONSTER}, - {declared_types&TYPE_SPELL==0,DECLTYPE_SPELL}, - {declared_types&TYPE_TRAP==0,DECLTYPE_TRAP}) - local typ=1<<(op-1) - s.declared_types[tp]=declared_types|typ - Duel.SetTargetParam(typ) -end -function s.lookop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end - local rc=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1):GetFirst() - Duel.ConfirmCards(tp,rc) - Duel.ShuffleHand(1-tp) - local typ=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if not rc:IsType(typ) then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local desc=(typ==TYPE_MONSTER and 3010) - or (typ==TYPE_SPELL and 3011) - or (typ==TYPE_TRAP and 3012) - Duel.BreakEffect() - --This card cannot be destroyed by the effects of the declared card type this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(desc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(function(e,te) return te:IsActiveType(typ) end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end - if rc:IsAbleToRemove() then - Duel.BreakEffect() - --Banish the card you looked at, face-up, until the End Phase - aux.RemoveUntil(rc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end) - end -end \ No newline at end of file diff --git a/pre-release/c101301090.lua b/pre-release/c101301090.lua deleted file mode 100644 index 0fe6854615..0000000000 --- a/pre-release/c101301090.lua +++ /dev/null @@ -1,59 +0,0 @@ --- ---R.B. Ga10 Driller ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Destroy both 1 monster your opponent controls and this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(s.descon) - e2:SetCost(Cost.PayLP(500)) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) -end -function s.desconfilter(c,ec,lg) - return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil,tp)+e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsMonster() then - Duel.Destroy(Group.FromCards(tc,c),REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301091.lua b/pre-release/c101301091.lua deleted file mode 100644 index c20fdbf914..0000000000 --- a/pre-release/c101301091.lua +++ /dev/null @@ -1,62 +0,0 @@ --- ---R.B. Ga10 Cutter ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Destroy this card, and if you do, negate a Spell/Trap Card or effect activated by your opponent, and if you do that, destroy that card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetCost(Cost.PayLP(700)) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) -end -function s.desconfilter(c,ec,lg) - return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) - and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - local c=e:GetHandler() - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and rc:IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg+c,2,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 - and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301092.lua b/pre-release/c101301092.lua deleted file mode 100644 index 750a65ebd1..0000000000 --- a/pre-release/c101301092.lua +++ /dev/null @@ -1,61 +0,0 @@ --- ---R.B. VALCan Rocket ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Destroy up to 2 cards your opponent controls, also this card, and if you do, inflict 500 damage to your opponent for each card destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetCost(Cost.PayLP(1000)) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) -end -function s.desconfilter(c,ec,lg) - return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil,tp)+e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e) - if c:IsRelateToEffect(e) then tg:AddCard(c) end - if #tg==0 then return end - local dam=Duel.Destroy(tg,REASON_EFFECT)*500 - if dam>0 then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301093.lua b/pre-release/c101301093.lua deleted file mode 100644 index 5af62abb67..0000000000 --- a/pre-release/c101301093.lua +++ /dev/null @@ -1,86 +0,0 @@ --- ---R.B. VALCan Booster ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 Machine monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2,2) - --Add 1 "R.B." 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():IsLinkSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon 1 "R.B." monster from your hand or GY in Defense Position, then you can move this card you control to another of your Main Monster Zones - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_EMZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.thfilter(c) - return c:IsSetCard(SET_RB) and c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 - and c:IsRelateToEffect(e) and c:IsControler(tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) - local seq=math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2) - Duel.BreakEffect() - Duel.MoveSequence(c,seq) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters with 1500 or less ATK - 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(RACE_MACHINE) and c:IsAttackBelow(1500)) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) - local atk=c:GetTextAttack() - return not c:IsOriginalRace(RACE_MACHINE) or atk==-2 or atk>1500 - end) -end \ No newline at end of file diff --git a/pre-release/c101301094.lua b/pre-release/c101301094.lua deleted file mode 100644 index 9b08ee05bf..0000000000 --- a/pre-release/c101301094.lua +++ /dev/null @@ -1,69 +0,0 @@ ---JP Name ---R.B. The Brute Blues ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ Machine monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2) - --Gains total original ATK of "R.B." monsters this card points to while it points to a "R.B." monster - 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:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) - e1:SetValue(s.atkval) - c:RegisterEffect(e1) - --Can make a second attack during each Battle Phase while it points to a "R.B." monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) - e2:SetValue(1) - c:RegisterEffect(e2) - --Cannot be destroyed by battle or card effects while it points to a "R.B." monster - 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:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e4) - --Add 1 "R.B." card from your Deck to your hand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1,id) - e5:SetTarget(s.thtg) - e5:SetOperation(s.thop) - c:RegisterEffect(e5) -end -s.listed_series={SET_RB} -function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_RB) and c:GetBaseAttack()>=0 -end -function s.atkval(e,c) - return c:GetLinkedGroup():Filter(s.atkfilter,nil):GetSum(Card.GetBaseAttack) -end -function s.thfilter(c) - return c:IsSetCard(SET_RB) 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/c101301095.lua b/pre-release/c101301095.lua deleted file mode 100644 index 69dde151b5..0000000000 --- a/pre-release/c101301095.lua +++ /dev/null @@ -1,83 +0,0 @@ ---JP Name ---R.B. Funk Dock ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "R.B." card from your Deck to your hand, except "R.B. Funk Dock" - 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(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Gain 500 LP each time a monster(s) your opponent controls is destroyed - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_FZONE) - e2:SetCondition(s.lpcon) - e2:SetOperation(function(e) Duel.Hint(HINT_CARD,0,id) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) end) - c:RegisterEffect(e2) - --Special Summon 1 "R.B." monster from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.spcon) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_RB} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_RB) and c:IsAbleToHand() and not c:IsCode(id) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.lpconfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.lpcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.lpconfilter,1,nil,1-tp) -end -function s.spconfilter(c,tp) - return c:IsPreviousSetCard(SET_RB) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) - and c:IsReason(REASON_EFFECT) -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_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/pre-release/c101301096.lua b/pre-release/c101301096.lua deleted file mode 100644 index c8137974be..0000000000 --- a/pre-release/c101301096.lua +++ /dev/null @@ -1,69 +0,0 @@ ---JP Name ---R.B. Stage Landing ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "R.B." monster from your Deck/Extra Deck 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:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) - --If an "R.B." monster(s) you control would be destroyed, you can banish this card from your GY instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE) - 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 -s.listed_series={SET_RB} -function s.spcost(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 card, except Machine monsters with 1500 or less original ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spfilter(c,e,tp) - if not (c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil)) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetMZoneCount(tp)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_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 -function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_RB) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end - return Duel.SelectEffectYesNo(tp,c,96) -end \ No newline at end of file diff --git a/pre-release/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 95a23f9ef8..0000000000 --- a/pre-release/c101302008.lua +++ /dev/null @@ -1,82 +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) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) - 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 return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) 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()):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 d6e8688e37..0000000000 --- a/pre-release/c101302009.lua +++ /dev/null @@ -1,72 +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) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) - 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 return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) 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()):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 c39f015e47..0000000000 --- a/pre-release/c101302010.lua +++ /dev/null @@ -1,68 +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) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) - 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 return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) 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()):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/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/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/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 40fb0171af..0000000000 --- a/pre-release/c101302034.lua +++ /dev/null @@ -1,85 +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) and re:GetHandler():IsRelateToEffect(re) - and Duel.Destroy(eg,REASON_EFFECT)>0 and 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 \ No newline at end of file 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/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 ad84af1172..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) - --You can 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) - --You can 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_INNOCENT} -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_INNOCENT) -end -function s.thtgcon(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE|REASON_EFFECT) 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 \ 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/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_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 b53ebc14e5..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_INNOCENT} -function s.spfilter(c,e,tp) - return c:IsCode(CARD_MEDIUS_THE_INNOCENT) 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 aa64d256fc..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_ARTMEGIA} -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_ARTMEGIA) 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_ARTMEGIA) 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/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/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/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 eeb50d8ec7..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_ARTMEGIA} -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_ARTMEGIA) 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_ARTMEGIA) 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/c101302101.lua b/pre-release/c101302101.lua deleted file mode 100644 index aef09c86fb..0000000000 --- a/pre-release/c101302101.lua +++ /dev/null @@ -1,78 +0,0 @@ ---DDランス・ソルジャー ---D/D Lance Soldier ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.lvtg) - e1:SetOperation(s.lvop) - c:RegisterEffect(e1) - --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DARK_CONTRACT} -function s.lvfilter(c) - return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) - if ct==0 then return end - local lv=Duel.AnnounceLevel(tp,1,ct) - if lv then - tc:UpdateLevel(lv,nil,e:GetHandler()) - end -end -function s.desfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) - and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302102.lua b/pre-release/c101302102.lua deleted file mode 100644 index e331afd54a..0000000000 --- a/pre-release/c101302102.lua +++ /dev/null @@ -1,102 +0,0 @@ ---DDディフェンス・ソルジャー ---D/D Defense Soldier ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DDD} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.limcostfilter(c) - return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) - local b2=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - elseif op==2 then - e:SetCategory(0) - e:SetProperty(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - local op=e:GetLabel() - if op==1 then - --Special Summon 1 "D/D" card in your Pendulum Zone - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetCondition(s.actcon) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.actcon(e) - local tc=Duel.GetAttacker() - return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) -end -function s.thfilter(c) - return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101302103.lua b/pre-release/c101302103.lua deleted file mode 100644 index 98f9147c64..0000000000 --- a/pre-release/c101302103.lua +++ /dev/null @@ -1,104 +0,0 @@ ---DDD零死王ゼロ・マキナ ---D/D/D Zero Demise King Zero Machinex ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Check if it was activated this turn - local e0=Effect.CreateEffect(c) - e0:SetDescription(1160) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetRange(LOCATION_HAND) - e0:SetCost(s.actreg) - c:RegisterEffect(e0) - --Place 1 "Dark Contract" Continuous Spell/Trap on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_EXTRA) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Place this card in the Pendulum Zone if it's destroyed - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e3:SetOperation(s.penop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_CONTRACT,SET_DDD} -s.listed_names={id} -function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.plfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function s.spconfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) - and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.penop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua deleted file mode 100644 index 73710e3b3b..0000000000 --- a/pre-release/c101302104.lua +++ /dev/null @@ -1,171 +0,0 @@ ---DDDD偉次元王アーク・クライシス ---D/D/D/D Great Dimension King Arc Crisis ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) - Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) - --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY - Fusion.AddContactProc(c,s.contactfil,s.contactop,false) - c:AddMustBeFusionSummoned() - --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetCondition(s.regcon) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the effects of all face-up monsters your opponent currently controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Can attack all monsters your opponent controls once each - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetValue(1) - c:RegisterEffect(e3) - --Place this card in your Pendulum Zone - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e4:SetOperation(s.penop) - c:RegisterEffect(e4) -end -s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} -s.miracle_synchro_fusion=true -function s.matfilter(typ) - return function(c,fc,sumtype,tp) - return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) - end -end -function s.contactfil(tp) - local loc=LOCATION_ONFIELD|LOCATION_GRAVE - if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end - return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) -end -function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) -end -function s.regcon(e) - local c=e:GetHandler() - return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.desfilter(c,e,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) -end -function s.spfilter(c,e,tp,dc) - if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end - local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.rescon(mmz_ct,linkmz_ct) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct - and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if tg==0 then return end - local ct=Duel.Destroy(tg,REASON_EFFECT) - if ct==0 then return end - local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) - local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) - local ft=math.min(mmz_ct+emz_ct,ct) - if ft<=0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) - if #sg==0 then return end - local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) - local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) - local priority_0,priority_1 - if linkmz_ct0 - and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua deleted file mode 100644 index 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 cacb8cf34c701fa2c15b1ceba4dfce865c917f46 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 14 Jul 2025 21:23:03 +0300 Subject: [PATCH 2/2] Add files via upload --- official/c18988396.lua | 64 ++++++++++++++ official/c19000848.lua | 78 +++++++++++++++++ official/c32216688.lua | 69 +++++++++++++++ official/c33438265.lua | 62 ++++++++++++++ official/c43150717.lua | 81 ++++++++++++++++++ official/c44376395.lua | 93 ++++++++++++++++++++ official/c45409943.lua | 86 +++++++++++++++++++ official/c5109321.lua | 69 +++++++++++++++ official/c6043161.lua | 59 +++++++++++++ official/c6821579.lua | 86 +++++++++++++++++++ official/c70659412.lua | 72 ++++++++++++++++ official/c71593652.lua | 48 +++++++++++ official/c7166709.lua | 98 +++++++++++++++++++++ official/c71771004.lua | 85 ++++++++++++++++++ official/c78710386.lua | 83 ++++++++++++++++++ official/c79436874.lua | 61 +++++++++++++ pre-release/c100200277.lua | 81 ++++++++++++++++++ pre-release/c100201001.lua | 42 +++++++++ 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 | 112 ++++++++++++++++++++++++ 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 | 63 ++++++++++++++ pre-release/c100443103.lua | 66 ++++++++++++++ pre-release/c100443104.lua | 76 +++++++++++++++++ pre-release/c100443105.lua | 37 ++++++++ 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/c101302006.lua | 91 ++++++++++++++++++++ pre-release/c101302007.lua | 69 +++++++++++++++ pre-release/c101302008.lua | 82 ++++++++++++++++++ pre-release/c101302009.lua | 72 ++++++++++++++++ pre-release/c101302010.lua | 68 +++++++++++++++ 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/c101302020.lua | 95 +++++++++++++++++++++ pre-release/c101302021.lua | 120 ++++++++++++++++++++++++++ pre-release/c101302030.lua | 64 ++++++++++++++ pre-release/c101302032.lua | 101 ++++++++++++++++++++++ pre-release/c101302033.lua | 65 ++++++++++++++ pre-release/c101302034.lua | 85 ++++++++++++++++++ pre-release/c101302036.lua | 65 ++++++++++++++ pre-release/c101302037.lua | 78 +++++++++++++++++ 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/c101302050.lua | 74 ++++++++++++++++ pre-release/c101302053.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/c101302065.lua | 85 ++++++++++++++++++ pre-release/c101302066.lua | 103 ++++++++++++++++++++++ pre-release/c101302069.lua | 93 ++++++++++++++++++++ pre-release/c101302070.lua | 78 +++++++++++++++++ pre-release/c101302071.lua | 60 +++++++++++++ pre-release/c101302074.lua | 96 +++++++++++++++++++++ pre-release/c101302075.lua | 95 +++++++++++++++++++++ pre-release/c101302076.lua | 122 ++++++++++++++++++++++++++ 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 +++++++++++++++++++++ 96 files changed, 7545 insertions(+) create mode 100644 official/c18988396.lua create mode 100644 official/c19000848.lua create mode 100644 official/c32216688.lua create mode 100644 official/c33438265.lua create mode 100644 official/c43150717.lua create mode 100644 official/c44376395.lua create mode 100644 official/c45409943.lua create mode 100644 official/c5109321.lua create mode 100644 official/c6043161.lua create mode 100644 official/c6821579.lua create mode 100644 official/c70659412.lua create mode 100644 official/c71593652.lua create mode 100644 official/c7166709.lua create mode 100644 official/c71771004.lua create mode 100644 official/c78710386.lua create mode 100644 official/c79436874.lua create mode 100644 pre-release/c100200277.lua create mode 100644 pre-release/c100201001.lua create mode 100644 pre-release/c100201002.lua create mode 100644 pre-release/c100201003.lua create mode 100644 pre-release/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/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 create mode 100644 pre-release/c101302006.lua create mode 100644 pre-release/c101302007.lua create mode 100644 pre-release/c101302008.lua create mode 100644 pre-release/c101302009.lua create mode 100644 pre-release/c101302010.lua create mode 100644 pre-release/c101302011.lua create mode 100644 pre-release/c101302012.lua create mode 100644 pre-release/c101302013.lua create mode 100644 pre-release/c101302014.lua create mode 100644 pre-release/c101302015.lua create mode 100644 pre-release/c101302016.lua create mode 100644 pre-release/c101302017.lua create mode 100644 pre-release/c101302020.lua create mode 100644 pre-release/c101302021.lua create mode 100644 pre-release/c101302030.lua create mode 100644 pre-release/c101302032.lua create mode 100644 pre-release/c101302033.lua create mode 100644 pre-release/c101302034.lua create mode 100644 pre-release/c101302036.lua create mode 100644 pre-release/c101302037.lua create mode 100644 pre-release/c101302041.lua create mode 100644 pre-release/c101302042.lua create mode 100644 pre-release/c101302044.lua create mode 100644 pre-release/c101302045.lua create mode 100644 pre-release/c101302046.lua create mode 100644 pre-release/c101302050.lua create mode 100644 pre-release/c101302053.lua create mode 100644 pre-release/c101302056.lua create mode 100644 pre-release/c101302057.lua create mode 100644 pre-release/c101302058.lua create mode 100644 pre-release/c101302059.lua create mode 100644 pre-release/c101302060.lua create mode 100644 pre-release/c101302061.lua create mode 100644 pre-release/c101302062.lua create mode 100644 pre-release/c101302063.lua create mode 100644 pre-release/c101302065.lua create mode 100644 pre-release/c101302066.lua create mode 100644 pre-release/c101302069.lua create mode 100644 pre-release/c101302070.lua create mode 100644 pre-release/c101302071.lua create mode 100644 pre-release/c101302074.lua create mode 100644 pre-release/c101302075.lua create mode 100644 pre-release/c101302076.lua create mode 100644 pre-release/c101302101.lua create mode 100644 pre-release/c101302102.lua create mode 100644 pre-release/c101302103.lua create mode 100644 pre-release/c101302104.lua create mode 100644 pre-release/c101302105.lua create mode 100644 pre-release/c101302106.lua create mode 100644 pre-release/c101302107.lua create mode 100644 pre-release/c101302108.lua create mode 100644 pre-release/c101302109.lua diff --git a/official/c18988396.lua b/official/c18988396.lua new file mode 100644 index 0000000000..82ec4b92a0 --- /dev/null +++ b/official/c18988396.lua @@ -0,0 +1,64 @@ +-- +--Miracle Raven +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c) + c:AddMustBeRitualSummoned() + --Ritual Summon this card, by Tributing monsters from your hand or field whose total Levels equal or exceed 1 + local e1=Ritual.CreateProc({ + handler=c, + lvtype=RITPROC_GREATER, + filter=function(rc) return rc==c end, + lv=1, + location=LOCATION_PZONE, + desc=aux.Stringid(id,0), + self=true + }) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1) + c:RegisterEffect(e1) + --This Ritual Summoned card is unaffected by your opponent's activated effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e2:SetValue(function(e,te) return te:IsActivated() and te:GetOwnerPlayer()==1-e:GetHandlerPlayer() end) + c:RegisterEffect(e2) + --If you Ritual Summon exactly 1 Ritual Monster with a card effect that requires use of monsters, this card you control can be used as the entire Tribute + local e3=Ritual.AddWholeLevelTribute(c,aux.TRUE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetRange(LOCATION_MZONE) + --Add 1 Ritual Monster from your Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_RELEASE) + e4:SetCountLimit(1,id) + e4:SetCondition(function(e) return e:GetHandler():IsReason(REASON_RITUAL) end) + e4:SetTarget(s.thtg) + e4:SetOperation(s.thop) + c:RegisterEffect(e4) +end +s.listed_names={id} +function s.thfilter(c) + return c:IsRitualMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end diff --git a/official/c19000848.lua b/official/c19000848.lua new file mode 100644 index 0000000000..0cfd8696e8 --- /dev/null +++ b/official/c19000848.lua @@ -0,0 +1,78 @@ +--Japanese name +--Buio the Dawn's Light +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Monsters in your leftmost or rightmost Main Monster Zones 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(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Negate the effects of 1 Fiend Effect Monster you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Mutiny in the Sky" from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={71593652} --"Mutiny in the Sky" +function s.disfilter(c) + return c:IsRace(RACE_FIEND) and c:IsType(TYPE_EFFECT) and c:IsNegatableMonster() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then + --Negate its effects + tc:NegateEffects(c) + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.thfilter(c) + return c:IsCode(71593652) 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/c32216688.lua b/official/c32216688.lua new file mode 100644 index 0000000000..9b08ee05bf --- /dev/null +++ b/official/c32216688.lua @@ -0,0 +1,69 @@ +--JP Name +--R.B. The Brute Blues +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ Machine monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2) + --Gains total original ATK of "R.B." monsters this card points to while it points to a "R.B." monster + 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:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --Can make a second attack during each Battle Phase while it points to a "R.B." monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_EXTRA_ATTACK) + e2:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e2:SetValue(1) + c:RegisterEffect(e2) + --Cannot be destroyed by battle or card effects while it points to a "R.B." monster + 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:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e3:SetValue(1) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e4) + --Add 1 "R.B." card from your Deck to your hand + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,0)) + e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1,id) + e5:SetTarget(s.thtg) + e5:SetOperation(s.thop) + c:RegisterEffect(e5) +end +s.listed_series={SET_RB} +function s.atkfilter(c) + return c:IsFaceup() and c:IsSetCard(SET_RB) and c:GetBaseAttack()>=0 +end +function s.atkval(e,c) + return c:GetLinkedGroup():Filter(s.atkfilter,nil):GetSum(Card.GetBaseAttack) +end +function s.thfilter(c) + return c:IsSetCard(SET_RB) 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/c33438265.lua b/official/c33438265.lua new file mode 100644 index 0000000000..c20fdbf914 --- /dev/null +++ b/official/c33438265.lua @@ -0,0 +1,62 @@ +-- +--R.B. Ga10 Cutter +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy this card, and if you do, negate a Spell/Trap Card or effect activated by your opponent, and if you do that, destroy that card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(700)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return rp==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) + and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return true end + local c=e:GetHandler() + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg+c,2,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 + and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c43150717.lua b/official/c43150717.lua new file mode 100644 index 0000000000..f66e6fb0ce --- /dev/null +++ b/official/c43150717.lua @@ -0,0 +1,81 @@ +--Japanese name +--Xyz Lay +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + local e0=aux.AddEquipProcedure(c) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + --The equipped monster gains 200 ATK for each Xyz Material attached to a monster on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(function(e) return 200*Duel.GetOverlayCount(0,1,1) end) + c:RegisterEffect(e1) + --Activate the following effect, based on the equipped monster's card type + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) + e2:SetCost(s.effcost) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_XYZ} +function s.thcfilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsDiscardable() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local ec=e:GetHandler():GetEquipTarget() + if chk==0 then return not ec:IsType(TYPE_XYZ) or Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_COST) end + if ec:IsType(TYPE_XYZ) then + Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_XYZ) and c:IsSpellTrap() and c:IsSSetable() +end +function s.spfilter(c,e,tp,lv) + return c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local ec=e:GetHandler():GetEquipTarget() + local b1=ec:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + local b2=not ec:IsType(TYPE_XYZ) and ec:HasLevel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,ec:GetLevel()) + if chk==0 then return b1 or b2 end + if b1 then + e:SetLabel(1) + e:SetCategory(0) + Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) + elseif b2 then + e:SetLabel(2) + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Set 1 "Xyz" Spell/Trap from your Deck + 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 + elseif op==2 then + --Special Summon 1 monster with the same Level as the equipped monster from your hand in Defense Position + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,c:GetEquipTarget():GetLevel()):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Negate its effects + sc:NegateEffects(c) + end + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/official/c44376395.lua b/official/c44376395.lua new file mode 100644 index 0000000000..ae89096a2d --- /dev/null +++ b/official/c44376395.lua @@ -0,0 +1,93 @@ +-- +--ASHLAN U1000 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters with different Types and Attributes + Link.AddProcedure(c,nil,2,nil,s.spcheck) + --If a Ritual Monster this card points to attacks a Defense Position monster, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(function(e,c) return c:IsRitualMonster() and e:GetHandler():GetLinkedGroup():IsContains(c) end) + c:RegisterEffect(e1) + --Add 1 Ritual Monster with a different Type and Attribute than the revealed monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Return 1 face-up card your opponent controls to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.rthcon) + e3:SetTarget(s.rthtg) + e3:SetOperation(s.rthop) + c:RegisterEffect(e3) +end +function s.spcheck(g,lc,sumtype,tp) + return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) and g:CheckDifferentPropertyBinary(Card.GetAttribute,lc,sumtype,tp) +end +function s.thcostfilter(c,tp) + return c:IsRitualMonster() and not c:IsPublic() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace(),c:GetAttribute()) +end +function s.thfilter(c,race,attribute) + return c:IsRitualMonster() and c:IsDifferentRace(race) and c:IsAttributeExcept(attribute) and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + rc:CreateEffectRelation(e) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local rc=e:GetLabelObject() + if not rc:IsRelateToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetRace(),rc:GetAttribute()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.rthconfilter(c,tp) + return c:IsRitualSummoned() and c:IsSummonPlayer(tp) +end +function s.rthcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.rthconfilter,1,nil,tp) +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc:IsAbleToHand() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,0,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 \ No newline at end of file diff --git a/official/c45409943.lua b/official/c45409943.lua new file mode 100644 index 0000000000..eaab6fd385 --- /dev/null +++ b/official/c45409943.lua @@ -0,0 +1,86 @@ +--Japanese name +--Luce the Dusk's Dark +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Fiend and/or Fairy monsters in your GY + Fusion.AddProcMixN(c,true,true,s.fusionmatfilter,3) + --Monsters in your leftmost or rightmost Main Monster Zones 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(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Send 1 Fiend or Fairy monster from your Deck to the GY, and if you do, destroy 1 card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.tgdestg) + e2:SetOperation(s.tgdesop) + c:RegisterEffect(e2) + --Destroy 1 card on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.descon) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +function s.fusionmatfilter(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND|RACE_FAIRY,fc,sumtype,tp) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) +end +function s.tgfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToGrave() +end +function s.tgdestg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.tgdesop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT) and g:GetFirst():IsLocation(LOCATION_GRAVE) then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + end +end +function s.desconfilter(c,tp) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.desconfilter,1,nil,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c5109321.lua b/official/c5109321.lua new file mode 100644 index 0000000000..c8137974be --- /dev/null +++ b/official/c5109321.lua @@ -0,0 +1,69 @@ +--JP Name +--R.B. Stage Landing +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "R.B." monster from your Deck/Extra Deck 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:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) + --If an "R.B." monster(s) you control would be destroyed, you can banish this card from your GY instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_GRAVE) + 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 +s.listed_series={SET_RB} +function s.spcost(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 card, except Machine monsters with 1500 or less original ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spfilter(c,e,tp) + if not (c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil)) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_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 +function s.repfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_RB) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end + return Duel.SelectEffectYesNo(tp,c,96) +end \ No newline at end of file diff --git a/official/c6043161.lua b/official/c6043161.lua new file mode 100644 index 0000000000..0fe6854615 --- /dev/null +++ b/official/c6043161.lua @@ -0,0 +1,59 @@ +-- +--R.B. Ga10 Driller +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy both 1 monster your opponent controls and this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(500)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil,tp)+e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsMonster() then + Duel.Destroy(Group.FromCards(tc,c),REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c6821579.lua b/official/c6821579.lua new file mode 100644 index 0000000000..5af62abb67 --- /dev/null +++ b/official/c6821579.lua @@ -0,0 +1,86 @@ +-- +--R.B. VALCan Booster +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 Machine monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2,2) + --Add 1 "R.B." 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():IsLinkSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon 1 "R.B." monster from your hand or GY in Defense Position, then you can move this card you control to another of your Main Monster Zones + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_EMZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.thfilter(c) + return c:IsSetCard(SET_RB) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 + and c:IsRelateToEffect(e) and c:IsControler(tp) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) + local seq=math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2) + Duel.BreakEffect() + Duel.MoveSequence(c,seq) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters with 1500 or less ATK + 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(RACE_MACHINE) and c:IsAttackBelow(1500)) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) + local atk=c:GetTextAttack() + return not c:IsOriginalRace(RACE_MACHINE) or atk==-2 or atk>1500 + end) +end \ No newline at end of file diff --git a/official/c70659412.lua b/official/c70659412.lua new file mode 100644 index 0000000000..2175ab4fba --- /dev/null +++ b/official/c70659412.lua @@ -0,0 +1,72 @@ +-- +--Psychic Omnibuster +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Psychic monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) + --Look at 1 random card in your opponent's hand, and if it is the declared card type, apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&(LOCATION_MZONE|LOCATION_SZONE)>0 end) + e1:SetCost(Cost.PayLP(2000)) + e1:SetTarget(s.looktg) + e1:SetOperation(s.lookop) + c:RegisterEffect(e1) + aux.GlobalCheck(s,function() + s.declared_types={} + s.declared_types[0]=0 + s.declared_types[1]=0 + aux.AddValuesReset(function() + s.declared_types[0]=0 + s.declared_types[1]=0 + end) + end) +end +function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) + local declared_types=s.declared_types[tp] + if chk==0 then return declared_types~=(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) + local op=Duel.SelectEffect(tp, + {declared_types&TYPE_MONSTER==0,DECLTYPE_MONSTER}, + {declared_types&TYPE_SPELL==0,DECLTYPE_SPELL}, + {declared_types&TYPE_TRAP==0,DECLTYPE_TRAP}) + local typ=1<<(op-1) + s.declared_types[tp]=declared_types|typ + Duel.SetTargetParam(typ) +end +function s.lookop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end + local rc=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1):GetFirst() + Duel.ConfirmCards(tp,rc) + Duel.ShuffleHand(1-tp) + local typ=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if not rc:IsType(typ) then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local desc=(typ==TYPE_MONSTER and 3010) + or (typ==TYPE_SPELL and 3011) + or (typ==TYPE_TRAP and 3012) + Duel.BreakEffect() + --This card cannot be destroyed by the effects of the declared card type this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(desc) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetValue(function(e,te) return te:IsActiveType(typ) end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end + if rc:IsAbleToRemove() then + Duel.BreakEffect() + --Banish the card you looked at, face-up, until the End Phase + aux.RemoveUntil(rc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end) + end +end \ No newline at end of file diff --git a/official/c71593652.lua b/official/c71593652.lua new file mode 100644 index 0000000000..b17574ac88 --- /dev/null +++ b/official/c71593652.lua @@ -0,0 +1,48 @@ +--Japanese name +--Mutiny in the Sky +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fiend or Fairy Fusion Monster from your Extra Deck, by shuffling Fiend and/or Fairy monsters from your GY into the Deck + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND|RACE_FAIRY),aux.FALSE,s.fextra,Fusion.ShuffleMaterial) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCountLimit(1,id) + 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_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +function s.matfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToDeck() +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil) +end +function s.thcostfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c7166709.lua b/official/c7166709.lua new file mode 100644 index 0000000000..c902f1bc78 --- /dev/null +++ b/official/c7166709.lua @@ -0,0 +1,98 @@ +-- +--Steel-Stringed Sacrifice +--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_HAND|LOCATION_GRAVE) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +function s.effcostfilter(c) + return c:IsLevelAbove(5) and not c:IsPublic() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + e:SetLabel(rc:GetOriginalCodeRule()) + rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) +end +function s.thfilter(c) + return c:IsLevelAbove(5) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local b1=c:IsLocation(LOCATION_HAND) and not Duel.HasFlagEffect(tp,id) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + local b2=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+1) and c:IsAbleToHand() + local b3=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+2) + and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}, + {b3,aux.Stringid(id,4)}) + Duel.SetTargetParam(op) + Duel.RegisterFlagEffect(tp,id+op-1,RESET_PHASE|PHASE_END,0,1) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_TOHAND) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) + elseif op==3 then + e:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local code=e:GetLabel() + local rc=e:GetLabelObject() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,5)) + --Register if the player Normal Summons the revealed monster or a monster with the same original name + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp,eg,ep) return ep==tp and ((rc:HasFlagEffect(id) and eg:IsContains(rc) and rc:IsFaceup()) or eg:IsExists(aux.FaceupFilter(Card.IsOriginalCodeRule,code),1,nil)) end) + e1:SetOperation(function(e) e:SetLabel(1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --During the End Phase of this turn, lose 1000 LP if you did not Normal Summon the revealed monster, or a monster with the same original name + local e2=e1:Clone() + e2:SetDescription(aux.Stringid(id,6)) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetCondition(function() return e1:GetLabel()==0 end) + e2:SetOperation(function(e,tp) Duel.SetLP(tp,Duel.GetLP(tp)-1000) end) + Duel.RegisterEffect(e2,tp) + if not c:IsRelateToEffect(e) then return end + local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if op==1 then + --Special Summon this card from your hand + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + elseif op==2 then + --Add this card from your GY to your hand + Duel.SendtoHand(c,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,c) + elseif op==3 then + --Banish this card from your GY, and if you do, add 1 Level 5 or higher monster from your GY to your hand + if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_REMOVED) then return end + 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 +end \ No newline at end of file diff --git a/official/c71771004.lua b/official/c71771004.lua new file mode 100644 index 0000000000..b308795de3 --- /dev/null +++ b/official/c71771004.lua @@ -0,0 +1,85 @@ +-- +--Readying of Rites +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SACIFICIAL_OFFERING=id+1 +function s.initial_effect(c) + --Add 1 Fiend Ritual Monster from your Deck to your hand, then if you added a Pendulum Monster, you can Special Summon 1 "Sacrificial Offering Token" (Fiend/DARK/Level 1/ATK 300/DEF 300) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.drcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_SACIFICIAL_OFFERING} +function s.thfilter(c) + return c:IsRace(RACE_FIEND) and c:IsRitualMonster() and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + if sc:IsType(TYPE_PENDULUM) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SACIFICIAL_OFFERING,0,TYPES_TOKEN,300,300,1,RACE_FIEND,ATTRIBUTE_DARK) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local token=Duel.CreateToken(tp,TOKEN_SACIFICIAL_OFFERING) + Duel.BreakEffect() + if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then + token:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + --While you control that Token, you cannot Special Summon from the Extra Deck + 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 c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e1,true) + end + end + end +end +function s.drconfilter(c,tp) + return c:IsRitualMonster() and c:IsControler(tp) +end +function s.drcon(e,tp,eg,ep,ev,re,r,rp) + return ep==1-tp and eg:IsExists(s.drconfilter,1,nil,tp) +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c78710386.lua b/official/c78710386.lua new file mode 100644 index 0000000000..69dde151b5 --- /dev/null +++ b/official/c78710386.lua @@ -0,0 +1,83 @@ +--JP Name +--R.B. Funk Dock +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "R.B." card from your Deck to your hand, except "R.B. Funk Dock" + 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(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Gain 500 LP each time a monster(s) your opponent controls is destroyed + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_FZONE) + e2:SetCondition(s.lpcon) + e2:SetOperation(function(e) Duel.Hint(HINT_CARD,0,id) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) end) + c:RegisterEffect(e2) + --Special Summon 1 "R.B." monster from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_LEAVE_FIELD) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_RB} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_RB) and c:IsAbleToHand() and not c:IsCode(id) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.lpconfilter(c,tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.lpcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.lpconfilter,1,nil,1-tp) +end +function s.spconfilter(c,tp) + return c:IsPreviousSetCard(SET_RB) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) + and c:IsReason(REASON_EFFECT) +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_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end diff --git a/official/c79436874.lua b/official/c79436874.lua new file mode 100644 index 0000000000..750a65ebd1 --- /dev/null +++ b/official/c79436874.lua @@ -0,0 +1,61 @@ +-- +--R.B. VALCan Rocket +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy up to 2 cards your opponent controls, also this card, and if you do, inflict 500 damage to your opponent for each card destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(1000)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil,tp)+e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + if c:IsRelateToEffect(e) then tg:AddCard(c) end + if #tg==0 then return end + local dam=Duel.Destroy(tg,REASON_EFFECT)*500 + if dam>0 then + Duel.Damage(1-tp,dam,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100200277.lua b/pre-release/c100200277.lua new file mode 100644 index 0000000000..65c6173297 --- /dev/null +++ b/pre-release/c100200277.lua @@ -0,0 +1,81 @@ +--熒焅聖 アレクゥス +--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 new file mode 100644 index 0000000000..8ee5fa9d59 --- /dev/null +++ b/pre-release/c100201001.lua @@ -0,0 +1,42 @@ +--契約を結びし竜の戦士 +--Dragonic Warrior +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.spcostfilter(c,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() +end diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua new file mode 100644 index 0000000000..9b0c446078 --- /dev/null +++ b/pre-release/c100201002.lua @@ -0,0 +1,31 @@ +--アイン・ロイド +--Einroid +local s,id=GetID() +function s.initial_effect(c) + --Send 2 Level 4 or lower Machine monsters from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) +end +function s.tgfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,2,2,nil) + if #g==2 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua new file mode 100644 index 0000000000..35f72f4627 --- /dev/null +++ b/pre-release/c100201003.lua @@ -0,0 +1,56 @@ +--妖魔ヌリカベ +--Nurikabe +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCondition(aux.exccon) + e1:SetCost(Cost.PayLP(1000)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + for sc in Group.FromCards(c,tc):Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(c) + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + sc:RegisterEffect(e1,true) + end + end + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/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..eccd2eb38e --- /dev/null +++ b/pre-release/c100348032.lua @@ -0,0 +1,112 @@ +--ジャンク・ウォリアー・エクストリーム +--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 sc and 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..8341e1eb8a --- /dev/null +++ b/pre-release/c100443102.lua @@ -0,0 +1,63 @@ +--錬金釜-カオス・ディスティル +--Chaos Distill +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Any card sent to your GY is banished instead + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) + e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_ALL,0) + e1:SetValue(LOCATION_REMOVED) + e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) + c:RegisterEffect(e1) + --Activate 1 of these effects + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +local CARD_MACRO_COSMOS=30241314 +s.listed_names={CARD_MACRO_COSMOS,id} +function s.macrofilter(c) + return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.monsterfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) + local c=e:GetHandler() + local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==2 then + Duel.Remove(c,POS_FACEUP,REASON_COST) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua new file mode 100644 index 0000000000..dfaf24888f --- /dev/null +++ b/pre-release/c100443103.lua @@ -0,0 +1,66 @@ +--ヒーローズルール1 ファイブ・フリーダムス +--Hero's Rule 1: Five Freedoms +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish up to 5 cards from the GYs + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.rmvtg) + e1:SetOperation(s.rmvop) + c:RegisterEffect(e1) + --Special Summon 1 of your banished "Elemental HERO" monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.rmvfilter(c) + return c:IsAbleToRemove() and aux.SpElimFilter(c) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua new file mode 100644 index 0000000000..6e4745de52 --- /dev/null +++ b/pre-release/c100443104.lua @@ -0,0 +1,76 @@ +--デーモンズ・マタドール +--Archfiend Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Cannot be destroyed by battle, also you take no battle damage from battles involving this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + c:RegisterEffect(e3) + --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e4:SetCode(EVENT_BATTLED) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_names={100443105,id} --"Ritual of the Matador" +s.listed_series={SET_ARCHFIEND} +function s.thfilter(c) + return c:IsSetCard(SET_ARCHFIEND) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil) + if #g==2 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + --This card cannot attack for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return bc and bc:IsRelateToBattle() end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,1000,REASON_EFFECT) + end +end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua new file mode 100644 index 0000000000..61c24806c2 --- /dev/null +++ b/pre-release/c100443105.lua @@ -0,0 +1,37 @@ +--マタドール降臨の儀式 ダーク・パセオ +--Ritual of the Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon "Archfiend Matador" + Ritual.AddProcGreaterCode(c,6,nil,100443104) + --Special Summon 1 non-Ritual "Archfiend" monster from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfBanish) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={100443104} --"Archfiend Matador" +s.listed_series={SET_ARCHFIEND} +function s.spfilter(c,e,tp) + return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/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 diff --git a/pre-release/c101302006.lua b/pre-release/c101302006.lua new file mode 100644 index 0000000000..9dc7f1a534 --- /dev/null +++ b/pre-release/c101302006.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/pre-release/c101302007.lua b/pre-release/c101302007.lua new file mode 100644 index 0000000000..32c0a8dd1e --- /dev/null +++ b/pre-release/c101302007.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/pre-release/c101302008.lua b/pre-release/c101302008.lua new file mode 100644 index 0000000000..95a23f9ef8 --- /dev/null +++ b/pre-release/c101302008.lua @@ -0,0 +1,82 @@ +--終刻竜機ⅩⅡ-ドラスティア +--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) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) + 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 return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) 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()):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 new file mode 100644 index 0000000000..d6e8688e37 --- /dev/null +++ b/pre-release/c101302009.lua @@ -0,0 +1,72 @@ +--終刻竜機Ⅴ-アマルテ +--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) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) + 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 return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) 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()):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 new file mode 100644 index 0000000000..c39f015e47 --- /dev/null +++ b/pre-release/c101302010.lua @@ -0,0 +1,68 @@ +--終刻竜機Ⅶ-エララ +--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) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) + 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 return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) 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()):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 new file mode 100644 index 0000000000..94fc2ca5b1 --- /dev/null +++ b/pre-release/c101302011.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={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 new file mode 100644 index 0000000000..29b8b7dde0 --- /dev/null +++ b/pre-release/c101302012.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/pre-release/c101302013.lua b/pre-release/c101302013.lua new file mode 100644 index 0000000000..8abade161a --- /dev/null +++ b/pre-release/c101302013.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/pre-release/c101302014.lua b/pre-release/c101302014.lua new file mode 100644 index 0000000000..b5f232509a --- /dev/null +++ b/pre-release/c101302014.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/pre-release/c101302015.lua b/pre-release/c101302015.lua new file mode 100644 index 0000000000..afc372648c --- /dev/null +++ b/pre-release/c101302015.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/pre-release/c101302016.lua b/pre-release/c101302016.lua new file mode 100644 index 0000000000..edee6484a5 --- /dev/null +++ b/pre-release/c101302016.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/pre-release/c101302017.lua b/pre-release/c101302017.lua new file mode 100644 index 0000000000..b14388bfcc --- /dev/null +++ b/pre-release/c101302017.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/pre-release/c101302020.lua b/pre-release/c101302020.lua new file mode 100644 index 0000000000..1ee6aab373 --- /dev/null +++ b/pre-release/c101302020.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/pre-release/c101302021.lua b/pre-release/c101302021.lua new file mode 100644 index 0000000000..a9783f4bed --- /dev/null +++ b/pre-release/c101302021.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/pre-release/c101302030.lua b/pre-release/c101302030.lua new file mode 100644 index 0000000000..c2ee35ab73 --- /dev/null +++ b/pre-release/c101302030.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 diff --git a/pre-release/c101302032.lua b/pre-release/c101302032.lua new file mode 100644 index 0000000000..ad5395d63c --- /dev/null +++ b/pre-release/c101302032.lua @@ -0,0 +1,101 @@ +--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 new file mode 100644 index 0000000000..36a5722bba --- /dev/null +++ b/pre-release/c101302033.lua @@ -0,0 +1,65 @@ +--メガリス・フローチュ +--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 new file mode 100644 index 0000000000..40fb0171af --- /dev/null +++ b/pre-release/c101302034.lua @@ -0,0 +1,85 @@ +--メガリス・ノートラ・プルーラ +--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) and re:GetHandler():IsRelateToEffect(re) + and Duel.Destroy(eg,REASON_EFFECT)>0 and 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 \ No newline at end of file diff --git a/pre-release/c101302036.lua b/pre-release/c101302036.lua new file mode 100644 index 0000000000..058362801f --- /dev/null +++ b/pre-release/c101302036.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/pre-release/c101302037.lua b/pre-release/c101302037.lua new file mode 100644 index 0000000000..205074e3c5 --- /dev/null +++ b/pre-release/c101302037.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/pre-release/c101302041.lua b/pre-release/c101302041.lua new file mode 100644 index 0000000000..8f251719c5 --- /dev/null +++ b/pre-release/c101302041.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/pre-release/c101302042.lua b/pre-release/c101302042.lua new file mode 100644 index 0000000000..eb5b34e36e --- /dev/null +++ b/pre-release/c101302042.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/pre-release/c101302044.lua b/pre-release/c101302044.lua new file mode 100644 index 0000000000..e28d6cfd0a --- /dev/null +++ b/pre-release/c101302044.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/pre-release/c101302045.lua b/pre-release/c101302045.lua new file mode 100644 index 0000000000..c619825d69 --- /dev/null +++ b/pre-release/c101302045.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/pre-release/c101302046.lua b/pre-release/c101302046.lua new file mode 100644 index 0000000000..ad84af1172 --- /dev/null +++ b/pre-release/c101302046.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) + --You can 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) + --You can 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_INNOCENT} +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_INNOCENT) +end +function s.thtgcon(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + return c:IsReason(REASON_BATTLE|REASON_EFFECT) 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 \ No newline at end of file diff --git a/pre-release/c101302050.lua b/pre-release/c101302050.lua new file mode 100644 index 0000000000..d341bd7ce3 --- /dev/null +++ b/pre-release/c101302050.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/pre-release/c101302053.lua b/pre-release/c101302053.lua new file mode 100644 index 0000000000..c78b29c400 --- /dev/null +++ b/pre-release/c101302053.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 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 new file mode 100644 index 0000000000..a3de63f896 --- /dev/null +++ b/pre-release/c101302057.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/pre-release/c101302058.lua b/pre-release/c101302058.lua new file mode 100644 index 0000000000..594519672c --- /dev/null +++ b/pre-release/c101302058.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/pre-release/c101302059.lua b/pre-release/c101302059.lua new file mode 100644 index 0000000000..b53ebc14e5 --- /dev/null +++ b/pre-release/c101302059.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_INNOCENT} +function s.spfilter(c,e,tp) + return c:IsCode(CARD_MEDIUS_THE_INNOCENT) 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 new file mode 100644 index 0000000000..aa64d256fc --- /dev/null +++ b/pre-release/c101302060.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_ARTMEGIA} +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_ARTMEGIA) 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_ARTMEGIA) 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 new file mode 100644 index 0000000000..f86aad1ed9 --- /dev/null +++ b/pre-release/c101302061.lua @@ -0,0 +1,84 @@ +--絢嵐たる献詠 +--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 new file mode 100644 index 0000000000..ebf57437bf --- /dev/null +++ b/pre-release/c101302062.lua @@ -0,0 +1,84 @@ +--絢嵐たる顕現 +--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 new file mode 100644 index 0000000000..f682f289f3 --- /dev/null +++ b/pre-release/c101302063.lua @@ -0,0 +1,97 @@ +--絢嵐たる見神 +--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/c101302065.lua b/pre-release/c101302065.lua new file mode 100644 index 0000000000..1b968a6e77 --- /dev/null +++ b/pre-release/c101302065.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+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 new file mode 100644 index 0000000000..ec3cab8c80 --- /dev/null +++ b/pre-release/c101302066.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+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/c101302069.lua b/pre-release/c101302069.lua new file mode 100644 index 0000000000..efb0942d57 --- /dev/null +++ b/pre-release/c101302069.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+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 new file mode 100644 index 0000000000..bb2bcb5fec --- /dev/null +++ b/pre-release/c101302070.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/pre-release/c101302071.lua b/pre-release/c101302071.lua new file mode 100644 index 0000000000..07b59f8d33 --- /dev/null +++ b/pre-release/c101302071.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/pre-release/c101302074.lua b/pre-release/c101302074.lua new file mode 100644 index 0000000000..759abfc62d --- /dev/null +++ b/pre-release/c101302074.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/pre-release/c101302075.lua b/pre-release/c101302075.lua new file mode 100644 index 0000000000..eeb50d8ec7 --- /dev/null +++ b/pre-release/c101302075.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_ARTMEGIA} +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_ARTMEGIA) 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_ARTMEGIA) 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 new file mode 100644 index 0000000000..565395848d --- /dev/null +++ b/pre-release/c101302076.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/pre-release/c101302101.lua b/pre-release/c101302101.lua new file mode 100644 index 0000000000..aef09c86fb --- /dev/null +++ b/pre-release/c101302101.lua @@ -0,0 +1,78 @@ +--DDランス・ソルジャー +--D/D Lance Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.lvtg) + e1:SetOperation(s.lvop) + c:RegisterEffect(e1) + --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.lvfilter(c) + return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if ct==0 then return end + local lv=Duel.AnnounceLevel(tp,1,ct) + if lv then + tc:UpdateLevel(lv,nil,e:GetHandler()) + end +end +function s.desfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) + and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302102.lua b/pre-release/c101302102.lua new file mode 100644 index 0000000000..e331afd54a --- /dev/null +++ b/pre-release/c101302102.lua @@ -0,0 +1,102 @@ +--DDディフェンス・ソルジャー +--D/D Defense Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DDD} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.limcostfilter(c) + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) + local b2=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + elseif op==2 then + e:SetCategory(0) + e:SetProperty(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 "D/D" card in your Pendulum Zone + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,1) + e1:SetCondition(s.actcon) + e1:SetValue(1) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.actcon(e) + local tc=Duel.GetAttacker() + return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) +end +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101302103.lua b/pre-release/c101302103.lua new file mode 100644 index 0000000000..98f9147c64 --- /dev/null +++ b/pre-release/c101302103.lua @@ -0,0 +1,104 @@ +--DDD零死王ゼロ・マキナ +--D/D/D Zero Demise King Zero Machinex +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Check if it was activated this turn + local e0=Effect.CreateEffect(c) + e0:SetDescription(1160) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetRange(LOCATION_HAND) + e0:SetCost(s.actreg) + c:RegisterEffect(e0) + --Place 1 "Dark Contract" Continuous Spell/Trap on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_EXTRA) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place this card in the Pendulum Zone if it's destroyed + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e3:SetOperation(s.penop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT,SET_DDD} +s.listed_names={id} +function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.plfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.spconfilter(c,tp) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) + and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua new file mode 100644 index 0000000000..73710e3b3b --- /dev/null +++ b/pre-release/c101302104.lua @@ -0,0 +1,171 @@ +--DDDD偉次元王アーク・クライシス +--D/D/D/D Great Dimension King Arc Crisis +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) + Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) + --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY + Fusion.AddContactProc(c,s.contactfil,s.contactop,false) + c:AddMustBeFusionSummoned() + --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the effects of all face-up monsters your opponent currently controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Can attack all monsters your opponent controls once each + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_ATTACK_ALL) + e3:SetValue(1) + c:RegisterEffect(e3) + --Place this card in your Pendulum Zone + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e4:SetOperation(s.penop) + c:RegisterEffect(e4) +end +s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} +s.miracle_synchro_fusion=true +function s.matfilter(typ) + return function(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) + end +end +function s.contactfil(tp) + local loc=LOCATION_ONFIELD|LOCATION_GRAVE + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end + return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) +end +function s.contactop(g) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.desfilter(c,e,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) +end +function s.spfilter(c,e,tp,dc) + if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end + local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.rescon(mmz_ct,linkmz_ct) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct + and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if tg==0 then return end + local ct=Duel.Destroy(tg,REASON_EFFECT) + if ct==0 then return end + local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) + local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) + local ft=math.min(mmz_ct+emz_ct,ct) + if ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) + if #sg==0 then return end + local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) + local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) + local priority_0,priority_1 + if linkmz_ct0 + and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua new file mode 100644 index 0000000000..72d419b6e3 --- /dev/null +++ b/pre-release/c101302106.lua @@ -0,0 +1,85 @@ +--DDD智慧王ソロモン +--D/D/D Wisdom King Solomon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 "D/D" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) + --Add 1 "D/D" card from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.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 new file mode 100644 index 0000000000..d33e3a2283 --- /dev/null +++ b/pre-release/c101302107.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/pre-release/c101302108.lua b/pre-release/c101302108.lua new file mode 100644 index 0000000000..f860d7103f --- /dev/null +++ b/pre-release/c101302108.lua @@ -0,0 +1,81 @@ +--零王の契約書 +--Dark Contract with the Zero King +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Destroy 1 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Take 1000 damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_DD} +function s.desfilter(c,tp) + return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except "D/D" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c101302109.lua b/pre-release/c101302109.lua new file mode 100644 index 0000000000..a30b3256ec --- /dev/null +++ b/pre-release/c101302109.lua @@ -0,0 +1,95 @@ +--異次元の契約書 +--Dark Contract with the Different Dimension +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Take 1000 damage + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Banish 1 card in your opponent's field or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCost(s.rmcost) + e2:SetTarget(s.rmtg) + e2:SetOperation(s.rmop) + c:RegisterEffect(e2) + --Gain 500 LP + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_RECOVER) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.lptg) + e3:SetOperation(s.lpop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT} +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end +function s.rmcostfilter(c) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() +end +function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end +function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then + Duel.BreakEffect() + Duel.Recover(p,500,REASON_EFFECT) + end +end \ No newline at end of file