From 82300ef56173f97cd0a84810c60bf71f3b6f0b5d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 24 Mar 2025 12:06:05 +0200 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c100200267.lua | 56 -------------- pre-release/c100200268.lua | 53 ------------- pre-release/c100200269.lua | 56 -------------- pre-release/c100200270.lua | 104 ------------------------- pre-release/c100295101.lua | 87 --------------------- pre-release/c100296202.lua | 95 ----------------------- pre-release/c100409001.lua | 88 --------------------- pre-release/c100409002.lua | 81 -------------------- pre-release/c100442001.lua | 61 --------------- pre-release/c100442002.lua | 62 --------------- pre-release/c100442003.lua | 83 -------------------- pre-release/c100442004.lua | 74 ------------------ pre-release/c100442005.lua | 68 ----------------- pre-release/c100442006.lua | 106 -------------------------- pre-release/c100442007.lua | 108 -------------------------- pre-release/c100442008.lua | 41 ---------- pre-release/c100442009.lua | 34 --------- pre-release/c100442010.lua | 52 ------------- pre-release/c100442011.lua | 55 -------------- pre-release/c100442016.lua | 82 -------------------- pre-release/c100442017.lua | 77 ------------------- pre-release/c100442018.lua | 80 -------------------- pre-release/c100442019.lua | 86 --------------------- pre-release/c100442020.lua | 77 ------------------- pre-release/c100442021.lua | 85 --------------------- pre-release/c100442022.lua | 88 --------------------- pre-release/c100442023.lua | 91 ---------------------- pre-release/c100442024.lua | 115 ---------------------------- pre-release/c100442025.lua | 124 ------------------------------ pre-release/c100442026.lua | 103 ------------------------- pre-release/c100442031.lua | 79 ------------------- pre-release/c100442032.lua | 100 ------------------------ pre-release/c100442033.lua | 92 ---------------------- pre-release/c100442034.lua | 78 ------------------- pre-release/c100442035.lua | 71 ----------------- pre-release/c100442036.lua | 81 -------------------- pre-release/c100442037.lua | 57 -------------- pre-release/c100442038.lua | 87 --------------------- pre-release/c100442039.lua | 97 ------------------------ pre-release/c100442040.lua | 72 ------------------ pre-release/c100442041.lua | 88 --------------------- pre-release/c101301001.lua | 108 -------------------------- pre-release/c101301002.lua | 103 ------------------------- pre-release/c101301003.lua | 84 --------------------- pre-release/c101301004.lua | 95 ----------------------- pre-release/c101301013.lua | 90 ---------------------- pre-release/c101301014.lua | 64 ---------------- pre-release/c101301015.lua | 70 ----------------- pre-release/c101301016.lua | 75 ------------------ pre-release/c101301017.lua | 101 ------------------------- pre-release/c101301018.lua | 98 ------------------------ pre-release/c101301024.lua | 90 ---------------------- pre-release/c101301025.lua | 107 -------------------------- pre-release/c101301034.lua | 74 ------------------ pre-release/c101301038.lua | 67 ---------------- pre-release/c101301039.lua | 83 -------------------- pre-release/c101301040.lua | 80 -------------------- pre-release/c101301042.lua | 85 --------------------- pre-release/c101301043.lua | 64 ---------------- pre-release/c101301044.lua | 119 ----------------------------- pre-release/c101301052.lua | 119 ----------------------------- pre-release/c101301059.lua | 67 ---------------- pre-release/c101301060.lua | 67 ---------------- pre-release/c101301061.lua | 78 ------------------- pre-release/c101301062.lua | 78 ------------------- pre-release/c101301068.lua | 103 ------------------------- pre-release/c101301074.lua | 86 --------------------- pre-release/c101301076.lua | 151 ------------------------------------- 68 files changed, 5680 deletions(-) delete mode 100644 pre-release/c100200267.lua delete mode 100644 pre-release/c100200268.lua delete mode 100644 pre-release/c100200269.lua delete mode 100644 pre-release/c100200270.lua delete mode 100644 pre-release/c100295101.lua delete mode 100644 pre-release/c100296202.lua delete mode 100644 pre-release/c100409001.lua delete mode 100644 pre-release/c100409002.lua delete mode 100644 pre-release/c100442001.lua delete mode 100644 pre-release/c100442002.lua delete mode 100644 pre-release/c100442003.lua delete mode 100644 pre-release/c100442004.lua delete mode 100644 pre-release/c100442005.lua delete mode 100644 pre-release/c100442006.lua delete mode 100644 pre-release/c100442007.lua delete mode 100644 pre-release/c100442008.lua delete mode 100644 pre-release/c100442009.lua delete mode 100644 pre-release/c100442010.lua delete mode 100644 pre-release/c100442011.lua delete mode 100644 pre-release/c100442016.lua delete mode 100644 pre-release/c100442017.lua delete mode 100644 pre-release/c100442018.lua delete mode 100644 pre-release/c100442019.lua delete mode 100644 pre-release/c100442020.lua delete mode 100644 pre-release/c100442021.lua delete mode 100644 pre-release/c100442022.lua delete mode 100644 pre-release/c100442023.lua delete mode 100644 pre-release/c100442024.lua delete mode 100644 pre-release/c100442025.lua delete mode 100644 pre-release/c100442026.lua delete mode 100644 pre-release/c100442031.lua delete mode 100644 pre-release/c100442032.lua delete mode 100644 pre-release/c100442033.lua delete mode 100644 pre-release/c100442034.lua delete mode 100644 pre-release/c100442035.lua delete mode 100644 pre-release/c100442036.lua delete mode 100644 pre-release/c100442037.lua delete mode 100644 pre-release/c100442038.lua delete mode 100644 pre-release/c100442039.lua delete mode 100644 pre-release/c100442040.lua delete mode 100644 pre-release/c100442041.lua delete mode 100644 pre-release/c101301001.lua delete mode 100644 pre-release/c101301002.lua delete mode 100644 pre-release/c101301003.lua delete mode 100644 pre-release/c101301004.lua delete mode 100644 pre-release/c101301013.lua delete mode 100644 pre-release/c101301014.lua delete mode 100644 pre-release/c101301015.lua delete mode 100644 pre-release/c101301016.lua delete mode 100644 pre-release/c101301017.lua delete mode 100644 pre-release/c101301018.lua delete mode 100644 pre-release/c101301024.lua delete mode 100644 pre-release/c101301025.lua delete mode 100644 pre-release/c101301034.lua delete mode 100644 pre-release/c101301038.lua delete mode 100644 pre-release/c101301039.lua delete mode 100644 pre-release/c101301040.lua delete mode 100644 pre-release/c101301042.lua delete mode 100644 pre-release/c101301043.lua delete mode 100644 pre-release/c101301044.lua delete mode 100644 pre-release/c101301052.lua delete mode 100644 pre-release/c101301059.lua delete mode 100644 pre-release/c101301060.lua delete mode 100644 pre-release/c101301061.lua delete mode 100644 pre-release/c101301062.lua delete mode 100644 pre-release/c101301068.lua delete mode 100644 pre-release/c101301074.lua delete mode 100644 pre-release/c101301076.lua diff --git a/pre-release/c100200267.lua b/pre-release/c100200267.lua deleted file mode 100644 index 2c584ce1e1..0000000000 --- a/pre-release/c100200267.lua +++ /dev/null @@ -1,56 +0,0 @@ ---月の魔術師 ---Moon Magician ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If your opponent controls an Xyz Monster, 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 Level 4 LIGHT monster from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -s.listed_names={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(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,0,LOCATION_MZONE,1,nil) -end -function s.spfilter(c,e,tp) - return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(e:GetHandler()) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100200268.lua b/pre-release/c100200268.lua deleted file mode 100644 index 7bc55cb9ed..0000000000 --- a/pre-release/c100200268.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ムーン・ガードナー ---Moon Gardna ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If your opponent controls 2 or more 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) - --Add 1 Level 4 LIGHT monster 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_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2 -end -function s.thfilter(c) - return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,nil) - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100200269.lua b/pre-release/c100200269.lua deleted file mode 100644 index 5978d5e9a8..0000000000 --- a/pre-release/c100200269.lua +++ /dev/null @@ -1,56 +0,0 @@ ---スターシップ・アジャスト・プレーン ---Starship Adjust Plane ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --The Levels of both this card and 1 other Machine monster you control become their combined current Levels - 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) -end -function s.lvlfilter(c) - return c:IsFaceup() and c:HasLevel() and c:IsRace(RACE_MACHINE) -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvlfilter(chkc) and chkc~=c end - if chk==0 then return c:HasLevel() and Duel.IsExistingTarget(s.lvlfilter,tp,LOCATION_MZONE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.lvlfilter,tp,LOCATION_MZONE,0,1,1,c) - g:AddCard(c) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,2,tp,g:GetSum(Card.GetLevel)) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local lv=c:GetLevel()+tc:GetLevel() - --The Levels of both become their combined current Levels - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - tc:RegisterEffect(e2) - end - --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Machine Xyz Monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetTargetRange(1,0) - e3:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ)) end) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) -end \ No newline at end of file diff --git a/pre-release/c100200270.lua b/pre-release/c100200270.lua deleted file mode 100644 index 16f8f0c2bd..0000000000 --- a/pre-release/c100200270.lua +++ /dev/null @@ -1,104 +0,0 @@ ---ダークリボー ---Darkuriboh ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Apply effects to 1 of your Fiend or Fusion Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BECOME_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.effcon) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_BE_BATTLE_TARGET) - c:RegisterEffect(e2) - --Add 1 "Polymerization" from your Deck or GY to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_POLYMERIZATION} -function s.effconfilter(c,tp) - return (c:IsRace(RACE_FIEND) or c:IsType(TYPE_FUSION)) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) 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 g=eg:Filter(s.effconfilter,nil,tp):Match(Card.IsCanBeEffectTarget,nil,e) - if chk==0 then return #g>0 end - local tg=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - tg=g:Select(tp,1,1,nil) - else - tg=g - end - Duel.SetTargetCard(tg) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsMonster() then - local c=e:GetHandler() - tc:RegisterFlagEffect(id,RESET_EVENT|RESET_TURN_SET|RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) - --It cannot be destroyed by battle or card effects until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - --Its effects activated on the field cannot be negated until the end of this turn - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_CANNOT_DISEFFECT) - e3:SetTargetRange(1,1) - e3:SetValue(s.effectfilter) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) - end -end -function s.effectfilter(e,ct) - local eff,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_LOCATION) - return eff:GetHandler():HasFlagEffect(id) and (loc&LOCATION_ONFIELD)>0 -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_HAND) and c:IsReason(REASON_EFFECT) -end -function s.thfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100295101.lua b/pre-release/c100295101.lua deleted file mode 100644 index 9e08da14cd..0000000000 --- a/pre-release/c100295101.lua +++ /dev/null @@ -1,87 +0,0 @@ ---戦刀匠サイバ ---Saiba the Fighting Swordsmith ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Special Summon 1 Level 6 or lower Warrior monster from your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a Warrior monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) - e2:SetTarget(s.synchtg) - e2:SetOperation(s.synchop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(c) - end - Duel.SpecialSummonComplete() - if c:IsRelateToEffect(e) then - --This card cannot be used as Synchro Material for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3310) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end -end -function s.synchrocheck(tp,sg,sc) - return sg:IsExists(Card.IsRace,1,nil,RACE_WARRIOR) -end -function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - Synchro.CheckAdditional=s.synchrocheck - local res=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) - Synchro.CheckAdditional=nil - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.synchop(e,tp,eg,ep,ev,re,r,rp) - Synchro.CheckAdditional=s.synchrocheck - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil) - if #g>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=g:Select(tp,1,1,nil):GetFirst() - Duel.SynchroSummon(tp,sc) - else - Synchro.CheckAdditional=nil - end -end \ No newline at end of file diff --git a/pre-release/c100296202.lua b/pre-release/c100296202.lua deleted file mode 100644 index 50345d85e5..0000000000 --- a/pre-release/c100296202.lua +++ /dev/null @@ -1,95 +0,0 @@ ---召喚獣マギストス・セリオン ---Invoked Magistus Omega ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Aleister the Invoker" + 1 Fusion, Synchro, Xyz, or Link Monster - Fusion.AddProcMix(c,true,true,86120751,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EXTRA)) - --Banish 1 Fusion, Synchro, Xyz, or Link Monster from your GY and 1 monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.rmtg) - e1:SetOperation(s.rmop) - c:RegisterEffect(e1) - --Special Summon 1 Level 4 Spellcaster monster from your Deck, then you can equip this card to it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={86120751} --"Aleister the Invoker" -s.miracle_synchro_fusion=true -function s.rmfilter(c,e) - return c:IsCanBeEffectTarget(e) and c:IsAbleToRemove() and (c:IsType(TYPE_EXTRA) or c:IsLocation(LOCATION_MZONE)) -end -function s.rmrescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==1 -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,LOCATION_MZONE,nil,e) - if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rmrescon,0) end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rmrescon,1,tp,HINTMSG_REMOVE) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,2,tp,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(Card.IsMonster,nil) - if #tg>0 then - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - end -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsFusionSummoned() and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) -end -function s.spfilter(c,e,tp) - return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 - and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - if Duel.Equip(tp,c,sc) then - --Equip limit registration - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) - e0:SetValue(function(e,c) return c==sc end) - e0:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e0) - --The equipped monster gains 1000 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c100409001.lua b/pre-release/c100409001.lua deleted file mode 100644 index 2411efab47..0000000000 --- a/pre-release/c100409001.lua +++ /dev/null @@ -1,88 +0,0 @@ ---魂宿りし暗黒騎士ガイア ---Soul of Gaia the Fierce Knight ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If a Level 5 or higher Monster Card is on the field, you can Normal Summon this card without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(s.nscon) - c:RegisterEffect(e1) - --If your opponent Normal or Special Summons a monster(s) in Attack Position, increase its Level by 7 - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_LVCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(s.lvop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --Negate the activation of an opponent's monster effect, and if you do, destroy that card - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetCode(EVENT_CHAINING) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,id) - e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) - e4:SetCost(s.negcost) - e4:SetTarget(s.negtg) - e4:SetOperation(s.negop) - c:RegisterEffect(e4) -end -s.listed_series={SET_MILLENNIUM} -function s.lv5plusmonfilter(c) - return c:IsLevelAbove(5) and c:IsMonsterCard() and c:IsFaceup() -end -function s.nscon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.lv5plusmonfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function s.lvfilter(c,tp) - return c:IsSummonPlayer(1-tp) and c:IsAttackPos() and c:IsFaceup() and c:HasLevel() -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(s.lvfilter,nil,tp) - if #g==0 then return end - local c=e:GetHandler() - for tc in g:Iter() do - --Increase its Level by 7 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(7) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(s.lv5plusmonfilter,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(s.lv5plusmonfilter,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100409002.lua b/pre-release/c100409002.lua deleted file mode 100644 index 53ca1f8d61..0000000000 --- a/pre-release/c100409002.lua +++ /dev/null @@ -1,81 +0,0 @@ ---バイス・シャーク ---Veiss Shark ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Fish "Shark" monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --A "Shark Drake" Xyz Monster that has this card as material gains this effect: Negate a Spell/Trap effect, and if you do, destroy that card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSetCard(SET_SHARK_DRAKE) and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end) - e3:SetCost(aux.dxmcostgen(2,2,nil)) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SHARK,SET_SHARK_DRAKE} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,nil,nil,RACE_FISH) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,Card.IsRace,1,1,false,nil,nil,RACE_FISH) - Duel.Release(g,REASON_COST) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_FISH) and c:IsSetCard(SET_SHARK) 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.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,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 WATER 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_WATER) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100442001.lua b/pre-release/c100442001.lua deleted file mode 100644 index 21c4329c50..0000000000 --- a/pre-release/c100442001.lua +++ /dev/null @@ -1,61 +0,0 @@ ---星辰槍手ルキアス ---Dragontail Lucias ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Dragontail" monster from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Set 1 "Dragontail" Spell/Trap from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DRAGONTAIL} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) 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.setfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100442002.lua b/pre-release/c100442002.lua deleted file mode 100644 index 4d23abb13a..0000000000 --- a/pre-release/c100442002.lua +++ /dev/null @@ -1,62 +0,0 @@ ---星辰砲手ファイメナ ---Dragontail Fymena ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Dragon or Spellcaster Fusion Monster from your Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(aux.SelfDiscardCost) - e1:SetTarget(s.fustg) - e1:SetOperation(Fusion.SummonEffOP({fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)})) - c:RegisterEffect(e1) - --Set 1 "Dragontail" Spell/Trap from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGONTAIL} -function s.fextra(exc) - return function(e,tp,mg) - return nil,s.fcheck(exc) - end -end -function s.fcheck(exc) - return function(tp,sg,fc) - return not (exc and sg:IsContains(exc)) - end -end -function s.fustg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local params={extrafil=s.fextra(e:GetHandler()),fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)} - return Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) - end - Fusion.SummonEffTG({fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)})(e,tp,eg,ep,ev,re,r,rp,1) -end -function s.setfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100442003.lua b/pre-release/c100442003.lua deleted file mode 100644 index 5a2da6e237..0000000000 --- a/pre-release/c100442003.lua +++ /dev/null @@ -1,83 +0,0 @@ ---星辰竜パーン ---Dragontail Pan ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Set 1 "Dragontail" Spell/Trap from your Deck, 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_BE_MATERIAL) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) - e1:SetTarget(s.settg) - e1:SetOperation(s.setop) - c:RegisterEffect(e1) - --Place this card on the bottom of the Deck, and if you do, Special Summon 1 non-Fusion "Dragontail" monster from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGONTAIL} -function s.setfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_MZONE) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #sg>0 and Duel.SSet(tp,sg)>0 then - Duel.ShuffleDeck(tp) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,1,nil) - if #dg==0 then return end - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end -function s.spconfilter(c,e,tp) - return c:IsPreviousTypeOnField(TYPE_FUSION) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:IsReasonPlayer(1-tp) -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,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DRAGONTAIL) and not c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 - and c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - 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 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/c100442004.lua b/pre-release/c100442004.lua deleted file mode 100644 index 30a0cd5fdf..0000000000 --- a/pre-release/c100442004.lua +++ /dev/null @@ -1,74 +0,0 @@ ---星辰竜ウルグラ ---Dragontail Urgula ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Set 1 "Dragontail" Spell/Trap from your Deck, then you can destroy 1 Spell/Trap 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_BE_MATERIAL) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) - e1:SetTarget(s.settg) - e1:SetOperation(s.setop) - c:RegisterEffect(e1) - --Place this card on the bottom of the Deck, and if you do, add that monster to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGONTAIL} -function s.setfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_SZONE) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #sg>0 and Duel.SSet(tp,sg)>0 then - Duel.ShuffleDeck(tp) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,1,nil) - if #dg==0 then return end - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end -function s.thfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsSetCard(SET_DRAGONTAIL) and c:IsAbleToHand() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -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_DECKBOTTOM,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100442005.lua b/pre-release/c100442005.lua deleted file mode 100644 index 41fba5507b..0000000000 --- a/pre-release/c100442005.lua +++ /dev/null @@ -1,68 +0,0 @@ ---星辰竜ムルル ---Dragontail Mulr ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 "Dragontail" Fusion Monster from your Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(Fusion.SummonEffTG(aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL))) - e1:SetOperation(s.fusop) - c:RegisterEffect(e1) - --Set 1 "Dragontail" Spell/Trap from your Deck - 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_BE_MATERIAL) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGONTAIL} -function s.fusop(e,tp,eg,ep,ev,re,r,rp) - Fusion.SummonEffOP(aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL))(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(c) return not c:IsOriginalType(TYPE_FUSION) end) -end -function s.setfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE) -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 or Duel.SSet(tp,g)==0 then return end - local ng=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,nil) - if #ng==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local sc=ng:Select(tp,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - sc:NegateEffects(e:GetHandler()) - end -end \ No newline at end of file diff --git a/pre-release/c100442006.lua b/pre-release/c100442006.lua deleted file mode 100644 index 9951df0149..0000000000 --- a/pre-release/c100442006.lua +++ /dev/null @@ -1,106 +0,0 @@ ---星辰爪竜アルザリオン ---Dragontail Altharion ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Dragontail" monster + 1+ monsters in the hand - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsLocation,LOCATION_HAND),1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGONTAIL)) - --Register how many materials are used from the hand - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():FilterCount(Card.IsLocation,nil,LOCATION_HAND)) end) - c:RegisterEffect(e0) - --Return monsters on the field and/or in any GY(s) to the hand, up to the number of monsters used as material from the 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_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabelObject():GetLabel()>0 end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - e1:SetLabelObject(e0) - c:RegisterEffect(e1) - --Special Summon this card from the GY, but banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Keep track of monsters being sent to the GY at the same time - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_GRAVE) - e3:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) - e3:SetOperation(s.regop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_CHAINING) - e4:SetOperation(function(e) e:GetHandler():ResetFlagEffect(id+100) end) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_CHAIN_SOLVED) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EVENT_BREAK_EFFECT) - c:RegisterEffect(e6) -end -s.listed_series={SET_DRAGONTAIL} -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsMonster() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local ct=e:GetLabelObject():GetLabel() - local g=Duel.SelectTarget(tp,aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) -end -function s.thop(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 -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=eg:FilterCount(Card.IsMonster,nil) - if ct==0 or eg:IsContains(c) then return end - if ct>=2 or c:HasFlagEffect(id+100) then - Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,r,rp,ep,ev) - end - local eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT) - if eff then - c:RegisterFlagEffect(id+100,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c100442007.lua b/pre-release/c100442007.lua deleted file mode 100644 index c0731aa61d..0000000000 --- a/pre-release/c100442007.lua +++ /dev/null @@ -1,108 +0,0 @@ ---星辰法宮グラメル ---Dragontail Gramel ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Dragontail" monster + 1 monster in the hand - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGONTAIL),aux.FilterBoolFunctionEx(Card.IsLocation,LOCATION_HAND)) - --Destroy 1 card your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.descon) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Special Summon this card from the GY, but banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Keep track of monsters being sent to the GY at the same time - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_GRAVE) - e3:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) - e3:SetOperation(s.regop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_CHAINING) - e4:SetOperation(function(e) e:GetHandler():ResetFlagEffect(id+100) end) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_CHAIN_SOLVED) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EVENT_BREAK_EFFECT) - c:RegisterEffect(e6) -end -s.listed_series={SET_DRAGONTAIL} -function s.descon(e,tp,eg,ep,ev,re,r,rp) - if rp==1-tp then return false end - local trig_p,setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) - if trig_p==1-tp then return false end - for _,archetype in ipairs(setcodes) do - if ((SET_DRAGONTAIL&0xfff)==(archetype&0xfff) and (archetype&SET_DRAGONTAIL)==SET_DRAGONTAIL) then - return true - end - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=eg:FilterCount(Card.IsMonster,nil) - if ct==0 or eg:IsContains(c) then return end - if ct>=2 or c:HasFlagEffect(id+100) then - Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,r,rp,ep,ev) - end - local eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT) - if eff then - c:RegisterFlagEffect(id+100,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c100442008.lua b/pre-release/c100442008.lua deleted file mode 100644 index 4e5b0852fa..0000000000 --- a/pre-release/c100442008.lua +++ /dev/null @@ -1,41 +0,0 @@ ---計都星辰 ---Ketu Dragontail ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Dragontail" monster from your Deck to your hand, then, if your opponent controls a monster, you can Fusion Summon 1 Dragon or Spellcaster monster from your Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_names={SET_DRAGONTAIL} -function s.thfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsMonster() 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_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - if Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil)>0 then - local params={fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)} - 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 -end \ No newline at end of file diff --git a/pre-release/c100442009.lua b/pre-release/c100442009.lua deleted file mode 100644 index 5209880348..0000000000 --- a/pre-release/c100442009.lua +++ /dev/null @@ -1,34 +0,0 @@ ---羅睺星辰 ---Rahu Dragontail ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - local params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL),extrafil=s.extramat,stage2=s.summonlimit,extratg=s.extratg} - --Fusion Summon 1 "Dragontail" Fusion Monster from your Extra Deck, using monsters from your hand, Deck, and/or field - local e1=Fusion.CreateSummonEff(params) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - c:RegisterEffect(e1) -end -s.listed_series={SET_DRAGONTAIL} -function s.extramat(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil) -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK) -end -function s.summonlimit(e,tc,tp,mg,chk) - if chk==2 then - 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,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100442010.lua b/pre-release/c100442010.lua deleted file mode 100644 index 4e9d3927a9..0000000000 --- a/pre-release/c100442010.lua +++ /dev/null @@ -1,52 +0,0 @@ ---星辰の裂角 ---Dragontail Horn ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Return 1 Attack Position monster to the hand/Extra Deck, then you can place 1 "Dragontail" card from your GY or banishment on the bottom of the Deck, then draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_DRAGONTAIL} -s.listed_names={id} -function s.thexfilter(c) - return c:IsAttackPos() and (c:IsAbleToHand() or c:IsAbleToExtra()) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.thexfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thexfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local tc=Duel.SelectTarget(tp,s.thexfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - local cat=tc:IsType(TYPE_EXTRA) and CATEGORY_TOEXTRA or CATEGORY_TOHAND - Duel.SetOperationInfo(0,cat,tc,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) -end -function s.tdfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) - and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - Duel.BreakEffect() - if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100442011.lua b/pre-release/c100442011.lua deleted file mode 100644 index 8ebbee1c57..0000000000 --- a/pre-release/c100442011.lua +++ /dev/null @@ -1,55 +0,0 @@ ---星辰の吼炎 ---Dragontail Flame ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Negate the effects of 1 face-up Spell, then you can place 1 "Dragontail" card from your GY or banishment on the bottom of the Deck, then draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_DRAGONTAIL} -s.listd_names={id} -function s.disfilter(c) - return c:IsSpell() and c:IsNegatableSpellTrap() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and s.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) -end -function s.tdfilter(c) - return c:IsSetCard(SET_DRAGONTAIL) and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then - tc:NegateEffects(c,RESETS_STANDARD_PHASE_END) - Duel.AdjustInstantly(tc) - if tc:IsDisabled() and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) - and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - Duel.BreakEffect() - if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100442016.lua b/pre-release/c100442016.lua deleted file mode 100644 index 63c9c1a045..0000000000 --- a/pre-release/c100442016.lua +++ /dev/null @@ -1,82 +0,0 @@ ---カプシー☆ヤミー ---Cupsie☆Yummy ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control a Link-1 monster or a Level 2 Synchro Monster, 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) - --Add 1 "Yummy" card from your Deck to your hand, except "Cupsie☆Yummy", or, if this card was Special Summoned by a Synchro Monster's effect, you can draw 1 card instead - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -s.listed_series={SET_YUMMY} -s.listed_names={id} -function s.spconfilter(c) - return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.thfilter(c) - return c:IsSetCard(SET_YUMMY) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - or (sp_chk and Duel.IsPlayerCanDraw(tp,1)) end - e:SetLabel(sp_chk and 1 or 0) - if sp_chk then - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - else - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local sp_chk=e:GetLabel()==1 - local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - local b2=sp_chk and Duel.IsPlayerCanDraw(tp,1) - if not (b1 or b2) then return end - local op=nil - if sp_chk then - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - else - op=1 - end - if op==1 then - --Add 1 "Yummy" card from your Deck to your hand, except "Cupsie☆Yummy" - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - elseif op==2 then - --Draw 1 card - Duel.Draw(tp,1,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100442017.lua b/pre-release/c100442017.lua deleted file mode 100644 index 80392335c6..0000000000 --- a/pre-release/c100442017.lua +++ /dev/null @@ -1,77 +0,0 @@ ---クッキィ☆ヤミー ---Cooky☆Yummy ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control a Link-1 monster or a Level 2 Synchro Monster, 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) - --Make 1 opponent's face-up monster lose 1000 ATK, or, if this card was Special Summoned by a Synchro Monster's effect, you can destroy that monster instead - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -s.listed_series={SET_YUMMY} -function s.spconfilter(c) - return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - e:SetLabel(sp_chk and 1 or 0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sp_chk then - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) - end -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local sp_chk=e:GetLabel()==1 - local b1=tc:IsFaceup() - local b2=sp_chk - if not (b1 or b2) then return end - local op=nil - if sp_chk then - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - else - op=1 - end - if op==1 then - --It loses 1000 ATK - tc:UpdateAttack(-1000,nil,e:GetHandler()) - elseif op==2 then - --Destroy it - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100442018.lua b/pre-release/c100442018.lua deleted file mode 100644 index 5227d75d06..0000000000 --- a/pre-release/c100442018.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ロリポー☆ヤミー ---Lollipo☆Yummy ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control a Link-1 monster or a Level 2 Synchro Monster, 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) - --Shuffle 1 card from your opponent's GY into the Deck, or, if this card was Special Summoned by a Synchro Monster's effect, you can banish that card instead - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -s.listed_series={SET_YUMMY} -function s.spconfilter(c) - return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.tgfilter(c,sp_chk) - return c:IsAbleToDeck() or (sp_chk and c:IsAbleToRemove()) -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tgfilter(chkc,e:GetLabel()==1) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_GRAVE,1,nil,sp_chk) end - e:SetLabel(sp_chk and 1 or 0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil,sp_chk) - if sp_chk then - Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) - end -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local sp_chk=e:GetLabel()==1 - local b1=tc:IsAbleToDeck() - local b2=sp_chk and tc:IsAbleToRemove() - if not (b1 or b2) then return end - local op=nil - if sp_chk then - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - else - op=1 - end - if op==1 then - --Shuffle it into the Deck - Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - elseif op==2 then - --Banish it - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100442019.lua b/pre-release/c100442019.lua deleted file mode 100644 index 7118c2f952..0000000000 --- a/pre-release/c100442019.lua +++ /dev/null @@ -1,86 +0,0 @@ ---カプシー★ヤミーウェイ ---Cupsie★Yummy Way ---scripted by Zedja -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1 non-Tuner monster - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(aux.NOT(Card.IsLinkMonster)),1,1,aux.FilterBoolFunction(Card.IsLink,1)) - --For this card's Synchro Summon, you can treat 1 Link-1 monster you control as a Level 1 Tuner - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e0:SetCode(EFFECT_SYNCHRO_LEVEL) - e0:SetRange(LOCATION_EXTRA) - e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e0:SetTarget(function(e,c) return c:IsLink(1) end) - e0:SetValue(function(e,sc) return sc:IsSetCard(SET_YUMMY) and 1 or -1 end) - c:RegisterEffect(e0) - --Add 2 "Yummy" monsters from your Deck to your hand, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES) - 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.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon up to 2 "Yummy" monsters from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(aux.SelfToExtraCost) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_YUMMY} -function s.thfilter(c) - return c:IsSetCard(SET_YUMMY) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) 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) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil) - if #g==2 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT) - if #dg>0 then - Duel.BreakEffect() - Duel.SendtoGrave(dg,REASON_DISCARD|REASON_EFFECT) - end - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_YUMMY) 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.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - ft=math.min(ft,2) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,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/c100442020.lua b/pre-release/c100442020.lua deleted file mode 100644 index 6b0d9e32d3..0000000000 --- a/pre-release/c100442020.lua +++ /dev/null @@ -1,77 +0,0 @@ ---クッキィ★ヤミーウェイ ---Cooky★Yummy Way ---scripted by Zedja -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1 non-Tuner monster - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(aux.NOT(Card.IsLinkMonster)),1,1,aux.FilterBoolFunction(Card.IsLink,1)) - --For this card's Synchro Summon, you can treat 1 Link-1 monster you control as a Level 1 Tuner - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e0:SetCode(EFFECT_SYNCHRO_LEVEL) - e0:SetRange(LOCATION_EXTRA) - e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e0:SetTarget(function(e,c) return c:IsLink(1) end) - e0:SetValue(function(e,sc) return sc:IsSetCard(SET_YUMMY) and 1 or -1 end) - c:RegisterEffect(e0) - --Change up to 2 face-up monsters to face-down Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - c:RegisterEffect(e1) - --Special Summon up to 2 "Yummy" monsters from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(aux.SelfToExtraCost) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_YUMMY} -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSITION) - local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEDOWN_DEFENSE) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_YUMMY) 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.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - ft=math.min(ft,2) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,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/c100442021.lua b/pre-release/c100442021.lua deleted file mode 100644 index d9c1ed4c2c..0000000000 --- a/pre-release/c100442021.lua +++ /dev/null @@ -1,85 +0,0 @@ ---ロリポー★ヤミーウェイ ---Lollipo★Yummy Way ---scripted by Zedja -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1 non-Tuner monster - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(aux.NOT(Card.IsLinkMonster)),1,1,aux.FilterBoolFunction(Card.IsLink,1)) - --For this card's Synchro Summon, you can treat 1 Link-1 monster you control as a Level 1 Tuner - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e0:SetCode(EFFECT_SYNCHRO_LEVEL) - e0:SetRange(LOCATION_EXTRA) - e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e0:SetTarget(function(e,c) return c:IsLink(1) end) - e0:SetValue(function(e,sc) return sc:IsSetCard(SET_YUMMY) and 1 or -1 end) - c:RegisterEffect(e0) - --Special Summon 2 "Yummy" monsters from GY but negate their effects - 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.gynegsptg) - e1:SetOperation(s.gynegspop) - c:RegisterEffect(e1) - --Special Summon up to 2 "Yummy" monsters from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(aux.SelfToExtraCost) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_YUMMY} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_YUMMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gynegsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE) -end -function s.gynegspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - if #g==2 then - local c=e:GetHandler() - for sc in g:Iter() do - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(c) - end - end - Duel.SpecialSummonComplete() - end -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_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 ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - ft=math.min(ft,2) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,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/c100442022.lua b/pre-release/c100442022.lua deleted file mode 100644 index e16429dc41..0000000000 --- a/pre-release/c100442022.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ヤミー★スナッチー ---Yummy★Snatchy ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 1 Level 4 or lower LIGHT Beast monster - Link.AddProcedure(c,s.matfilter,1,1) - --Place 1 "Yummy" Field Spell from your hand or Deck face-up on your field - 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:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a "Yummy" 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_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase() or (Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase()) end) - e2:SetCost(aux.PayLPCost(100)) - e2:SetTarget(s.synchtg) - e2:SetOperation(s.synchop) - c:RegisterEffect(e2) -end -s.listed_series={SET_YUMMY} -function s.matfilter(c,lc,sumtype,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT,lc,sumtype,tp) and c:IsRace(RACE_BEAST,lc,sumtype,tp) -end -function s.plfilter(c) - return c:IsSetCard(SET_YUMMY) and c:IsFieldSpell() and not c:IsForbidden() -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() - if sc then - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - end - --You cannot Link Summon Link-3 or higher Link Monsters for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE|PHASE_END) - e1:SetTarget(function(e,c,tp,sumtyp,sumpos) return c:IsLinkAbove(3) and c:IsLinkMonster() and (sumtyp&SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK end) - Duel.RegisterEffect(e1,tp) -end -function s.synchrocheck(tp,sg,sc) - return sg:IsExists(Card.IsSetCard,1,nil,SET_YUMMY) -end -function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - Synchro.CheckAdditional=s.synchrocheck - local res=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) - Synchro.CheckAdditional=nil - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.synchop(e,tp,eg,ep,ev,re,r,rp) - Synchro.CheckAdditional=s.synchrocheck - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil) - if #g>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=g:Select(tp,1,1,nil):GetFirst() - Duel.SynchroSummon(tp,sc) - else - Synchro.CheckAdditional=nil - end -end \ No newline at end of file diff --git a/pre-release/c100442023.lua b/pre-release/c100442023.lua deleted file mode 100644 index 7bbfc47802..0000000000 --- a/pre-release/c100442023.lua +++ /dev/null @@ -1,91 +0,0 @@ ---ヤミーズメント☆ミニヨン ---Yummysment☆Minion ---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) - --"Yummy" monsters you control gain 500 ATK for each LIGHT Beast monster on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_FZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_YUMMY)) - e1:SetValue(s.atkval) - c:RegisterEffect(e1) - --Special Summon 1 Level 1 "Yummy" monster from your GY - 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_FZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsLink,1),tp,LOCATION_MZONE,0,1,nil) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Place 2 "Yummy" monsters from your GY and/or banishment and this card on the bottom of the Deck in any order - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - c:RegisterEffect(e3) -end -s.listed_series={SET_YUMMY} -function s.atkfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsFaceup() -end -function s.atkval(e,c) - return 500*Duel.GetMatchingGroupCount(s.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_YUMMY) and c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.tdfilter(c) - return c:IsSetCard(SET_YUMMY) and c:IsMonster() and (c:IsAbleToDeck() or c:IsAbleToExtra()) and c:IsFaceup() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g+c,3,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - tg:AddCard(c) - if Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then - local ct=Duel.GetOperatedGroup():Filter(Card.IsControler,nil,tp):FilterCount(Card.IsLocation,nil,LOCATION_DECK) - if ct>1 then - Duel.SortDeckbottom(tp,tp,ct) - end - end -end \ No newline at end of file diff --git a/pre-release/c100442024.lua b/pre-release/c100442024.lua deleted file mode 100644 index a427e677c0..0000000000 --- a/pre-release/c100442024.lua +++ /dev/null @@ -1,115 +0,0 @@ ---ヤミーズメント★アクロッキー ---Yummysment★Acrockie ---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 card your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.descon) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Special Summon 1 "Yummy" monster from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Place 2 "Yummy" monsters from your GY and/or banishment and this card on the bottom of the Deck in any order - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - c:RegisterEffect(e3) -end -s.listed_series={SET_YUMMY} -function s.desconfilter(c,tp) - return c:IsSynchroSummoned() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsSummonPlayer(tp) and c:IsFaceup() -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.desconfilter,1,nil,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function s.spconfilter(c,tp,rp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and rp==1-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,rp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_YUMMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.tdfilter(c) - return c:IsSetCard(SET_YUMMY) and c:IsMonster() and (c:IsAbleToDeck() or c:IsAbleToExtra()) and c:IsFaceup() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g+c,3,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - tg:AddCard(c) - if Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then - local ct=Duel.GetOperatedGroup():Filter(Card.IsControler,nil,tp):FilterCount(Card.IsLocation,nil,LOCATION_DECK) - if ct>1 then - Duel.SortDeckbottom(tp,tp,ct) - end - end -end \ No newline at end of file diff --git a/pre-release/c100442025.lua b/pre-release/c100442025.lua deleted file mode 100644 index f291f9ebe1..0000000000 --- a/pre-release/c100442025.lua +++ /dev/null @@ -1,124 +0,0 @@ ---ヤミー☆サプライズ ---Yummy☆Surprise ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_YUMMY} -function s.monoppthfilter(c,e,tp) - return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsControler(tp)) or c:IsControler(1-tp)) - and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() -end -function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==2 -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_YUMMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.fieldspellthfilter(c) - return c:IsFieldSpell() and c:IsFaceup() and c:IsAbleToHand() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local g=Duel.GetMatchingGroup(s.monoppthfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,e,tp) - local b1=not Duel.HasFlagEffect(tp,id) and #g>=4 - and aux.SelectUnselectGroup(g,e,tp,4,4,s.rescon,0) - local b2=not Duel.HasFlagEffect(tp,id+100) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) - local b3=not Duel.HasFlagEffect(tp,id+200) - and Duel.IsExistingMatchingCard(s.fieldspellthfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 or b3 end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local cost_skip=e:GetLabel()~=-100 - local g=Duel.GetMatchingGroup(s.monoppthfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,e,tp) - local b1=not Duel.HasFlagEffect(tp,id) and #g>=4 - and aux.SelectUnselectGroup(g,e,tp,4,4,s.rescon,0) - local b2=not Duel.HasFlagEffect(tp,id+100) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) - local b3=not Duel.HasFlagEffect(tp,id+200) - and Duel.IsExistingMatchingCard(s.fieldspellthfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) - if chk==0 then e:SetLabel(0) return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_TOHAND) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - local tg=aux.SelectUnselectGroup(g,e,tp,4,4,s.rescon,1,tp,HINTMSG_RTOHAND) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,4,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - elseif op==3 then - e:SetCategory(CATEGORY_TOHAND) - e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD|LOCATION_GRAVE) - end -end -function s.plfilter(c) - return c:IsSetCard(SET_YUMMY) and c:IsFieldSpell() and not c:IsForbidden() -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Return 2 LIGHT Beast monsters you control and 2 cards your opponent controls to the hand - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end - elseif op==2 then - --Special Summon 1 "Yummy" monster from your hand or GY, but it cannot attack directly this turn - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - --It cannot attack directly this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3207) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - elseif op==3 then - --Return 1 Field Spell from your face-up field or GY to the hand, then you can place 1 "Yummy" Field Spell from your hand face-up on your field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.fieldspellthfilter),tp,LOCATION_ONFIELD|LOCATION_GRAVE,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 Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local plc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - if plc then - Duel.BreakEffect() - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(plc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - end - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100442026.lua b/pre-release/c100442026.lua deleted file mode 100644 index 271228684e..0000000000 --- a/pre-release/c100442026.lua +++ /dev/null @@ -1,103 +0,0 @@ ---ヤミー★リデンプション ---Yummy★Redemption ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetHintTiming(TIMING_DAMAGE_STEP) - e0:SetCondition(aux.StatChangeDamageStepCondition) - c:RegisterEffect(e0) - --Monsters your opponent controls lose 200 ATK for each LIGHT Beast monster you control and in your GY - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(s.atkval) - c:RegisterEffect(e1) - --Draw 1 card, then place 1 card from your hand on the bottom of the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) - 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,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(s.drwcon) - e2:SetTarget(s.drwtg) - e2:SetOperation(s.drwop) - c:RegisterEffect(e2) - --Switch control of 1 "Yummy" monster you control and 1 monster your opponent controls - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_CONTROL) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfBanishCost) - e3:SetTarget(s.ctrltg) - e3:SetOperation(s.ctrlop) - c:RegisterEffect(e3) -end -s.listed_series={SET_YUMMY} -function s.atkvalfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsFaceup() -end -function s.atkval(e,c) - return -200*Duel.GetMatchingGroupCount(s.atkvalfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,nil) -end -function s.drwconfilter(c,tp) - return c:IsSynchroSummoned() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsSummonPlayer(tp) and c:IsFaceup() -end -function s.drwcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.drwconfilter,1,nil,tp) -end -function s.drwtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function s.drwop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==0 then return end - Duel.ShuffleHand(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end -end -function s.selffilter(c,tp) - return c:IsSetCard(SET_YUMMY) and c:IsAbleToChangeControler() and c:IsFaceup() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 -end -function s.oppfilter(c,tp) - return c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 -end -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.selffilter,tp,LOCATION_MZONE,0,1,nil,tp) - and Duel.IsExistingTarget(s.oppfilter,tp,0,LOCATION_MZONE,1,nil,1-tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectTarget(tp,s.selffilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g2=Duel.SelectTarget(tp,s.oppfilter,tp,0,LOCATION_MZONE,1,1,nil,1-tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,tp,0) -end -function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==2 then - Duel.SwapControl(tg:GetFirst(),tg:GetNext()) - end -end \ No newline at end of file diff --git a/pre-release/c100442031.lua b/pre-release/c100442031.lua deleted file mode 100644 index 03285ddcd2..0000000000 --- a/pre-release/c100442031.lua +++ /dev/null @@ -1,79 +0,0 @@ ---K9-17号 イヅナ ---K9 - #17 Izuna ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(s.ntcon) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) - --Send 1 "K9" card from your Deck to the GY, except "K9 - #17 Izuna" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.tgtg) - e3:SetOperation(s.tgop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -s.listed_series={SET_K9} -s.listed_names={id} -function s.chainfilter(re,tp,cid) - return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) -end -function s.ntcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 -end -function s.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.tgfilter(c) - return c:IsSetCard(SET_K9) and c:IsAbleToGrave() and not c:IsCode(id) -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100442032.lua b/pre-release/c100442032.lua deleted file mode 100644 index 78c2d902f7..0000000000 --- a/pre-release/c100442032.lua +++ /dev/null @@ -1,100 +0,0 @@ ---K9-66a号 ヨクル ---K9 - #66a Jokull ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(s.ntcon) - c:RegisterEffect(e1) - --Special Summon both this card and 1 other Level 5 monster from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 non-Aqua "K9" monster from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_K9} -function s.ntcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 -end -function s.spcostfilter(c,e,tp) - return c:IsLevel(5) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) -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) - 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,POS_FACEUP) end - local rc=e:GetLabelObject() - Duel.SetTargetCard(rc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,rc),2,tp,0) -end -function s.spfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Group.FromCards(c,Duel.GetFirstTarget()) - 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_FACEUP)==2 then - for sc in g:Iter() do - --They cannot be used as material for the Xyz Summon of a LIGHT monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetValue(function(e,c) return c and c:IsAttribute(ATTRIBUTE_LIGHT) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end - end -end -function s.thfilter(c) - return not c:IsRace(RACE_AQUA) and c:IsSetCard(SET_K9) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100442033.lua b/pre-release/c100442033.lua deleted file mode 100644 index ba81ee07cf..0000000000 --- a/pre-release/c100442033.lua +++ /dev/null @@ -1,92 +0,0 @@ ---K9-66b号 ランタン ---K9 - #66b Lantern ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(s.ntcon) - c:RegisterEffect(e1) - --Special Summon both this card and 1 other Level 5 monster from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2: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 "K9" Spell/Trap from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_K9} -function s.ntcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 -end -function s.spfilter(c,e,tp) - return not c:IsRace(RACE_PYRO) and c:IsLevel(5) and c:IsSetCard(SET_K9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return s.spfilter(chkc,e,tp) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) end - 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) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - local g=Group.FromCards(c,tc) - if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=2 then return end - for sc in g:Iter() do - --They cannot be used as material for the Xyz Summon of a LIGHT monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetValue(function(e,c) return c and c:IsAttribute(ATTRIBUTE_LIGHT) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end - end -end -function s.thfilter(c) - return c:IsSetCard(SET_K9) and c:IsSpellTrap() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,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/c100442034.lua b/pre-release/c100442034.lua deleted file mode 100644 index 513ca7dc2a..0000000000 --- a/pre-release/c100442034.lua +++ /dev/null @@ -1,78 +0,0 @@ ---K9-ØØ号 ルプス ---K9 - #ØØ Lupus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand or GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) - --Immediately after this effect resolves, Xyz Summon using this card you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.xyztg) - e2:SetOperation(s.xyzop) - c:RegisterEffect(e2) - --An Xyz Monster that has this card as material gains this effect: ● Your opponent cannot target this card with card effects - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_XMATERIAL) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(aux.tgoval) - c:RegisterEffect(e3) -end -function s.chainfilter(re,tp,cid) - return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --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.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.xyzop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,c) - if #g>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.XyzSummon(tp,sg:GetFirst(),c) - end -end \ No newline at end of file diff --git a/pre-release/c100442035.lua b/pre-release/c100442035.lua deleted file mode 100644 index 8af3cd3c9d..0000000000 --- a/pre-release/c100442035.lua +++ /dev/null @@ -1,71 +0,0 @@ ---K9-17号 “Ripper” ---K9 - #17 "Ripper" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 5 monsters - Xyz.AddProcedure(c,nil,5,2) - --Add 1 "K9" card from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsMonsterEffect() end) - --Negate an opponent's monster effect activated in the hand or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1)) - e2:SetTarget(s.distg) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) -end -s.listed_series={SET_K9} -function s.thfilter(c) - return c:IsSetCard(SET_K9) 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.setfilter(c) - return c:IsSetCard(SET_K9) and c:IsQuickPlaySpell() and c:IsSSetable() -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - if Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SSet(tp,sg) - end - end - 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_HAND|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) -end diff --git a/pre-release/c100442036.lua b/pre-release/c100442036.lua deleted file mode 100644 index c28500be20..0000000000 --- a/pre-release/c100442036.lua +++ /dev/null @@ -1,81 +0,0 @@ ---K9-ØØ号 “Hound” ---K9 - #ØØ "Hound" ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 5 monsters - Xyz.AddProcedure(c,nil,5,2) - --Cannot be destroyed by battle or your opponent's card effects the turn it is Special Summoned - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(function(e) return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(aux.indoval) - c:RegisterEffect(e2) - --Register when the opponent activates a monster effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(s.regop) - c:RegisterEffect(e3) - --This card gains 500 ATK when that effect resolves - local e3b=Effect.CreateEffect(c) - e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3b:SetCode(EVENT_CHAIN_SOLVED) - e3b:SetRange(LOCATION_MZONE) - e3b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e3b:SetOperation(s.atkop) - c:RegisterEffect(e3b) - --Banish 1 card on the field - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) - e4:SetTarget(s.rmvtg) - e4:SetOperation(s.rmvop) - c:RegisterEffect(e4) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - if not (re:IsMonsterEffect() and re:GetHandlerPlayer()==1-tp) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESET_CHAIN|RESETS_STANDARD&~RESET_TURN_SET,0,1) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - if not (re:IsMonsterEffect() and re:GetHandlerPlayer()==1-tp) then return end - Duel.Hint(HINT_CARD,0,id) - local c=e:GetHandler() - --This card gains 500 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100442037.lua b/pre-release/c100442037.lua deleted file mode 100644 index 9b37ac94b6..0000000000 --- a/pre-release/c100442037.lua +++ /dev/null @@ -1,57 +0,0 @@ ---K9-EX “Werewolf” ---K9 - EX "Werewolf" ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 9 monsters - Xyz.AddProcedure(c,nil,9,2) - --Can attack a number of times each Battle Phase, up to the number of materials attached to it - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(function(e,c) return math.max(0,e:GetHandler():GetOverlayCount()-1) end) - c:RegisterEffect(e1) - --Activate this effect depending on whose turn it is - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(Cost.Detach(1)) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=Duel.IsTurnPlayer(tp) and LOCATION_ONFIELD|LOCATION_GRAVE or LOCATION_HAND - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,loc,1,nil) end - e:SetLabel(loc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,loc) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local loc=e:GetLabel() - local g=Duel.GetFieldGroup(tp,0,loc) - if #g==0 then return end - if loc==LOCATION_HAND then - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil) - if tc then - aux.RemoveUntil(tc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(rg,e,tp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end) - end - Duel.ShuffleHand(1-tp) - else - local rg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_REMOVE) - if #rg==0 then return end - Duel.HintSelection(rg) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end -end -function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_ONFIELD)<=1 - and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 -end \ No newline at end of file diff --git a/pre-release/c100442038.lua b/pre-release/c100442038.lua deleted file mode 100644 index b287929f64..0000000000 --- a/pre-release/c100442038.lua +++ /dev/null @@ -1,87 +0,0 @@ ---K9-LC拘束解除 ---K9 - LC Liberation ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Set this card from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --Check if a "K9" monster has battled this turn - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLED) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_K9} -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local bc0,bc1=Duel.GetBattleMonster(0) - if bc0 and bc0:IsSetCard(SET_K9) then - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - end - if bc1 and bc1:IsSetCard(SET_K9) then - Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) - end -end -function s.tgfilter(c,e,tp) - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and (c:IsSetCard(SET_K9) or c:IsRank(5)) and c:IsType(TYPE_XYZ) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) -end -function s.spfilter(c,e,tp,mc,code) - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_K9) and not c:IsCode(code) and c:IsType(TYPE_XYZ) - and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or #pg>1 or (#pg==1 and not pg:IsContains(tc)) 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,tc,tc:GetCode()):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() - end -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsSSetable() then - Duel.SSet(tp,c) - end -end \ No newline at end of file diff --git a/pre-release/c100442039.lua b/pre-release/c100442039.lua deleted file mode 100644 index 45c7aca54d..0000000000 --- a/pre-release/c100442039.lua +++ /dev/null @@ -1,97 +0,0 @@ ---K9-EX強制解除 ---K9 - EX Forced Liberation ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Set this card from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --Check if a "K9" monster has battled this turn - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLED) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_K9} -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local bc0,bc1=Duel.GetBattleMonster(0) - if bc0 and bc0:IsSetCard(SET_K9) then - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - end - if bc1 and bc1:IsSetCard(SET_K9) then - Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) - end -end -function s.tgfilter(c,e,tp) - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsSetCard(SET_K9) and c:IsType(TYPE_XYZ) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) -end -function s.spfilter(c,e,tp,mc,code) - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_K9) and not c:IsCode(code) and c:IsType(TYPE_XYZ) - and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or #pg>1 or (#pg==1 and not pg:IsContains(tc)) 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,tc,tc:GetCode()):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() - if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end - end -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsSSetable() then - Duel.SSet(tp,c) - end -end \ No newline at end of file diff --git a/pre-release/c100442040.lua b/pre-release/c100442040.lua deleted file mode 100644 index c9d0c5d788..0000000000 --- a/pre-release/c100442040.lua +++ /dev/null @@ -1,72 +0,0 @@ ---"Case of K9" ---"Case of K9" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can add 1 "K9" monster from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --"K9" monsters you control gain 900 ATK the turn your opponent activated a monster effect in the hand or GY - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCondition(function(e) return Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 end) - e2:SetTarget(function(e,c) return c:IsSetCard(SET_K9) end) - e2:SetValue(900) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) - --Set 1 "K9" Quick-Play Spell from your Deck or 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_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.setcon) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_K9} -function s.chainfilter(re,tp,cid) - return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) -end -function s.thfilter(c) - return c:IsSetCard(SET_K9) and c:IsMonster() and c:IsAbleToHand() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_STZONE) -end -function s.setfilter(c) - return c:IsSetCard(SET_K9) and c:IsQuickPlaySpell() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100442041.lua b/pre-release/c100442041.lua deleted file mode 100644 index 46a51b5a37..0000000000 --- a/pre-release/c100442041.lua +++ /dev/null @@ -1,88 +0,0 @@ ---K9-EW特殊解除実験 ---K9 - EW Experimental Liberation ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Set 1 "K9" Quick-Play Spell from our GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(TIMING_END_PHASE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsPhase(PHASE_END) end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_K9} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_K9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.exspfilter(c,e,tp,mc) - return c:IsSetCard(SET_K9) and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(sc),tp,nil,nil,REASON_XYZ) - if (#pg<=0 or (#pg==1 and pg:IsContains(sc))) and Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sc) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyzc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,sc):GetFirst() - if xyzc then - xyzc:SetMaterial(sc) - Duel.Overlay(xyzc,sc) - Duel.BreakEffect() - if Duel.SpecialSummon(xyzc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end - xyzc:CompleteProcedure() - local turn_count=Duel.GetTurnCount() - --Destroy it during the End Phase of the next turn - aux.DelayedOperation(xyzc,PHASE_END,id,e,tp, - function(ag) Duel.Destroy(ag,REASON_EFFECT) end, - function() return Duel.GetTurnCount()==turn_count+1 end, - nil,2,aux.Stringid(id,3) - ) - end - end - end -end -function s.setfilter(c) - return c:IsSetCard(SET_K9) and c:IsQuickPlaySpell() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SSet(tp,tc) - end -end \ No newline at end of file diff --git a/pre-release/c101301001.lua b/pre-release/c101301001.lua deleted file mode 100644 index d21ea08266..0000000000 --- a/pre-release/c101301001.lua +++ /dev/null @@ -1,108 +0,0 @@ ---ズバババナイト ---Zubababa Knight ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Add 1 "Gagaga" monster from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.gathcon) - e3:SetTarget(s.gathtg) - e3:SetOperation(s.gathop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_REMOVE) - c:RegisterEffect(e4) -end -s.listed_series={SET_ZUBABA,SET_GAGAGA} -s.listed_names={id} -function s.zbthfilter(c) - return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) -end -function s.desfilter(c) - return c:IsLevelBelow(4) and c:IsDefensePos() and c:IsFaceup() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) - local b1=Duel.IsExistingMatchingCard(s.zbthfilter,tp,LOCATION_DECK,0,1,nil) - local b2=#g>0 - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_DESTROY) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Add 1 "Zubaba" monster from your Deck to your hand, except "Zubababa Knight", and if you do, this card's Level becomes that added monster's - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.zbthfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sc) - local lv=sc:GetLevel() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsLevel(lv) then - --This card's Level becomes the added monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - end - elseif op==2 then - --Destroy 1 Level 4 or lower Defense Position monster your opponent controls - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.gathcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.gathfilter(c) - return c:IsSetCard(SET_GAGAGA) and c:IsMonster() and c:IsAbleToHand() -end -function s.gathtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.gathfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.gathop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.gathfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101301002.lua b/pre-release/c101301002.lua deleted file mode 100644 index 9543496d60..0000000000 --- a/pre-release/c101301002.lua +++ /dev/null @@ -1,103 +0,0 @@ ---ガガガガンバラナイト ---Gagaga Ganbara Knight ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Gogogo" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) -end -s.listed_series={SET_GAGAGA,SET_GOGOGO} -function s.spcostfilter(c) - return c:IsSetCard(SET_GAGAGA) and not c:IsPublic() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleExtra(tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) -end -function s.gaspfilter(c,e,tp) - return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.gaspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - local b2=Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - if op==1 then - --Special Summon 1 "Gagaga" monster from your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.gaspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --Change the battle position of 1 monster on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end - end - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.thfilter(c) - return c:IsSetCard(SET_GOGOGO) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101301003.lua b/pre-release/c101301003.lua deleted file mode 100644 index f596d78500..0000000000 --- a/pre-release/c101301003.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ゴゴゴゴブリンドバーグ ---Gogogo Goblindbergh ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 non-Warrior "Gogogo" monster from your hand, Deck or GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Dododo" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) -end -s.listed_series={SET_GOGOGO,SET_DODODO} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_GOGOGO) and not c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) and c:IsAttackPos() then - Duel.BreakEffect() - Duel.ChangePosition(c,POS_FACEUP_DEFENSE) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.thfilter(c) - return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101301004.lua b/pre-release/c101301004.lua deleted file mode 100644 index 7ad297ef4a..0000000000 --- a/pre-release/c101301004.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ドドドドウォリアー ---Dodododo Warrior ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Zubaba" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) -end -s.listed_series={SET_DODODO,SET_ZUBABA} -function s.spcostfilter(c) - return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToGraveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Its Level becomes 4 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - --Its ATK becomes 1800 - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(1800) - c:RegisterEffect(e2) - end - --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.thfilter(c) - return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101301013.lua b/pre-release/c101301013.lua deleted file mode 100644 index 5cdb8f8750..0000000000 --- a/pre-release/c101301013.lua +++ /dev/null @@ -1,90 +0,0 @@ ---静寂のサイコガール+ ---Serene Psychic Girl ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish 1 card from your hand, and if you do, Special Summon 1 Level 4 or lower Psychic monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.rmvsptg) - e1:SetOperation(s.rmvspop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Increase the Level of face-up monster(s) by 1 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.rmvsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.rmvspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 and rg:GetFirst():IsLocation(LOCATION_REMOVED) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:HasLevel() end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil) - if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) - if #tg==0 then return end - local c=e:GetHandler() - for tc in tg:Iter() do - --Increase their Levels by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301014.lua b/pre-release/c101301014.lua deleted file mode 100644 index b2ea8b343a..0000000000 --- a/pre-release/c101301014.lua +++ /dev/null @@ -1,64 +0,0 @@ ---寡黙なるサイコミニスター ---Hushed Psychic Minister ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you control a Psychic monster other than "Hushed Psychic Minister", you can Special Summon this card (from your hand) in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENSE,0) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Banish 1 face-up monster on the field until the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.rmvcost) - e2:SetTarget(s.rmvtg) - e2:SetOperation(s.rmvop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.spconfilter(c) - return c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.rmvcostfilter(c) - return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() -end -function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,1,c) - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - aux.RemoveUntil(tc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) - end -end \ No newline at end of file diff --git a/pre-release/c101301015.lua b/pre-release/c101301015.lua deleted file mode 100644 index 82119965d4..0000000000 --- a/pre-release/c101301015.lua +++ /dev/null @@ -1,70 +0,0 @@ ---メンタルプロシージャー ---Mind Procedure ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card you control would be used as Synchro Material for a Psychic monster, you can treat it as a non-Tuner - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_NONTUNER) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,sc) return sc:IsRace(RACE_PSYCHIC) end) - c:RegisterEffect(e1) - --Add 1 "Teleport" Normal or Quick-Play Spell from your Deck or GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.PayLP(2000)) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) - c:RegisterEffect(e3) - --Special Summn this card - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_REMOVE) - e4:SetCountLimit(1,id) - e4:SetCost(Cost.PayLP(1000)) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -s.listed_series={SET_TELEPORT} -function s.thfilter(c) - return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301016.lua b/pre-release/c101301016.lua deleted file mode 100644 index 6c168ec901..0000000000 --- a/pre-release/c101301016.lua +++ /dev/null @@ -1,75 +0,0 @@ ---プロトタイプサイコガンナー ---Prototype Psychic Blaster ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Psychic monster from your hand or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Special Summon this card from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(Cost.PayLP(1000),s.selfspcost)) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_REMOVED) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.spcostfilter(c) - return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c101301017.lua b/pre-release/c101301017.lua deleted file mode 100644 index 308ff63ae1..0000000000 --- a/pre-release/c101301017.lua +++ /dev/null @@ -1,101 +0,0 @@ ---冥帝王エイドス ---Eidos the Underworld Monarch ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Monarch" Spell/Trap or 1 monster with 2800 ATK/1000 DEF from your Deck or GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Change the Attribute of 1 monster on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.attrtg) - e3:SetOperation(s.attrop) - c:RegisterEffect(e3) - --Add this card to your hand or Special Summon it - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(s.thspcon) - e4:SetTarget(s.thsptg) - e4:SetOperation(s.thspop) - c:RegisterEffect(e4) -end -s.listed_series={SET_MONARCH} -function s.thfilter(c) - return ((c:IsSetCard(SET_MONARCH) and c:IsSpellTrap()) or (c:IsAttack(2800) and c:IsDefense(1000))) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local attr=Duel.AnnounceAnotherAttribute(g,tp) - e:SetLabel(attr) -end -function s.attrop(e,tp,eg,ep,ev,re,r,rp) - local attr=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAttributeExcept,attr),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --It becomes the declared Attribute - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(attr) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -end -function s.thspcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ec:IsSummonPlayer(tp) and ec:IsTributeSummoned() and ec:IsAttackAbove(2400) and ec:IsDefense(1000) and ec:IsFaceup() -end -function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - aux.ToHandOrElse(c,tp, - function(sc) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function(sc) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,3) - ) -end \ No newline at end of file diff --git a/pre-release/c101301018.lua b/pre-release/c101301018.lua deleted file mode 100644 index ce0bbc65de..0000000000 --- a/pre-release/c101301018.lua +++ /dev/null @@ -1,98 +0,0 @@ ---源帝従騎テセラ ---Tessera the Prime Squire ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Tribute Summon 1 monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tribsumtg) - e2:SetOperation(s.tribsumop) - c:RegisterEffect(e2) - --Special Summon 1 monster with 800 ATK/1000 DEF from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_MONARCH} -function s.selfspcostfilter(c) - return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsPublic() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,nil,true,nil,1) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,1,nil,true,nil,1):GetFirst() - if tc then - Duel.SummonOrSet(tp,tc,true,nil,1) - end -end -function s.spfilter(c,e,tp) - return c:IsAttack(800) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - --You cannot Special Summon from the Extra Deck for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301024.lua b/pre-release/c101301024.lua deleted file mode 100644 index 0f6d45c454..0000000000 --- a/pre-release/c101301024.lua +++ /dev/null @@ -1,90 +0,0 @@ ---超量妖精ゼータン ---Super Quantal Fairy Zetan ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card, then you can make its Level become the Level of 1 "Super Quant" monster you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1) - --Special Summon 1 "Super Quant" monster from your Deck, except "Super Quantal Fairy Zetan" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(Cost.SelfTribute,s.dspcost)) - e2:SetTarget(s.dsptg) - e2:SetOperation(s.dspop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_SUPER_QUANT} -function s.hspconfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) -end -function s.hspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.hspconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) -end -function s.lvfilter(c,lv) - return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and c:HasLevel() and not c:IsLevel(lv) -end -function s.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,c,c:GetLevel()) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local sc=g:Select(tp,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - Duel.BreakEffect() - --This card's Level becomes that monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(sc:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end -function s.dspcostfilter(c,e,tp) - return c:IsSetCard(SET_SUPER_QUANT) and not c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,c,e,tp) -end -function s.dspfilter(c,e,tp) - return c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.dspcostfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.dspcostfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST) -end -function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.dspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.dspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301025.lua b/pre-release/c101301025.lua deleted file mode 100644 index 84608132c6..0000000000 --- a/pre-release/c101301025.lua +++ /dev/null @@ -1,107 +0,0 @@ ---超量士ブラックレイヤー ---Super Quantum Black Layer ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Discard 1 other card, and if you do, Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsMonsterEffect() end) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Special Summon 1 "Super Quantal Mech Beast" Xyz Monster from your Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.xyzsptg) - e2:SetOperation(s.xyzspop) - c:RegisterEffect(e2) - --Add 1 "Super Quant" Spell from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SUPER_QUANT,SET_SUPER_QUANTAL_MECH_BEAST} -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_EFFECT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,exc)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.xyzspfilter(c,e,tp,mc,chk_att) - return c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and mc:IsCanBeXyzMaterial(c,tp) - and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) - and (not chk_att or Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c)) -end -function s.attachfilter(c,tp,xc) - return c:IsSetCard(SET_SUPER_QUANT) and c:IsMonster() and c:IsCanBeXyzMaterial(xc,tp,REASON_EFFECT) -end -function s.xyzsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) - and Duel.IsExistingMatchingCard(s.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,true) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.xyzspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xc=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,false):GetFirst() - if not xc then return end - xc:SetMaterial(c) - Duel.Overlay(xc,c) - if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end - xc:CompleteProcedure() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) - local ac=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,xc):GetFirst() - if ac then - Duel.Overlay(xc,ac) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_SUPER_QUANT) and c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101301034.lua b/pre-release/c101301034.lua deleted file mode 100644 index c1afbda78e..0000000000 --- a/pre-release/c101301034.lua +++ /dev/null @@ -1,74 +0,0 @@ ---アブソリュートサイキッカー ---Absolute Axon Kicker ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Psychic Synchro Monster + 1 Synchro Monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO)) - c:AddMustFirstBeFusionSummoned() - --Banish all face-up cards your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) - e1:SetCost(Cost.PayLP(2000)) - e1:SetTarget(s.rmvtg) - e1:SetOperation(s.rmvop) - c:RegisterEffect(e1) - --Cannot be destroyed by card effects - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - c:RegisterEffect(e2) - --Special Summon 1 Level 10 Psychic Fusion Monster from your Extra Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,id) - e3:SetCondition(aux.exccon) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.miracle_synchro_fusion=true -function s.matfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_SYNCHRO,fc,sumtype,tp) and c:IsRace(RACE_PSYCHIC,fc,sumtype,tp) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsLevel(10) and c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if sc then - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end - end -end \ No newline at end of file diff --git a/pre-release/c101301038.lua b/pre-release/c101301038.lua deleted file mode 100644 index 0941bcf39d..0000000000 --- a/pre-release/c101301038.lua +++ /dev/null @@ -1,67 +0,0 @@ ---沈黙のサイコマジシャン ---Silent Psychic Magician ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Special Summon 1 Level 4 or lower Psychic monster from your GY or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card you control would be used as Synchro Material, you can treat it as a non-Tuner - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_NONTUNER) - e2:SetRange(LOCATION_MZONE) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - --Increase its Level by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetTargetRange(1,0) - e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) -end \ No newline at end of file diff --git a/pre-release/c101301039.lua b/pre-release/c101301039.lua deleted file mode 100644 index 9f3fc62cfa..0000000000 --- a/pre-release/c101301039.lua +++ /dev/null @@ -1,83 +0,0 @@ ---メンタルクロス・デーモン ---Thought Cross Archfiend ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTuner(nil),1,99) - --Special Summon 1 of your banished Level 7 or lower Psychic monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Gain LP equal to the original ATK of 1 Tributed monster, and if you do, this card gains that much ATK until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end) - e2:SetCost(s.lpatkost) - e2:SetTarget(s.lpatktg) - e2:SetOperation(s.lpatkop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.atkfilter(c) - return c:GetTextAttack()>0 -end -function s.lpatkost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.atkfilter,1,false,nil,c) end - local g=Duel.SelectReleaseGroupCost(tp,s.atkfilter,1,1,false,nil,c) - Duel.Release(g,REASON_COST) - e:SetLabel(g:GetFirst():GetTextAttack()) -end -function s.lpatktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,e:GetLabel()) -end -function s.lpatkop(e,tp,eg,ep,ev,re,r,rp) - local lpgain=e:GetLabel() - local atk=Duel.Recover(tp,lpgain,REASON_EFFECT) - local c=e:GetHandler() - if atk>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - --This card gains that much ATK until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301040.lua b/pre-release/c101301040.lua deleted file mode 100644 index 87cc6373df..0000000000 --- a/pre-release/c101301040.lua +++ /dev/null @@ -1,80 +0,0 @@ ---サイコガンナーMk-Ⅱ ---Psychic Blaster Mk-II ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner Psychic monsters - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) - --Special Summon 1 banished monster to your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Banish 1 other monster on the field then gain LP equal to its original ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(s.rmvcost) - e2:SetTarget(s.rmvtg) - e2:SetOperation(s.rmvop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.costfilter(c) - return c:IsMonster() and c:IsAbleToRemoveAsCost() -end -function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,tc:GetBaseAttack()) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) then - local atk=tc:GetBaseAttack() - if atk>0 then - Duel.BreakEffect() - Duel.Recover(tp,atk,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301042.lua b/pre-release/c101301042.lua deleted file mode 100644 index 3bad0231da..0000000000 --- a/pre-release/c101301042.lua +++ /dev/null @@ -1,85 +0,0 @@ ---FNo.0 未来皇ホープ・ゼアル ---Number F0: Utopic Future Zexal ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Xyz Monsters with the same Rank - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_XYZ),nil,2,nil,nil,nil,nil,false,s.xyzcheck) - --Gains ATK/DEF equal to the total Ranks of all Xyz Monsters you control and in your opponent's GY x 500 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_GRAVE,nil):GetSum(Card.GetRank)*500 end) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2) - --Your opponent's monsters cannot target monsters for attacks, except this one - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(function(e,c) return c~=e:GetHandler() end) - c:RegisterEffect(e3) - --Your opponent cannot target target other cards on the field with card effects - local e4=e3:Clone() - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e4:SetTarget(function(e,c) return c~=e:GetHandler() end) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --Take control of 1 monster your opponent controls - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetCategory(CATEGORY_CONTROL) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetCode(EVENT_CHAINING) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(s.ctcon) - e5:SetCost(aux.dxmcostgen(1,1,nil)) - e5:SetTarget(s.cttg) - e5:SetOperation(s.ctop) - c:RegisterEffect(e5,false,REGISTER_FLAG_DETACH_XMAT) -end -s.xyz_number=0 -function s.xyzcheck(g,tp,xyz) - local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) - return mg:GetClassCount(Card.GetRank)==1 -end -function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - local trig_loc,trig_p=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER) - return trig_p==1-tp and (trig_loc&LOCATION_ONFIELD)>0 -end -function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0) -end -function s.ctop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp) - end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - --This card cannot be destroyed by battle or card effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3008) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - end -end diff --git a/pre-release/c101301043.lua b/pre-release/c101301043.lua deleted file mode 100644 index f492d602eb..0000000000 --- a/pre-release/c101301043.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ガガガガガール ---Gagagaga Girl ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters - Xyz.AddProcedure(c,nil,4,2) - --Add 1 "Gagaga", "Onomat", or "Xyz" card from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,{SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --A "Utopic Future" Xyz Monster that has this card as material gains this effect. - --● If it is Xyz Summoned: Activate this effect; it can make a second attack during each Battle Phase this turn. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(s.secondattackcon) - e2:SetOperation(s.secondattackop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_ONOMAT,SET_XYZ,SET_UTOPIC_FUTURE} -function s.thfilter(c) - return c:IsSetCard({SET_GAGAGA,SET_ONOMAT,SET_XYZ}) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.secondattackcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsSetCard(SET_UTOPIC_FUTURE) and c:IsXyzSummoned() and (Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and not Duel.IsPhase(PHASE_BATTLE))) -end -function s.secondattackop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - --It can make a second attack during each Battle Phase this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3201) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301044.lua b/pre-release/c101301044.lua deleted file mode 100644 index cf4dbfe6c6..0000000000 --- a/pre-release/c101301044.lua +++ /dev/null @@ -1,119 +0,0 @@ ---H-C マグナム・エクスカリバー ---Heroic Champion - Magnum Excalibur ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 Warrior monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) - --Double this card's ATK during damage calculation only - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCondition(s.atkcon) - e1:SetCost(aux.dxmcostgen(2,2,nil)) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --Equip this card to another monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.eqtg) - e2:SetOperation(s.eqop) - c:RegisterEffect(e2) - --Shuffle 3 Warrior monsters from your GY into the Deck. - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.SelfBanishCost) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - c:RegisterEffect(e3) -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - return bc and bc:IsControler(1-tp) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,c:GetAttack()) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - --Double this card's ATK during damage calculation only - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) - c:RegisterEffect(e1) - end -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then - return Duel.SendtoGrave(c,REASON_RULE,PLAYER_NONE,PLAYER_NONE) - else - if not Duel.Equip(tp,c,tc) then return end - --Equip limit - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) - e0:SetValue(function(e,c) return c==tc end) - e0:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e0) - --The equipped monster gains 2000 ATK/DEF - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(2000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2) - end -end -function s.tdfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_GRAVE) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil) - if #g==3 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301052.lua b/pre-release/c101301052.lua deleted file mode 100644 index c92ca3e21f..0000000000 --- a/pre-release/c101301052.lua +++ /dev/null @@ -1,119 +0,0 @@ ---ガガガ・ホープ・タクティクス ---Gagaga Hope Tactics ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --"Utopia" and "Utopic" Xyz Monsters you control whose original Attribute is LIGHT cannot be destroyed by card effects, also your opponent cannot target them with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(s.utopixyzfilter)) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --Change the Levels of 2 face-up monsters you control, including a "Gagaga" monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,{id,0}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) - --Destroy 1 card your opponent controls - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.descon) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_series={SET_UTOPIC,SET_GAGAGA} -function s.utopixyzfilter(c) - return c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup() -end -function s.lvfilter(c,e) - return c:HasLevel() and c:IsFaceup() and c:IsCanBeEffectTarget(e) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_GAGAGA) -end -s.nlvfilter=aux.NOT(Card.IsLevel) -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local gg=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil,e) - if chk==0 then return aux.SelectUnselectGroup(gg,e,tp,2,2,s.rescon,0) end - local g1,g2=gg:Split(Card.IsSetCard,nil,SET_GAGAGA) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK) - local lv=Duel.AnnounceNumber(tp,s.get_declarable_levels(g1,g2)) - local g=gg:Match(s.nlvfilter,nil,lv) - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TARGET) - Duel.SetTargetCard(tg) - e:SetLabel(lv) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tg,2,tp,lv) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e):Filter(Card.IsFaceup,nil) - if #tg==0 then return end - local lv=e:GetLabel() - for tc in tg:Iter() do - if not tc:IsLevel(lv) then - --Its Level becomes the declared Level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - end -end -function s.get_declarable_levels(g1,g2) - local opts={} - for lv=1,12 do - local ct=g1:FilterCount(s.nlvfilter,nil,lv) - if ct>1 or (ct>0 and g2:IsExists(s.nlvfilter,1,nil,lv)) then - table.insert(opts,lv) - end - end - return table.unpack(opts) -end -function s.desconfilter(c,tp) - return s.utopixyzfilter(c) and c:IsSummonPlayer(tp) and c:IsXyzSummoned() -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.desconfilter,1,nil,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301059.lua b/pre-release/c101301059.lua deleted file mode 100644 index a6f8423a7b..0000000000 --- a/pre-release/c101301059.lua +++ /dev/null @@ -1,67 +0,0 @@ ---パラレル・テレポート ---Parallel Teleport ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 7 or lower Psychic monster from your Deck or Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_PSYCHIC) end) -end -function s.costfilter(c,e,tp) - return c:IsRace(RACE_PSYCHIC) and c:HasLevel() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,mc) - if not (c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetMZoneCount(tp,mc)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - end -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 - and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,e,tp) end - local rc=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,e,tp):GetFirst() - e:SetLabel(rc:GetOriginalLevel()) - Duel.Release(rc,REASON_COST) - --You cannot Special Summon the turn you activate this card, except Psychic monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_PSYCHIC) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local cost_chk=e:GetLabel()==100 - e:SetLabel(0) - return cost_chk or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - local lv_diff=math.abs(sc:GetOriginalLevel()-e:GetLabel()) - if lv_diff>0 then - Duel.BreakEffect() - Duel.SetLP(tp,Duel.GetLP(tp)-lv_diff*1000) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301060.lua b/pre-release/c101301060.lua deleted file mode 100644 index 83a3965560..0000000000 --- a/pre-release/c101301060.lua +++ /dev/null @@ -1,67 +0,0 @@ ---テレポート・フュージョン ---Teleport Fusion ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Psychic Fusion Monster by banishing Psychic monsters from your field and/or GY as material - local e1=Fusion.CreateSummonEff({handler=c, - fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC), - matfilter=Fusion.OnFieldMat(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC)), - extrafil=s.fextramat, - extraop=Fusion.BanishMaterial, - extratg=s.extratg} - ) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCondition(function() return Duel.IsMainPhase() end) - c:RegisterEffect(e1) - --Special Summon 1 of your banished Psychic monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.fextramat(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC),Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) -end -function s.spconfilter(c,tp) - return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSummonLocation(LOCATION_EXTRA) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) and c:IsPreviousRaceOnField(RACE_PSYCHIC) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301061.lua b/pre-release/c101301061.lua deleted file mode 100644 index 7210fd5e42..0000000000 --- a/pre-release/c101301061.lua +++ /dev/null @@ -1,78 +0,0 @@ ---帝王の策略 ---Scheme of the Monarchs ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Send 1 "Monarch" Spell/Trap from your Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --Add 1 monster with 2400 ATK/1000 DEF from your Deck or GY to your hand, then you can Normal Summon 1 listed monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MONARCH} -s.listed_names={id,51945556,4929256,26205777,60229110,73125233,9748752} ---"Zaborg the Thunder Monarch", "Mobius the Frost Monarch", "Thestalos the Firestorm Monarch", "Granmarg the Rock Monarch", "Raiza the Storm Monarch", "Caius the Shadow Monarch" -function s.tgfilter(c) - return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.attrfilter(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetAttribute()) -end -function s.thfilter(c,attr) - return c:IsAttribute(attr) and c:IsAttack(2400) and c:IsDefense(1000) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.attrfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.attrfilter,tp,0,LOCATION_MZONE,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.attrfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.sumfilter(c) - return c:IsSummonable(true,nil) and c:IsCode(51945556,4929256,26205777,60229110,73125233,9748752) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tc:GetAttribute()):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - local sg=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) - if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sumc=sg:Select(tp,1,1,nil):GetFirst() - Duel.BreakEffect() - Duel.Summon(tp,sumc,true,nil) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301062.lua b/pre-release/c101301062.lua deleted file mode 100644 index 2c7a9f292e..0000000000 --- a/pre-release/c101301062.lua +++ /dev/null @@ -1,78 +0,0 @@ ---叛逆の帝王 ---Rebellion of the Monarchs ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Reveal 3 monsters with 800 or 2400 or more ATK, and 1000 DEF, from your Deck, your opponent chooses 1 for you to add to your hand, and you send the rest to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Discard(nil,true)) - e1:SetTarget(s.thtgtg) - e1:SetOperation(s.thtgop) - c:RegisterEffect(e1) - --Special Summon 1 monster with 800 ATK/1000 DEF from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.revfilter(c) - return (c:IsAttack(800) or c:IsAttackAbove(2400)) and c:IsDefense(1000) and (c:IsAbleToHand() or c:IsAbleToGrave()) -end -function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) - if chk==0 then return #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsAbleToHand,1,nil) -end -function s.thtgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) - if #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) then - local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_CONFIRM) - Duel.ConfirmCards(1-tp,rg) - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,2)) - local sc=rg:FilterSelect(1-tp,Card.IsAbleToHand,1,1,nil):GetFirst() - Duel.SendtoHand(sc,nil,REASON_EFFECT) - Duel.SendtoGrave(rg-sc,REASON_EFFECT) - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spfilter(c,e,tp) - return c:IsAttack(800) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/pre-release/c101301068.lua b/pre-release/c101301068.lua deleted file mode 100644 index ad046860b4..0000000000 --- a/pre-release/c101301068.lua +++ /dev/null @@ -1,103 +0,0 @@ ---第19層『襲来干渉!漆黒の超量士!!』 ---Layer 19: "Preventing the Invasion! The Pitch-Black Super Quantum!!" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_SUPER_QUANT} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SUPER_QUANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalAttribute,c:GetOriginalAttribute()),tp,LOCATION_MZONE,0,1,nil) -end -function s.setfilter(c) - return c:IsSetCard(SET_SUPER_QUANT) and c:IsTrap() and c:IsSSetable() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - local b3=not Duel.HasFlagEffect(tp,id+200) - and (e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 or b3 end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetLabel()==1 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttackPos() and chkc:IsCanChangePosition() end - local cost_skip=e:GetLabel()~=-100 - local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) - and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=(cost_skip or (not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil))) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) - and (not e:IsHasType(EFFECT_TYPE_ACTIVATE) or e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then e:SetLabel(0) return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_POSITION) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - elseif op==3 then - e:SetCategory(0) - e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Change 1 Attack Position monster on the field to Defense Position - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) - end - elseif op==2 then - --Special Summon 1 "Super Quant" monster from your Deck in Defense Position, with a different original Attribute from the monsters you control - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - elseif op==3 then - --Set 1 "Super Quant" Trap from your Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SSet(tp,sc)>0 then - --It can be activated this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301074.lua b/pre-release/c101301074.lua deleted file mode 100644 index c698c8ceab..0000000000 --- a/pre-release/c101301074.lua +++ /dev/null @@ -1,86 +0,0 @@ ---エクシーズ・アンブレイカブル・バリア ---Xyz Unbreakable Barrier ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Negate the activation of a Spell/Trap Card, or monster effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,id) - e1:SetCondition(s.negcon) - e1:SetTarget(s.negtg) - e1:SetOperation(s.negop) - c:RegisterEffect(e1) - --Attach 1 LIGHT "Utopia" or "Utopic" Xyz Monster from your GY to 1 Xyz Monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.attachtg) - e2:SetOperation(s.attachop) - c:RegisterEffect(e2) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,1,nil) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - if Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT)==2 then - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) - if #dg==0 then return end - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end -function s.xyzfilter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c) -end -function s.matfilter(c,tp,xyzc) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) - and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) -end -function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.attachop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,tc) - if #g>0 then - Duel.Overlay(tc,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301076.lua b/pre-release/c101301076.lua deleted file mode 100644 index ca280da32c..0000000000 --- a/pre-release/c101301076.lua +++ /dev/null @@ -1,151 +0,0 @@ ---帝王の極致 ---Culmination of the Monarchs ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_MONARCH} -function s.effcostfilter(c) - return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local cost_skip=e:GetLabel()~=-100 - --Destroy 1 monster on the field - local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - --Destroy up to 2 Spells/Traps on the field - local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) - and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - --Discard 1 random card from your opponent's hand - local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) - and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT) - --Destroy 1 face-down card on the field - local b4=(cost_skip or not Duel.HasFlagEffect(tp,id+300)) - and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - --Place 1 card on the field on top of the Deck - local b5=(cost_skip or not Duel.HasFlagEffect(tp,id+400)) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - --Banish 1 card on the field - local b6=(cost_skip or not Duel.HasFlagEffect(tp,id+500)) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - if chk==0 then e:SetLabel(0) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) - and (b1 or b2 or b3 or b4 or b5 or b6) end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}, - {b4,aux.Stringid(id,4)}, - {b5,aux.Stringid(id,5)}, - {b6,aux.Stringid(id,6)}) - e:SetLabel(op) - if op==1 then - --Destroy 1 monster on the field - e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - elseif op==2 then - --Destroy up to 2 Spells/Traps on the field - e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - elseif op==3 then - --Discard 1 random card from your opponent's hand - e:SetCategory(CATEGORY_HANDES) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) - elseif op==4 then - --Destroy 1 face-down card on the field - e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+300,RESET_PHASE|PHASE_END,0,1) end - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - elseif op==5 then - --Place 1 card on the field on top of the Deck - e:SetCategory(CATEGORY_TODECK) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+400,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD) - elseif op==6 then - --Banish 1 card on the field - e:SetCategory(CATEGORY_REMOVE) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+500,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Destroy 1 monster on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==2 then - --Destroy up to 2 Spells/Traps on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==3 then - --Discard 1 random card from your opponent's hand - local hg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,0,LOCATION_HAND,nil,REASON_EFFECT) - if #hg>0 then - local g=hg:RandomSelect(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) - end - elseif op==4 then - --Destroy 1 face-down card on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==5 then - --Place 1 card on the field on top of the Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) - end - elseif op==6 then - --Banish 1 card on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end - end -end \ No newline at end of file From 1faf130330c25e3690f7d5e1a9cefd0189cf9c68 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 24 Mar 2025 12:07:24 +0200 Subject: [PATCH 2/2] Add files via upload --- official/c1035143.lua | 104 +++++++++++++++++++++++++ official/c1498449.lua | 62 +++++++++++++++ official/c26585784.lua | 88 +++++++++++++++++++++ official/c27308231.lua | 87 +++++++++++++++++++++ official/c27420823.lua | 71 +++++++++++++++++ official/c28642461.lua | 100 ++++++++++++++++++++++++ official/c29369059.lua | 124 ++++++++++++++++++++++++++++++ official/c30581601.lua | 88 +++++++++++++++++++++ official/c31425736.lua | 82 ++++++++++++++++++++ official/c31603289.lua | 86 +++++++++++++++++++++ official/c32548318.lua | 34 +++++++++ official/c336601.lua | 53 +++++++++++++ official/c33760966.lua | 106 ++++++++++++++++++++++++++ official/c37720300.lua | 56 ++++++++++++++ official/c4215180.lua | 80 ++++++++++++++++++++ official/c44482554.lua | 83 ++++++++++++++++++++ official/c53792930.lua | 97 ++++++++++++++++++++++++ official/c5431722.lua | 55 ++++++++++++++ official/c54919528.lua | 81 ++++++++++++++++++++ official/c55031170.lua | 92 ++++++++++++++++++++++ official/c613013.lua | 81 ++++++++++++++++++++ official/c6153210.lua | 41 ++++++++++ official/c65853758.lua | 103 +++++++++++++++++++++++++ official/c66975205.lua | 91 ++++++++++++++++++++++ official/c67098897.lua | 77 +++++++++++++++++++ official/c68810435.lua | 77 +++++++++++++++++++ official/c69932023.lua | 52 +++++++++++++ official/c70871153.lua | 74 ++++++++++++++++++ official/c73129314.lua | 88 +++++++++++++++++++++ official/c7375867.lua | 68 +++++++++++++++++ official/c74941992.lua | 56 ++++++++++++++ official/c75003700.lua | 61 +++++++++++++++ official/c79755671.lua | 108 ++++++++++++++++++++++++++ official/c80181649.lua | 72 ++++++++++++++++++ official/c90303227.lua | 57 ++++++++++++++ official/c91025875.lua | 78 +++++++++++++++++++ official/c92248362.lua | 79 +++++++++++++++++++ official/c93192592.lua | 85 +++++++++++++++++++++ official/c93360904.lua | 115 ++++++++++++++++++++++++++++ pre-release/c100295101.lua | 87 +++++++++++++++++++++ pre-release/c100296202.lua | 95 +++++++++++++++++++++++ pre-release/c101301001.lua | 108 ++++++++++++++++++++++++++ pre-release/c101301002.lua | 103 +++++++++++++++++++++++++ pre-release/c101301003.lua | 84 +++++++++++++++++++++ pre-release/c101301004.lua | 95 +++++++++++++++++++++++ pre-release/c101301013.lua | 90 ++++++++++++++++++++++ pre-release/c101301014.lua | 64 ++++++++++++++++ pre-release/c101301015.lua | 70 +++++++++++++++++ pre-release/c101301016.lua | 75 ++++++++++++++++++ pre-release/c101301017.lua | 101 +++++++++++++++++++++++++ pre-release/c101301018.lua | 98 ++++++++++++++++++++++++ pre-release/c101301024.lua | 90 ++++++++++++++++++++++ pre-release/c101301025.lua | 107 ++++++++++++++++++++++++++ pre-release/c101301034.lua | 74 ++++++++++++++++++ pre-release/c101301038.lua | 67 ++++++++++++++++ pre-release/c101301039.lua | 83 ++++++++++++++++++++ pre-release/c101301040.lua | 80 ++++++++++++++++++++ pre-release/c101301042.lua | 85 +++++++++++++++++++++ pre-release/c101301043.lua | 64 ++++++++++++++++ pre-release/c101301044.lua | 119 +++++++++++++++++++++++++++++ pre-release/c101301052.lua | 119 +++++++++++++++++++++++++++++ pre-release/c101301059.lua | 67 ++++++++++++++++ pre-release/c101301060.lua | 67 ++++++++++++++++ pre-release/c101301061.lua | 78 +++++++++++++++++++ pre-release/c101301062.lua | 78 +++++++++++++++++++ pre-release/c101301068.lua | 103 +++++++++++++++++++++++++ pre-release/c101301074.lua | 86 +++++++++++++++++++++ pre-release/c101301076.lua | 151 +++++++++++++++++++++++++++++++++++++ 68 files changed, 5680 insertions(+) create mode 100644 official/c1035143.lua create mode 100644 official/c1498449.lua create mode 100644 official/c26585784.lua create mode 100644 official/c27308231.lua create mode 100644 official/c27420823.lua create mode 100644 official/c28642461.lua create mode 100644 official/c29369059.lua create mode 100644 official/c30581601.lua create mode 100644 official/c31425736.lua create mode 100644 official/c31603289.lua create mode 100644 official/c32548318.lua create mode 100644 official/c336601.lua create mode 100644 official/c33760966.lua create mode 100644 official/c37720300.lua create mode 100644 official/c4215180.lua create mode 100644 official/c44482554.lua create mode 100644 official/c53792930.lua create mode 100644 official/c5431722.lua create mode 100644 official/c54919528.lua create mode 100644 official/c55031170.lua create mode 100644 official/c613013.lua create mode 100644 official/c6153210.lua create mode 100644 official/c65853758.lua create mode 100644 official/c66975205.lua create mode 100644 official/c67098897.lua create mode 100644 official/c68810435.lua create mode 100644 official/c69932023.lua create mode 100644 official/c70871153.lua create mode 100644 official/c73129314.lua create mode 100644 official/c7375867.lua create mode 100644 official/c74941992.lua create mode 100644 official/c75003700.lua create mode 100644 official/c79755671.lua create mode 100644 official/c80181649.lua create mode 100644 official/c90303227.lua create mode 100644 official/c91025875.lua create mode 100644 official/c92248362.lua create mode 100644 official/c93192592.lua create mode 100644 official/c93360904.lua create mode 100644 pre-release/c100295101.lua create mode 100644 pre-release/c100296202.lua create mode 100644 pre-release/c101301001.lua create mode 100644 pre-release/c101301002.lua create mode 100644 pre-release/c101301003.lua create mode 100644 pre-release/c101301004.lua create mode 100644 pre-release/c101301013.lua create mode 100644 pre-release/c101301014.lua create mode 100644 pre-release/c101301015.lua create mode 100644 pre-release/c101301016.lua create mode 100644 pre-release/c101301017.lua create mode 100644 pre-release/c101301018.lua create mode 100644 pre-release/c101301024.lua create mode 100644 pre-release/c101301025.lua create mode 100644 pre-release/c101301034.lua create mode 100644 pre-release/c101301038.lua create mode 100644 pre-release/c101301039.lua create mode 100644 pre-release/c101301040.lua create mode 100644 pre-release/c101301042.lua create mode 100644 pre-release/c101301043.lua create mode 100644 pre-release/c101301044.lua create mode 100644 pre-release/c101301052.lua create mode 100644 pre-release/c101301059.lua create mode 100644 pre-release/c101301060.lua create mode 100644 pre-release/c101301061.lua create mode 100644 pre-release/c101301062.lua create mode 100644 pre-release/c101301068.lua create mode 100644 pre-release/c101301074.lua create mode 100644 pre-release/c101301076.lua diff --git a/official/c1035143.lua b/official/c1035143.lua new file mode 100644 index 0000000000..16f8f0c2bd --- /dev/null +++ b/official/c1035143.lua @@ -0,0 +1,104 @@ +--ダークリボー +--Darkuriboh +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Apply effects to 1 of your Fiend or Fusion Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_BECOME_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.effcon) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_BE_BATTLE_TARGET) + c:RegisterEffect(e2) + --Add 1 "Polymerization" from your Deck or GY to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_POLYMERIZATION} +function s.effconfilter(c,tp) + return (c:IsRace(RACE_FIEND) or c:IsType(TYPE_FUSION)) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) 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 g=eg:Filter(s.effconfilter,nil,tp):Match(Card.IsCanBeEffectTarget,nil,e) + if chk==0 then return #g>0 end + local tg=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + tg=g:Select(tp,1,1,nil) + else + tg=g + end + Duel.SetTargetCard(tg) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsMonster() then + local c=e:GetHandler() + tc:RegisterFlagEffect(id,RESET_EVENT|RESET_TURN_SET|RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) + --It cannot be destroyed by battle or card effects until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + tc:RegisterEffect(e2) + --Its effects activated on the field cannot be negated until the end of this turn + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EFFECT_CANNOT_DISEFFECT) + e3:SetTargetRange(1,1) + e3:SetValue(s.effectfilter) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) + end +end +function s.effectfilter(e,ct) + local eff,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_LOCATION) + return eff:GetHandler():HasFlagEffect(id) and (loc&LOCATION_ONFIELD)>0 +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_HAND) and c:IsReason(REASON_EFFECT) +end +function s.thfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c1498449.lua b/official/c1498449.lua new file mode 100644 index 0000000000..4d23abb13a --- /dev/null +++ b/official/c1498449.lua @@ -0,0 +1,62 @@ +--星辰砲手ファイメナ +--Dragontail Fymena +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Dragon or Spellcaster Fusion Monster from your Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(aux.SelfDiscardCost) + e1:SetTarget(s.fustg) + e1:SetOperation(Fusion.SummonEffOP({fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)})) + c:RegisterEffect(e1) + --Set 1 "Dragontail" Spell/Trap from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_BE_MATERIAL) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGONTAIL} +function s.fextra(exc) + return function(e,tp,mg) + return nil,s.fcheck(exc) + end +end +function s.fcheck(exc) + return function(tp,sg,fc) + return not (exc and sg:IsContains(exc)) + end +end +function s.fustg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local params={extrafil=s.fextra(e:GetHandler()),fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)} + return Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) + end + Fusion.SummonEffTG({fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)})(e,tp,eg,ep,ev,re,r,rp,1) +end +function s.setfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/official/c26585784.lua b/official/c26585784.lua new file mode 100644 index 0000000000..46a51b5a37 --- /dev/null +++ b/official/c26585784.lua @@ -0,0 +1,88 @@ +--K9-EW特殊解除実験 +--K9 - EW Experimental Liberation +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Set 1 "K9" Quick-Play Spell from our GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetHintTiming(TIMING_END_PHASE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsPhase(PHASE_END) end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_K9} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_K9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.exspfilter(c,e,tp,mc) + return c:IsSetCard(SET_K9) and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(sc),tp,nil,nil,REASON_XYZ) + if (#pg<=0 or (#pg==1 and pg:IsContains(sc))) and Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sc) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xyzc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,sc):GetFirst() + if xyzc then + xyzc:SetMaterial(sc) + Duel.Overlay(xyzc,sc) + Duel.BreakEffect() + if Duel.SpecialSummon(xyzc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end + xyzc:CompleteProcedure() + local turn_count=Duel.GetTurnCount() + --Destroy it during the End Phase of the next turn + aux.DelayedOperation(xyzc,PHASE_END,id,e,tp, + function(ag) Duel.Destroy(ag,REASON_EFFECT) end, + function() return Duel.GetTurnCount()==turn_count+1 end, + nil,2,aux.Stringid(id,3) + ) + end + end + end +end +function s.setfilter(c) + return c:IsSetCard(SET_K9) and c:IsQuickPlaySpell() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SSet(tp,tc) + end +end \ No newline at end of file diff --git a/official/c27308231.lua b/official/c27308231.lua new file mode 100644 index 0000000000..b287929f64 --- /dev/null +++ b/official/c27308231.lua @@ -0,0 +1,87 @@ +--K9-LC拘束解除 +--K9 - LC Liberation +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Set this card from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) + --Check if a "K9" monster has battled this turn + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_BATTLED) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_K9} +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local bc0,bc1=Duel.GetBattleMonster(0) + if bc0 and bc0:IsSetCard(SET_K9) then + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + end + if bc1 and bc1:IsSetCard(SET_K9) then + Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) + end +end +function s.tgfilter(c,e,tp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and (c:IsSetCard(SET_K9) or c:IsRank(5)) and c:IsType(TYPE_XYZ) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) +end +function s.spfilter(c,e,tp,mc,code) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_K9) and not c:IsCode(code) and c:IsType(TYPE_XYZ) + and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) + if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or #pg>1 or (#pg==1 and not pg:IsContains(tc)) 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,tc,tc:GetCode()):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() + end +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsSSetable() end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsSSetable() then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/official/c27420823.lua b/official/c27420823.lua new file mode 100644 index 0000000000..8af3cd3c9d --- /dev/null +++ b/official/c27420823.lua @@ -0,0 +1,71 @@ +--K9-17号 “Ripper” +--K9 - #17 "Ripper" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 5 monsters + Xyz.AddProcedure(c,nil,5,2) + --Add 1 "K9" card from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsMonsterEffect() end) + --Negate an opponent's monster effect activated in the hand or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.discon) + e2:SetCost(Cost.Detach(1)) + e2:SetTarget(s.distg) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) + c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) +end +s.listed_series={SET_K9} +function s.thfilter(c) + return c:IsSetCard(SET_K9) 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.setfilter(c) + return c:IsSetCard(SET_K9) and c:IsQuickPlaySpell() and c:IsSSetable() +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + if Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SSet(tp,sg) + end + end + 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_HAND|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) +end diff --git a/official/c28642461.lua b/official/c28642461.lua new file mode 100644 index 0000000000..78c2d902f7 --- /dev/null +++ b/official/c28642461.lua @@ -0,0 +1,100 @@ +--K9-66a号 ヨクル +--K9 - #66a Jokull +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(s.ntcon) + c:RegisterEffect(e1) + --Special Summon both this card and 1 other Level 5 monster from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 non-Aqua "K9" monster from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_K9} +function s.ntcon(e,c,minc) + if c==nil then return true end + local tp=c:GetControler() + return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 +end +function s.spcostfilter(c,e,tp) + return c:IsLevel(5) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) +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) + 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,POS_FACEUP) end + local rc=e:GetLabelObject() + Duel.SetTargetCard(rc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,rc),2,tp,0) +end +function s.spfilter(c,e,tp) + return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Group.FromCards(c,Duel.GetFirstTarget()) + 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_FACEUP)==2 then + for sc in g:Iter() do + --They cannot be used as material for the Xyz Summon of a LIGHT monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e1:SetValue(function(e,c) return c and c:IsAttribute(ATTRIBUTE_LIGHT) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end + end +end +function s.thfilter(c) + return not c:IsRace(RACE_AQUA) and c:IsSetCard(SET_K9) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c29369059.lua b/official/c29369059.lua new file mode 100644 index 0000000000..bdf0c75f83 --- /dev/null +++ b/official/c29369059.lua @@ -0,0 +1,124 @@ +--ヤミー☆サプライズ +--Yummy☆Surprise +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_YUMMY} +function s.monoppthfilter(c,e,tp) + return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsControler(tp)) or c:IsControler(1-tp)) + and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() +end +function s.rescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsControler,nil,tp)==2 +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_YUMMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.fieldspellthfilter(c) + return c:IsFieldSpell() and c:IsFaceup() and c:IsAbleToHand() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local g=Duel.GetMatchingGroup(s.monoppthfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,e,tp) + local b1=not Duel.HasFlagEffect(tp,id) and #g>=4 + and aux.SelectUnselectGroup(g,e,tp,4,4,s.rescon,0) + local b2=not Duel.HasFlagEffect(tp,id+1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) + local b3=not Duel.HasFlagEffect(tp,id+2) + and Duel.IsExistingMatchingCard(s.fieldspellthfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 or b3 end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local cost_skip=e:GetLabel()~=-100 + local g=Duel.GetMatchingGroup(s.monoppthfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,e,tp) + local b1=not Duel.HasFlagEffect(tp,id) and #g>=4 + and aux.SelectUnselectGroup(g,e,tp,4,4,s.rescon,0) + local b2=not Duel.HasFlagEffect(tp,id+1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) + local b3=not Duel.HasFlagEffect(tp,id+2) + and Duel.IsExistingMatchingCard(s.fieldspellthfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) + if chk==0 then e:SetLabel(0) return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_TOHAND) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + local tg=aux.SelectUnselectGroup(g,e,tp,4,4,s.rescon,1,tp,HINTMSG_RTOHAND) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,4,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + elseif op==3 then + e:SetCategory(CATEGORY_TOHAND) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD|LOCATION_GRAVE) + end +end +function s.plfilter(c) + return c:IsSetCard(SET_YUMMY) and c:IsFieldSpell() and not c:IsForbidden() +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Return 2 LIGHT Beast monsters you control and 2 cards your opponent controls to the hand + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + end + elseif op==2 then + --Special Summon 1 "Yummy" monster from your hand or GY, but it cannot attack directly this turn + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + --It cannot attack directly this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3207) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + elseif op==3 then + --Return 1 Field Spell from your face-up field or GY to the hand, then you can place 1 "Yummy" Field Spell from your hand face-up on your field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.fieldspellthfilter),tp,LOCATION_ONFIELD|LOCATION_GRAVE,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 Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local plc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + if plc then + Duel.BreakEffect() + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + Duel.MoveToField(plc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + end + end + end + end +end \ No newline at end of file diff --git a/official/c30581601.lua b/official/c30581601.lua new file mode 100644 index 0000000000..e16429dc41 --- /dev/null +++ b/official/c30581601.lua @@ -0,0 +1,88 @@ +--ヤミー★スナッチー +--Yummy★Snatchy +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 1 Level 4 or lower LIGHT Beast monster + Link.AddProcedure(c,s.matfilter,1,1) + --Place 1 "Yummy" Field Spell from your hand or Deck face-up on your field + 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:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a "Yummy" 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_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase() or (Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase()) end) + e2:SetCost(aux.PayLPCost(100)) + e2:SetTarget(s.synchtg) + e2:SetOperation(s.synchop) + c:RegisterEffect(e2) +end +s.listed_series={SET_YUMMY} +function s.matfilter(c,lc,sumtype,tp) + return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT,lc,sumtype,tp) and c:IsRace(RACE_BEAST,lc,sumtype,tp) +end +function s.plfilter(c) + return c:IsSetCard(SET_YUMMY) and c:IsFieldSpell() and not c:IsForbidden() +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() + if sc then + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + end + --You cannot Link Summon Link-3 or higher Link Monsters for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetReset(RESET_PHASE|PHASE_END) + e1:SetTarget(function(e,c,tp,sumtyp,sumpos) return c:IsLinkAbove(3) and c:IsLinkMonster() and (sumtyp&SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK end) + Duel.RegisterEffect(e1,tp) +end +function s.synchrocheck(tp,sg,sc) + return sg:IsExists(Card.IsSetCard,1,nil,SET_YUMMY) +end +function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + Synchro.CheckAdditional=s.synchrocheck + local res=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) + Synchro.CheckAdditional=nil + return res + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.synchop(e,tp,eg,ep,ev,re,r,rp) + Synchro.CheckAdditional=s.synchrocheck + local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil) + if #g>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=g:Select(tp,1,1,nil):GetFirst() + Duel.SynchroSummon(tp,sc) + else + Synchro.CheckAdditional=nil + end +end \ No newline at end of file diff --git a/official/c31425736.lua b/official/c31425736.lua new file mode 100644 index 0000000000..63c9c1a045 --- /dev/null +++ b/official/c31425736.lua @@ -0,0 +1,82 @@ +--カプシー☆ヤミー +--Cupsie☆Yummy +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control a Link-1 monster or a Level 2 Synchro Monster, 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) + --Add 1 "Yummy" card from your Deck to your hand, except "Cupsie☆Yummy", or, if this card was Special Summoned by a Synchro Monster's effect, you can draw 1 card instead + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) +end +s.listed_series={SET_YUMMY} +s.listed_names={id} +function s.spconfilter(c) + return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.thfilter(c) + return c:IsSetCard(SET_YUMMY) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + or (sp_chk and Duel.IsPlayerCanDraw(tp,1)) end + e:SetLabel(sp_chk and 1 or 0) + if sp_chk then + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + else + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local sp_chk=e:GetLabel()==1 + local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + local b2=sp_chk and Duel.IsPlayerCanDraw(tp,1) + if not (b1 or b2) then return end + local op=nil + if sp_chk then + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + else + op=1 + end + if op==1 then + --Add 1 "Yummy" card from your Deck to your hand, except "Cupsie☆Yummy" + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + elseif op==2 then + --Draw 1 card + Duel.Draw(tp,1,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c31603289.lua b/official/c31603289.lua new file mode 100644 index 0000000000..7118c2f952 --- /dev/null +++ b/official/c31603289.lua @@ -0,0 +1,86 @@ +--カプシー★ヤミーウェイ +--Cupsie★Yummy Way +--scripted by Zedja +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1 non-Tuner monster + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(aux.NOT(Card.IsLinkMonster)),1,1,aux.FilterBoolFunction(Card.IsLink,1)) + --For this card's Synchro Summon, you can treat 1 Link-1 monster you control as a Level 1 Tuner + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) + e0:SetCode(EFFECT_SYNCHRO_LEVEL) + e0:SetRange(LOCATION_EXTRA) + e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e0:SetTarget(function(e,c) return c:IsLink(1) end) + e0:SetValue(function(e,sc) return sc:IsSetCard(SET_YUMMY) and 1 or -1 end) + c:RegisterEffect(e0) + --Add 2 "Yummy" monsters from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES) + 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.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon up to 2 "Yummy" monsters from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(aux.SelfToExtraCost) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_YUMMY} +function s.thfilter(c) + return c:IsSetCard(SET_YUMMY) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) 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) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil) + if #g==2 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT) + if #dg>0 then + Duel.BreakEffect() + Duel.SendtoGrave(dg,REASON_DISCARD|REASON_EFFECT) + end + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_YUMMY) 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.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + ft=math.min(ft,2) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c32548318.lua b/official/c32548318.lua new file mode 100644 index 0000000000..5209880348 --- /dev/null +++ b/official/c32548318.lua @@ -0,0 +1,34 @@ +--羅睺星辰 +--Rahu Dragontail +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + local params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL),extrafil=s.extramat,stage2=s.summonlimit,extratg=s.extratg} + --Fusion Summon 1 "Dragontail" Fusion Monster from your Extra Deck, using monsters from your hand, Deck, and/or field + local e1=Fusion.CreateSummonEff(params) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + c:RegisterEffect(e1) +end +s.listed_series={SET_DRAGONTAIL} +function s.extramat(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil) +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK) +end +function s.summonlimit(e,tc,tp,mg,chk) + if chk==2 then + 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,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/official/c336601.lua b/official/c336601.lua new file mode 100644 index 0000000000..7bc55cb9ed --- /dev/null +++ b/official/c336601.lua @@ -0,0 +1,53 @@ +--ムーン・ガードナー +--Moon Gardna +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If your opponent controls 2 or more 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) + --Add 1 Level 4 LIGHT monster 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_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2 +end +function s.thfilter(c) + return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,nil) + and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c33760966.lua b/official/c33760966.lua new file mode 100644 index 0000000000..c93e7545a9 --- /dev/null +++ b/official/c33760966.lua @@ -0,0 +1,106 @@ +--星辰爪竜アルザリオン +--Dragontail Altharion +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Dragontail" monster + 1+ monsters in the hand + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsLocation,LOCATION_HAND),1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGONTAIL)) + --Register how many materials are used from the hand + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():FilterCount(Card.IsLocation,nil,LOCATION_HAND)) end) + c:RegisterEffect(e0) + --Return monsters on the field and/or in any GY(s) to the hand, up to the number of monsters used as material from the 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_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabelObject():GetLabel()>0 end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + e1:SetLabelObject(e0) + c:RegisterEffect(e1) + --Special Summon this card from the GY, but banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Keep track of monsters being sent to the GY at the same time + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetRange(LOCATION_GRAVE) + e3:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) + e3:SetOperation(s.regop) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EVENT_CHAINING) + e4:SetOperation(function(e) e:GetHandler():ResetFlagEffect(id+1) end) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetCode(EVENT_CHAIN_SOLVED) + c:RegisterEffect(e5) + local e6=e4:Clone() + e6:SetCode(EVENT_BREAK_EFFECT) + c:RegisterEffect(e6) +end +s.listed_series={SET_DRAGONTAIL} +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsMonster() and chkc:IsAbleToHand() end + if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local ct=e:GetLabelObject():GetLabel() + local g=Duel.SelectTarget(tp,aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) +end +function s.thop(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 +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ct=eg:FilterCount(Card.IsMonster,nil) + if ct==0 or eg:IsContains(c) then return end + if ct>=2 or c:HasFlagEffect(id+1) then + Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,r,rp,ep,ev) + end + local eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT) + if eff then + c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/official/c37720300.lua b/official/c37720300.lua new file mode 100644 index 0000000000..5978d5e9a8 --- /dev/null +++ b/official/c37720300.lua @@ -0,0 +1,56 @@ +--スターシップ・アジャスト・プレーン +--Starship Adjust Plane +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --The Levels of both this card and 1 other Machine monster you control become their combined current Levels + 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) +end +function s.lvlfilter(c) + return c:IsFaceup() and c:HasLevel() and c:IsRace(RACE_MACHINE) +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvlfilter(chkc) and chkc~=c end + if chk==0 then return c:HasLevel() and Duel.IsExistingTarget(s.lvlfilter,tp,LOCATION_MZONE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvlfilter,tp,LOCATION_MZONE,0,1,1,c) + g:AddCard(c) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,2,tp,g:GetSum(Card.GetLevel)) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then + local lv=c:GetLevel()+tc:GetLevel() + --The Levels of both become their combined current Levels + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + local e2=e1:Clone() + tc:RegisterEffect(e2) + end + --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Machine Xyz Monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e3:SetTargetRange(1,0) + e3:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ)) end) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) +end \ No newline at end of file diff --git a/official/c4215180.lua b/official/c4215180.lua new file mode 100644 index 0000000000..5227d75d06 --- /dev/null +++ b/official/c4215180.lua @@ -0,0 +1,80 @@ +--ロリポー☆ヤミー +--Lollipo☆Yummy +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control a Link-1 monster or a Level 2 Synchro Monster, 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) + --Shuffle 1 card from your opponent's GY into the Deck, or, if this card was Special Summoned by a Synchro Monster's effect, you can banish that card instead + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) +end +s.listed_series={SET_YUMMY} +function s.spconfilter(c) + return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.tgfilter(c,sp_chk) + return c:IsAbleToDeck() or (sp_chk and c:IsAbleToRemove()) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tgfilter(chkc,e:GetLabel()==1) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_GRAVE,1,nil,sp_chk) end + e:SetLabel(sp_chk and 1 or 0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil,sp_chk) + if sp_chk then + Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) + end +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) then return end + local sp_chk=e:GetLabel()==1 + local b1=tc:IsAbleToDeck() + local b2=sp_chk and tc:IsAbleToRemove() + if not (b1 or b2) then return end + local op=nil + if sp_chk then + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + else + op=1 + end + if op==1 then + --Shuffle it into the Deck + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + elseif op==2 then + --Banish it + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c44482554.lua b/official/c44482554.lua new file mode 100644 index 0000000000..5a2da6e237 --- /dev/null +++ b/official/c44482554.lua @@ -0,0 +1,83 @@ +--星辰竜パーン +--Dragontail Pan +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Set 1 "Dragontail" Spell/Trap from your Deck, 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_BE_MATERIAL) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) + e1:SetTarget(s.settg) + e1:SetOperation(s.setop) + c:RegisterEffect(e1) + --Place this card on the bottom of the Deck, and if you do, Special Summon 1 non-Fusion "Dragontail" monster from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGONTAIL} +function s.setfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #sg>0 and Duel.SSet(tp,sg)>0 then + Duel.ShuffleDeck(tp) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=g:Select(tp,1,1,nil) + if #dg==0 then return end + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end +function s.spconfilter(c,e,tp) + return c:IsPreviousTypeOnField(TYPE_FUSION) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) + and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:IsReasonPlayer(1-tp) +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,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DRAGONTAIL) and not c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 + and c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + 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 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c53792930.lua b/official/c53792930.lua new file mode 100644 index 0000000000..45c7aca54d --- /dev/null +++ b/official/c53792930.lua @@ -0,0 +1,97 @@ +--K9-EX強制解除 +--K9 - EX Forced Liberation +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Set this card from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) + --Check if a "K9" monster has battled this turn + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_BATTLED) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_K9} +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local bc0,bc1=Duel.GetBattleMonster(0) + if bc0 and bc0:IsSetCard(SET_K9) then + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + end + if bc1 and bc1:IsSetCard(SET_K9) then + Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) + end +end +function s.tgfilter(c,e,tp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsSetCard(SET_K9) and c:IsType(TYPE_XYZ) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) +end +function s.spfilter(c,e,tp,mc,code) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_K9) and not c:IsCode(code) and c:IsType(TYPE_XYZ) + and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) + if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or #pg>1 or (#pg==1 and not pg:IsContains(tc)) 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,tc,tc:GetCode()):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() + if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end + end +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsSSetable() end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsSSetable() then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/official/c5431722.lua b/official/c5431722.lua new file mode 100644 index 0000000000..8ebbee1c57 --- /dev/null +++ b/official/c5431722.lua @@ -0,0 +1,55 @@ +--星辰の吼炎 +--Dragontail Flame +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Negate the effects of 1 face-up Spell, then you can place 1 "Dragontail" card from your GY or banishment on the bottom of the Deck, then draw 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TODECK+CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_DRAGONTAIL} +s.listd_names={id} +function s.disfilter(c) + return c:IsSpell() and c:IsNegatableSpellTrap() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) +end +function s.tdfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then + tc:NegateEffects(c,RESETS_STANDARD_PHASE_END) + Duel.AdjustInstantly(tc) + if tc:IsDisabled() and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) + and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + Duel.BreakEffect() + if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/official/c54919528.lua b/official/c54919528.lua new file mode 100644 index 0000000000..c28500be20 --- /dev/null +++ b/official/c54919528.lua @@ -0,0 +1,81 @@ +--K9-ØØ号 “Hound” +--K9 - #ØØ "Hound" +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 5 monsters + Xyz.AddProcedure(c,nil,5,2) + --Cannot be destroyed by battle or your opponent's card effects the turn it is Special Summoned + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetCondition(function(e) return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) + e1:SetValue(1) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetValue(aux.indoval) + c:RegisterEffect(e2) + --Register when the opponent activates a monster effect + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetOperation(s.regop) + c:RegisterEffect(e3) + --This card gains 500 ATK when that effect resolves + local e3b=Effect.CreateEffect(c) + e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3b:SetCode(EVENT_CHAIN_SOLVED) + e3b:SetRange(LOCATION_MZONE) + e3b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e3b:SetOperation(s.atkop) + c:RegisterEffect(e3b) + --Banish 1 card on the field + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetCategory(CATEGORY_REMOVE) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1) + e4:SetCost(Cost.Detach(1)) + e4:SetTarget(s.rmvtg) + e4:SetOperation(s.rmvop) + c:RegisterEffect(e4) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + if not (re:IsMonsterEffect() and re:GetHandlerPlayer()==1-tp) then return end + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESET_CHAIN|RESETS_STANDARD&~RESET_TURN_SET,0,1) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + if not (re:IsMonsterEffect() and re:GetHandlerPlayer()==1-tp) then return end + Duel.Hint(HINT_CARD,0,id) + local c=e:GetHandler() + --This card gains 500 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c55031170.lua b/official/c55031170.lua new file mode 100644 index 0000000000..ba81ee07cf --- /dev/null +++ b/official/c55031170.lua @@ -0,0 +1,92 @@ +--K9-66b号 ランタン +--K9 - #66b Lantern +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(s.ntcon) + c:RegisterEffect(e1) + --Special Summon both this card and 1 other Level 5 monster from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2: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 "K9" Spell/Trap from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_K9} +function s.ntcon(e,c,minc) + if c==nil then return true end + local tp=c:GetControler() + return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 +end +function s.spfilter(c,e,tp) + return not c:IsRace(RACE_PYRO) and c:IsLevel(5) and c:IsSetCard(SET_K9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return s.spfilter(chkc,e,tp) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) end + 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) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + local g=Group.FromCards(c,tc) + if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=2 then return end + for sc in g:Iter() do + --They cannot be used as material for the Xyz Summon of a LIGHT monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e1:SetValue(function(e,c) return c and c:IsAttribute(ATTRIBUTE_LIGHT) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_K9) and c:IsSpellTrap() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,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/c613013.lua b/official/c613013.lua new file mode 100644 index 0000000000..53ca1f8d61 --- /dev/null +++ b/official/c613013.lua @@ -0,0 +1,81 @@ +--バイス・シャーク +--Veiss Shark +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Fish "Shark" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --A "Shark Drake" Xyz Monster that has this card as material gains this effect: Negate a Spell/Trap effect, and if you do, destroy that card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSetCard(SET_SHARK_DRAKE) and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end) + e3:SetCost(aux.dxmcostgen(2,2,nil)) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SHARK,SET_SHARK_DRAKE} +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,nil,nil,RACE_FISH) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsRace,1,1,false,nil,nil,RACE_FISH) + Duel.Release(g,REASON_COST) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_FISH) and c:IsSetCard(SET_SHARK) 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.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,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 WATER 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_WATER) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c6153210.lua b/official/c6153210.lua new file mode 100644 index 0000000000..4e5b0852fa --- /dev/null +++ b/official/c6153210.lua @@ -0,0 +1,41 @@ +--計都星辰 +--Ketu Dragontail +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Dragontail" monster from your Deck to your hand, then, if your opponent controls a monster, you can Fusion Summon 1 Dragon or Spellcaster monster from your Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={SET_DRAGONTAIL} +function s.thfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsMonster() 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_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.ShuffleDeck(tp) + if Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil)>0 then + local params={fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)} + 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 +end \ No newline at end of file diff --git a/official/c65853758.lua b/official/c65853758.lua new file mode 100644 index 0000000000..271228684e --- /dev/null +++ b/official/c65853758.lua @@ -0,0 +1,103 @@ +--ヤミー★リデンプション +--Yummy★Redemption +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetHintTiming(TIMING_DAMAGE_STEP) + e0:SetCondition(aux.StatChangeDamageStepCondition) + c:RegisterEffect(e0) + --Monsters your opponent controls lose 200 ATK for each LIGHT Beast monster you control and in your GY + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --Draw 1 card, then place 1 card from your hand on the bottom of the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) + 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,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(s.drwcon) + e2:SetTarget(s.drwtg) + e2:SetOperation(s.drwop) + c:RegisterEffect(e2) + --Switch control of 1 "Yummy" monster you control and 1 monster your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_CONTROL) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCountLimit(1,id) + e3:SetCost(aux.SelfBanishCost) + e3:SetTarget(s.ctrltg) + e3:SetOperation(s.ctrlop) + c:RegisterEffect(e3) +end +s.listed_series={SET_YUMMY} +function s.atkvalfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsFaceup() +end +function s.atkval(e,c) + return -200*Duel.GetMatchingGroupCount(s.atkvalfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,nil) +end +function s.drwconfilter(c,tp) + return c:IsSynchroSummoned() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsSummonPlayer(tp) and c:IsFaceup() +end +function s.drwcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.drwconfilter,1,nil,tp) +end +function s.drwtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) +end +function s.drwop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Draw(p,d,REASON_EFFECT)==0 then return end + Duel.ShuffleHand(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end +end +function s.selffilter(c,tp) + return c:IsSetCard(SET_YUMMY) and c:IsAbleToChangeControler() and c:IsFaceup() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 +end +function s.oppfilter(c,tp) + return c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 +end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(s.selffilter,tp,LOCATION_MZONE,0,1,nil,tp) + and Duel.IsExistingTarget(s.oppfilter,tp,0,LOCATION_MZONE,1,nil,1-tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g1=Duel.SelectTarget(tp,s.selffilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g2=Duel.SelectTarget(tp,s.oppfilter,tp,0,LOCATION_MZONE,1,1,nil,1-tp) + g1:Merge(g2) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,tp,0) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==2 then + Duel.SwapControl(tg:GetFirst(),tg:GetNext()) + end +end \ No newline at end of file diff --git a/official/c66975205.lua b/official/c66975205.lua new file mode 100644 index 0000000000..7bbfc47802 --- /dev/null +++ b/official/c66975205.lua @@ -0,0 +1,91 @@ +--ヤミーズメント☆ミニヨン +--Yummysment☆Minion +--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) + --"Yummy" monsters you control gain 500 ATK for each LIGHT Beast monster on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_FZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_YUMMY)) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --Special Summon 1 Level 1 "Yummy" monster from your GY + 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_FZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsLink,1),tp,LOCATION_MZONE,0,1,nil) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place 2 "Yummy" monsters from your GY and/or banishment and this card on the bottom of the Deck in any order + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + c:RegisterEffect(e3) +end +s.listed_series={SET_YUMMY} +function s.atkfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsFaceup() +end +function s.atkval(e,c) + return 500*Duel.GetMatchingGroupCount(s.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_YUMMY) and c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tdfilter(c) + return c:IsSetCard(SET_YUMMY) and c:IsMonster() and (c:IsAbleToDeck() or c:IsAbleToExtra()) and c:IsFaceup() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g+c,3,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + tg:AddCard(c) + if Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then + local ct=Duel.GetOperatedGroup():Filter(Card.IsControler,nil,tp):FilterCount(Card.IsLocation,nil,LOCATION_DECK) + if ct>1 then + Duel.SortDeckbottom(tp,tp,ct) + end + end +end \ No newline at end of file diff --git a/official/c67098897.lua b/official/c67098897.lua new file mode 100644 index 0000000000..6b0d9e32d3 --- /dev/null +++ b/official/c67098897.lua @@ -0,0 +1,77 @@ +--クッキィ★ヤミーウェイ +--Cooky★Yummy Way +--scripted by Zedja +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1 non-Tuner monster + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(aux.NOT(Card.IsLinkMonster)),1,1,aux.FilterBoolFunction(Card.IsLink,1)) + --For this card's Synchro Summon, you can treat 1 Link-1 monster you control as a Level 1 Tuner + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) + e0:SetCode(EFFECT_SYNCHRO_LEVEL) + e0:SetRange(LOCATION_EXTRA) + e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e0:SetTarget(function(e,c) return c:IsLink(1) end) + e0:SetValue(function(e,sc) return sc:IsSetCard(SET_YUMMY) and 1 or -1 end) + c:RegisterEffect(e0) + --Change up to 2 face-up monsters to face-down Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + c:RegisterEffect(e1) + --Special Summon up to 2 "Yummy" monsters from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(aux.SelfToExtraCost) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_YUMMY} +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSITION) + local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEDOWN_DEFENSE) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_YUMMY) 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.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + ft=math.min(ft,2) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c68810435.lua b/official/c68810435.lua new file mode 100644 index 0000000000..80392335c6 --- /dev/null +++ b/official/c68810435.lua @@ -0,0 +1,77 @@ +--クッキィ☆ヤミー +--Cooky☆Yummy +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control a Link-1 monster or a Level 2 Synchro Monster, 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) + --Make 1 opponent's face-up monster lose 1000 ATK, or, if this card was Special Summoned by a Synchro Monster's effect, you can destroy that monster instead + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) +end +s.listed_series={SET_YUMMY} +function s.spconfilter(c) + return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end + e:SetLabel(sp_chk and 1 or 0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sp_chk then + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) + end +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) then return end + local sp_chk=e:GetLabel()==1 + local b1=tc:IsFaceup() + local b2=sp_chk + if not (b1 or b2) then return end + local op=nil + if sp_chk then + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + else + op=1 + end + if op==1 then + --It loses 1000 ATK + tc:UpdateAttack(-1000,nil,e:GetHandler()) + elseif op==2 then + --Destroy it + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c69932023.lua b/official/c69932023.lua new file mode 100644 index 0000000000..4e9d3927a9 --- /dev/null +++ b/official/c69932023.lua @@ -0,0 +1,52 @@ +--星辰の裂角 +--Dragontail Horn +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Return 1 Attack Position monster to the hand/Extra Deck, then you can place 1 "Dragontail" card from your GY or banishment on the bottom of the Deck, then draw 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_TODECK+CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_DRAGONTAIL} +s.listed_names={id} +function s.thexfilter(c) + return c:IsAttackPos() and (c:IsAbleToHand() or c:IsAbleToExtra()) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.thexfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thexfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local tc=Duel.SelectTarget(tp,s.thexfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + local cat=tc:IsType(TYPE_EXTRA) and CATEGORY_TOEXTRA or CATEGORY_TOHAND + Duel.SetOperationInfo(0,cat,tc,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) +end +function s.tdfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) + and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + Duel.BreakEffect() + if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c70871153.lua b/official/c70871153.lua new file mode 100644 index 0000000000..30a0cd5fdf --- /dev/null +++ b/official/c70871153.lua @@ -0,0 +1,74 @@ +--星辰竜ウルグラ +--Dragontail Urgula +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Set 1 "Dragontail" Spell/Trap from your Deck, then you can destroy 1 Spell/Trap 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_BE_MATERIAL) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) + e1:SetTarget(s.settg) + e1:SetOperation(s.setop) + c:RegisterEffect(e1) + --Place this card on the bottom of the Deck, and if you do, add that monster to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGONTAIL} +function s.setfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_SZONE) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #sg>0 and Duel.SSet(tp,sg)>0 then + Duel.ShuffleDeck(tp) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=g:Select(tp,1,1,nil) + if #dg==0 then return end + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end +function s.thfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsSetCard(SET_DRAGONTAIL) and c:IsAbleToHand() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +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_DECKBOTTOM,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c73129314.lua b/official/c73129314.lua new file mode 100644 index 0000000000..2411efab47 --- /dev/null +++ b/official/c73129314.lua @@ -0,0 +1,88 @@ +--魂宿りし暗黒騎士ガイア +--Soul of Gaia the Fierce Knight +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If a Level 5 or higher Monster Card is on the field, you can Normal Summon this card without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCondition(s.nscon) + c:RegisterEffect(e1) + --If your opponent Normal or Special Summons a monster(s) in Attack Position, increase its Level by 7 + local e2=Effect.CreateEffect(c) + e2:SetCategory(CATEGORY_LVCHANGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) + --Negate the activation of an opponent's monster effect, and if you do, destroy that card + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e4:SetCode(EVENT_CHAINING) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,id) + e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e4:SetCost(s.negcost) + e4:SetTarget(s.negtg) + e4:SetOperation(s.negop) + c:RegisterEffect(e4) +end +s.listed_series={SET_MILLENNIUM} +function s.lv5plusmonfilter(c) + return c:IsLevelAbove(5) and c:IsMonsterCard() and c:IsFaceup() +end +function s.nscon(e,c) + if c==nil then return true end + return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.lv5plusmonfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) +end +function s.lvfilter(c,tp) + return c:IsSummonPlayer(1-tp) and c:IsAttackPos() and c:IsFaceup() and c:HasLevel() +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local g=eg:Filter(s.lvfilter,nil,tp) + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + --Increase its Level by 7 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(7) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(s.lv5plusmonfilter,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(s.lv5plusmonfilter,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,1,c) + Duel.SendtoGrave(g,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c7375867.lua b/official/c7375867.lua new file mode 100644 index 0000000000..41fba5507b --- /dev/null +++ b/official/c7375867.lua @@ -0,0 +1,68 @@ +--星辰竜ムルル +--Dragontail Mulr +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 "Dragontail" Fusion Monster from your Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(Fusion.SummonEffTG(aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL))) + e1:SetOperation(s.fusop) + c:RegisterEffect(e1) + --Set 1 "Dragontail" Spell/Trap from your Deck + 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_BE_MATERIAL) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGONTAIL} +function s.fusop(e,tp,eg,ep,ev,re,r,rp) + Fusion.SummonEffOP(aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL))(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(c) return not c:IsOriginalType(TYPE_FUSION) end) +end +function s.setfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE) +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 or Duel.SSet(tp,g)==0 then return end + local ng=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,nil) + if #ng==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local sc=ng:Select(tp,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + sc:NegateEffects(e:GetHandler()) + end +end \ No newline at end of file diff --git a/official/c74941992.lua b/official/c74941992.lua new file mode 100644 index 0000000000..2c584ce1e1 --- /dev/null +++ b/official/c74941992.lua @@ -0,0 +1,56 @@ +--月の魔術師 +--Moon Magician +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If your opponent controls an Xyz Monster, 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 Level 4 LIGHT monster from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) +end +s.listed_names={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(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,0,LOCATION_MZONE,1,nil) +end +function s.spfilter(c,e,tp) + return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c75003700.lua b/official/c75003700.lua new file mode 100644 index 0000000000..21c4329c50 --- /dev/null +++ b/official/c75003700.lua @@ -0,0 +1,61 @@ +--星辰槍手ルキアス +--Dragontail Lucias +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Dragontail" monster from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Set 1 "Dragontail" Spell/Trap from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DRAGONTAIL} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) 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.setfilter(c) + return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/official/c79755671.lua b/official/c79755671.lua new file mode 100644 index 0000000000..55ded37dde --- /dev/null +++ b/official/c79755671.lua @@ -0,0 +1,108 @@ +--星辰法宮グラメル +--Dragontail Gramel +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Dragontail" monster + 1 monster in the hand + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGONTAIL),aux.FilterBoolFunctionEx(Card.IsLocation,LOCATION_HAND)) + --Destroy 1 card your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.descon) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Special Summon this card from the GY, but banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Keep track of monsters being sent to the GY at the same time + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetRange(LOCATION_GRAVE) + e3:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) + e3:SetOperation(s.regop) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EVENT_CHAINING) + e4:SetOperation(function(e) e:GetHandler():ResetFlagEffect(id+1) end) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetCode(EVENT_CHAIN_SOLVED) + c:RegisterEffect(e5) + local e6=e4:Clone() + e6:SetCode(EVENT_BREAK_EFFECT) + c:RegisterEffect(e6) +end +s.listed_series={SET_DRAGONTAIL} +function s.descon(e,tp,eg,ep,ev,re,r,rp) + if rp==1-tp then return false end + local trig_p,setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) + if trig_p==1-tp then return false end + for _,archetype in ipairs(setcodes) do + if ((SET_DRAGONTAIL&0xfff)==(archetype&0xfff) and (archetype&SET_DRAGONTAIL)==SET_DRAGONTAIL) then + return true + end + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ct=eg:FilterCount(Card.IsMonster,nil) + if ct==0 or eg:IsContains(c) then return end + if ct>=2 or c:HasFlagEffect(id+1) then + Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,r,rp,ep,ev) + end + local eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT) + if eff then + c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/official/c80181649.lua b/official/c80181649.lua new file mode 100644 index 0000000000..c9d0c5d788 --- /dev/null +++ b/official/c80181649.lua @@ -0,0 +1,72 @@ +--"Case of K9" +--"Case of K9" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can add 1 "K9" monster from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --"K9" monsters you control gain 900 ATK the turn your opponent activated a monster effect in the hand or GY + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetCondition(function(e) return Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 end) + e2:SetTarget(function(e,c) return c:IsSetCard(SET_K9) end) + e2:SetValue(900) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) + --Set 1 "K9" Quick-Play Spell from your Deck or 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_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.setcon) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_K9} +function s.chainfilter(re,tp,cid) + return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) +end +function s.thfilter(c) + return c:IsSetCard(SET_K9) and c:IsMonster() and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_STZONE) +end +function s.setfilter(c) + return c:IsSetCard(SET_K9) and c:IsQuickPlaySpell() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/official/c90303227.lua b/official/c90303227.lua new file mode 100644 index 0000000000..9b37ac94b6 --- /dev/null +++ b/official/c90303227.lua @@ -0,0 +1,57 @@ +--K9-EX “Werewolf” +--K9 - EX "Werewolf" +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 9 monsters + Xyz.AddProcedure(c,nil,9,2) + --Can attack a number of times each Battle Phase, up to the number of materials attached to it + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_EXTRA_ATTACK) + e1:SetValue(function(e,c) return math.max(0,e:GetHandler():GetOverlayCount()-1) end) + c:RegisterEffect(e1) + --Activate this effect depending on whose turn it is + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(Cost.Detach(1)) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local loc=Duel.IsTurnPlayer(tp) and LOCATION_ONFIELD|LOCATION_GRAVE or LOCATION_HAND + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,loc,1,nil) end + e:SetLabel(loc) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,loc) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local loc=e:GetLabel() + local g=Duel.GetFieldGroup(tp,0,loc) + if #g==0 then return end + if loc==LOCATION_HAND then + Duel.ConfirmCards(tp,g) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local tc=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil) + if tc then + aux.RemoveUntil(tc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(rg,e,tp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end) + end + Duel.ShuffleHand(1-tp) + else + local rg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_REMOVE) + if #rg==0 then return end + Duel.HintSelection(rg) + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + end +end +function s.rescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_ONFIELD)<=1 + and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 +end \ No newline at end of file diff --git a/official/c91025875.lua b/official/c91025875.lua new file mode 100644 index 0000000000..513ca7dc2a --- /dev/null +++ b/official/c91025875.lua @@ -0,0 +1,78 @@ +--K9-ØØ号 ルプス +--K9 - #ØØ Lupus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand or GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) + --Immediately after this effect resolves, Xyz Summon using this card you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.xyztg) + e2:SetOperation(s.xyzop) + c:RegisterEffect(e2) + --An Xyz Monster that has this card as material gains this effect: ● Your opponent cannot target this card with card effects + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_XMATERIAL) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(aux.tgoval) + c:RegisterEffect(e3) +end +function s.chainfilter(re,tp,cid) + return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --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.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end + local g=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,c) + if #g>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + Duel.XyzSummon(tp,sg:GetFirst(),c) + end +end \ No newline at end of file diff --git a/official/c92248362.lua b/official/c92248362.lua new file mode 100644 index 0000000000..03285ddcd2 --- /dev/null +++ b/official/c92248362.lua @@ -0,0 +1,79 @@ +--K9-17号 イヅナ +--K9 - #17 Izuna +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(s.ntcon) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_HAND) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) + --Send 1 "K9" card from your Deck to the GY, except "K9 - #17 Izuna" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.tgtg) + e3:SetOperation(s.tgop) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e4) +end +s.listed_series={SET_K9} +s.listed_names={id} +function s.chainfilter(re,tp,cid) + return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) +end +function s.ntcon(e,c,minc) + if c==nil then return true end + local tp=c:GetControler() + return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 +end +function s.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.tgfilter(c) + return c:IsSetCard(SET_K9) and c:IsAbleToGrave() and not c:IsCode(id) +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c93192592.lua b/official/c93192592.lua new file mode 100644 index 0000000000..d9c1ed4c2c --- /dev/null +++ b/official/c93192592.lua @@ -0,0 +1,85 @@ +--ロリポー★ヤミーウェイ +--Lollipo★Yummy Way +--scripted by Zedja +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1 non-Tuner monster + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(aux.NOT(Card.IsLinkMonster)),1,1,aux.FilterBoolFunction(Card.IsLink,1)) + --For this card's Synchro Summon, you can treat 1 Link-1 monster you control as a Level 1 Tuner + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) + e0:SetCode(EFFECT_SYNCHRO_LEVEL) + e0:SetRange(LOCATION_EXTRA) + e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e0:SetTarget(function(e,c) return c:IsLink(1) end) + e0:SetValue(function(e,sc) return sc:IsSetCard(SET_YUMMY) and 1 or -1 end) + c:RegisterEffect(e0) + --Special Summon 2 "Yummy" monsters from GY but negate their effects + 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.gynegsptg) + e1:SetOperation(s.gynegspop) + c:RegisterEffect(e1) + --Special Summon up to 2 "Yummy" monsters from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(aux.SelfToExtraCost) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_YUMMY} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_YUMMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gynegsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE) +end +function s.gynegspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) + if #g==2 then + local c=e:GetHandler() + for sc in g:Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(c) + end + end + Duel.SpecialSummonComplete() + end +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_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 ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + ft=math.min(ft,2) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c93360904.lua b/official/c93360904.lua new file mode 100644 index 0000000000..a427e677c0 --- /dev/null +++ b/official/c93360904.lua @@ -0,0 +1,115 @@ +--ヤミーズメント★アクロッキー +--Yummysment★Acrockie +--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 card your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.descon) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Special Summon 1 "Yummy" monster from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_LEAVE_FIELD) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place 2 "Yummy" monsters from your GY and/or banishment and this card on the bottom of the Deck in any order + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + c:RegisterEffect(e3) +end +s.listed_series={SET_YUMMY} +function s.desconfilter(c,tp) + return c:IsSynchroSummoned() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsSummonPlayer(tp) and c:IsFaceup() +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.desconfilter,1,nil,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end +function s.spconfilter(c,tp,rp) + return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) + and rp==1-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,rp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_YUMMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tdfilter(c) + return c:IsSetCard(SET_YUMMY) and c:IsMonster() and (c:IsAbleToDeck() or c:IsAbleToExtra()) and c:IsFaceup() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g+c,3,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + tg:AddCard(c) + if Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then + local ct=Duel.GetOperatedGroup():Filter(Card.IsControler,nil,tp):FilterCount(Card.IsLocation,nil,LOCATION_DECK) + if ct>1 then + Duel.SortDeckbottom(tp,tp,ct) + end + end +end \ No newline at end of file diff --git a/pre-release/c100295101.lua b/pre-release/c100295101.lua new file mode 100644 index 0000000000..9e08da14cd --- /dev/null +++ b/pre-release/c100295101.lua @@ -0,0 +1,87 @@ +--戦刀匠サイバ +--Saiba the Fighting Swordsmith +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 Level 6 or lower Warrior monster from your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a Warrior monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) + e2:SetTarget(s.synchtg) + e2:SetOperation(s.synchop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(6) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(c) + end + Duel.SpecialSummonComplete() + if c:IsRelateToEffect(e) then + --This card cannot be used as Synchro Material for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3310) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end +end +function s.synchrocheck(tp,sg,sc) + return sg:IsExists(Card.IsRace,1,nil,RACE_WARRIOR) +end +function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + Synchro.CheckAdditional=s.synchrocheck + local res=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) + Synchro.CheckAdditional=nil + return res + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.synchop(e,tp,eg,ep,ev,re,r,rp) + Synchro.CheckAdditional=s.synchrocheck + local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil) + if #g>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=g:Select(tp,1,1,nil):GetFirst() + Duel.SynchroSummon(tp,sc) + else + Synchro.CheckAdditional=nil + end +end \ No newline at end of file diff --git a/pre-release/c100296202.lua b/pre-release/c100296202.lua new file mode 100644 index 0000000000..50345d85e5 --- /dev/null +++ b/pre-release/c100296202.lua @@ -0,0 +1,95 @@ +--召喚獣マギストス・セリオン +--Invoked Magistus Omega +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Aleister the Invoker" + 1 Fusion, Synchro, Xyz, or Link Monster + Fusion.AddProcMix(c,true,true,86120751,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EXTRA)) + --Banish 1 Fusion, Synchro, Xyz, or Link Monster from your GY and 1 monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) + c:RegisterEffect(e1) + --Special Summon 1 Level 4 Spellcaster monster from your Deck, then you can equip this card to it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={86120751} --"Aleister the Invoker" +s.miracle_synchro_fusion=true +function s.rmfilter(c,e) + return c:IsCanBeEffectTarget(e) and c:IsAbleToRemove() and (c:IsType(TYPE_EXTRA) or c:IsLocation(LOCATION_MZONE)) +end +function s.rmrescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==1 +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,LOCATION_MZONE,nil,e) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rmrescon,0) end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rmrescon,1,tp,HINTMSG_REMOVE) + Duel.SetTargetCard(sg) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,2,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(Card.IsMonster,nil) + if #tg>0 then + Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsFusionSummoned() and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) +end +function s.spfilter(c,e,tp) + return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 + and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + if Duel.Equip(tp,c,sc) then + --Equip limit registration + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(function(e,c) return c==sc end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e0) + --The equipped monster gains 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/pre-release/c101301001.lua b/pre-release/c101301001.lua new file mode 100644 index 0000000000..d21ea08266 --- /dev/null +++ b/pre-release/c101301001.lua @@ -0,0 +1,108 @@ +--ズバババナイト +--Zubababa Knight +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Add 1 "Gagaga" monster from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.gathcon) + e3:SetTarget(s.gathtg) + e3:SetOperation(s.gathop) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EVENT_REMOVE) + c:RegisterEffect(e4) +end +s.listed_series={SET_ZUBABA,SET_GAGAGA} +s.listed_names={id} +function s.zbthfilter(c) + return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) +end +function s.desfilter(c) + return c:IsLevelBelow(4) and c:IsDefensePos() and c:IsFaceup() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) + local b1=Duel.IsExistingMatchingCard(s.zbthfilter,tp,LOCATION_DECK,0,1,nil) + local b2=#g>0 + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_DESTROY) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Add 1 "Zubaba" monster from your Deck to your hand, except "Zubababa Knight", and if you do, this card's Level becomes that added monster's + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.zbthfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sc) + local lv=sc:GetLevel() + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsLevel(lv) then + --This card's Level becomes the added monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + end + elseif op==2 then + --Destroy 1 Level 4 or lower Defense Position monster your opponent controls + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.gathcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.gathfilter(c) + return c:IsSetCard(SET_GAGAGA) and c:IsMonster() and c:IsAbleToHand() +end +function s.gathtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.gathfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.gathop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.gathfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101301002.lua b/pre-release/c101301002.lua new file mode 100644 index 0000000000..9543496d60 --- /dev/null +++ b/pre-release/c101301002.lua @@ -0,0 +1,103 @@ +--ガガガガンバラナイト +--Gagaga Ganbara Knight +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Gogogo" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_REMOVE) + c:RegisterEffect(e3) +end +s.listed_series={SET_GAGAGA,SET_GOGOGO} +function s.spcostfilter(c) + return c:IsSetCard(SET_GAGAGA) and not c:IsPublic() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleExtra(tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.gaspfilter(c,e,tp) + return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.gaspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + local b2=Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + if op==1 then + --Special Summon 1 "Gagaga" monster from your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.gaspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --Change the battle position of 1 monster on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end + end + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.thfilter(c) + return c:IsSetCard(SET_GOGOGO) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101301003.lua b/pre-release/c101301003.lua new file mode 100644 index 0000000000..f596d78500 --- /dev/null +++ b/pre-release/c101301003.lua @@ -0,0 +1,84 @@ +--ゴゴゴゴブリンドバーグ +--Gogogo Goblindbergh +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 non-Warrior "Gogogo" monster from your hand, Deck or GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Dododo" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_REMOVE) + c:RegisterEffect(e3) +end +s.listed_series={SET_GOGOGO,SET_DODODO} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GOGOGO) and not c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + local c=e:GetHandler() + if c:IsAttackPos() then + Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) and c:IsAttackPos() then + Duel.BreakEffect() + Duel.ChangePosition(c,POS_FACEUP_DEFENSE) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.thfilter(c) + return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101301004.lua b/pre-release/c101301004.lua new file mode 100644 index 0000000000..7ad297ef4a --- /dev/null +++ b/pre-release/c101301004.lua @@ -0,0 +1,95 @@ +--ドドドドウォリアー +--Dodododo Warrior +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Zubaba" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_REMOVE) + c:RegisterEffect(e3) +end +s.listed_series={SET_DODODO,SET_ZUBABA} +function s.spcostfilter(c) + return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToGraveAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Its Level becomes 4 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(4) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + --Its ATK becomes 1800 + local e2=e1:Clone() + e2:SetCode(EFFECT_SET_ATTACK) + e2:SetValue(1800) + c:RegisterEffect(e2) + end + --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.thfilter(c) + return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101301013.lua b/pre-release/c101301013.lua new file mode 100644 index 0000000000..5cdb8f8750 --- /dev/null +++ b/pre-release/c101301013.lua @@ -0,0 +1,90 @@ +--静寂のサイコガール+ +--Serene Psychic Girl +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish 1 card from your hand, and if you do, Special Summon 1 Level 4 or lower Psychic monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.rmvsptg) + e1:SetOperation(s.rmvspop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Increase the Level of face-up monster(s) by 1 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.rmvsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.rmvspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) + if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 and rg:GetFirst():IsLocation(LOCATION_REMOVED) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:HasLevel() end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil) + if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) + if #tg==0 then return end + local c=e:GetHandler() + for tc in tg:Iter() do + --Increase their Levels by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101301014.lua b/pre-release/c101301014.lua new file mode 100644 index 0000000000..b2ea8b343a --- /dev/null +++ b/pre-release/c101301014.lua @@ -0,0 +1,64 @@ +--寡黙なるサイコミニスター +--Hushed Psychic Minister +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you control a Psychic monster other than "Hushed Psychic Minister", you can Special Summon this card (from your hand) in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetTargetRange(POS_FACEUP_DEFENSE,0) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Banish 1 face-up monster on the field until the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.rmvcost) + e2:SetTarget(s.rmvtg) + e2:SetOperation(s.rmvop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.spconfilter(c) + return c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.rmvcostfilter(c) + return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() +end +function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,1,c) + g:AddCard(c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + aux.RemoveUntil(tc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) + end +end \ No newline at end of file diff --git a/pre-release/c101301015.lua b/pre-release/c101301015.lua new file mode 100644 index 0000000000..82119965d4 --- /dev/null +++ b/pre-release/c101301015.lua @@ -0,0 +1,70 @@ +--メンタルプロシージャー +--Mind Procedure +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card you control would be used as Synchro Material for a Psychic monster, you can treat it as a non-Tuner + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_NONTUNER) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,sc) return sc:IsRace(RACE_PSYCHIC) end) + c:RegisterEffect(e1) + --Add 1 "Teleport" Normal or Quick-Play Spell from your Deck or GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.PayLP(2000)) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) + c:RegisterEffect(e3) + --Special Summn this card + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_REMOVE) + e4:SetCountLimit(1,id) + e4:SetCost(Cost.PayLP(1000)) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +s.listed_series={SET_TELEPORT} +function s.thfilter(c) + return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101301016.lua b/pre-release/c101301016.lua new file mode 100644 index 0000000000..6c168ec901 --- /dev/null +++ b/pre-release/c101301016.lua @@ -0,0 +1,75 @@ +--プロトタイプサイコガンナー +--Prototype Psychic Blaster +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Psychic monster from your hand or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Special Summon this card from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(Cost.PayLP(1000),s.selfspcost)) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_REMOVED) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.spcostfilter(c) + return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c101301017.lua b/pre-release/c101301017.lua new file mode 100644 index 0000000000..308ff63ae1 --- /dev/null +++ b/pre-release/c101301017.lua @@ -0,0 +1,101 @@ +--冥帝王エイドス +--Eidos the Underworld Monarch +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Monarch" Spell/Trap or 1 monster with 2800 ATK/1000 DEF from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Change the Attribute of 1 monster on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.attrtg) + e3:SetOperation(s.attrop) + c:RegisterEffect(e3) + --Add this card to your hand or Special Summon it + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e4:SetCode(EVENT_SUMMON_SUCCESS) + e4:SetRange(LOCATION_GRAVE) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(s.thspcon) + e4:SetTarget(s.thsptg) + e4:SetOperation(s.thspop) + c:RegisterEffect(e4) +end +s.listed_series={SET_MONARCH} +function s.thfilter(c) + return ((c:IsSetCard(SET_MONARCH) and c:IsSpellTrap()) or (c:IsAttack(2800) and c:IsDefense(1000))) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + local attr=Duel.AnnounceAnotherAttribute(g,tp) + e:SetLabel(attr) +end +function s.attrop(e,tp,eg,ep,ev,re,r,rp) + local attr=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAttributeExcept,attr),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --It becomes the declared Attribute + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e1:SetValue(attr) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +end +function s.thspcon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsSummonPlayer(tp) and ec:IsTributeSummoned() and ec:IsAttackAbove(2400) and ec:IsDefense(1000) and ec:IsFaceup() +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + aux.ToHandOrElse(c,tp, + function(sc) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function(sc) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,3) + ) +end \ No newline at end of file diff --git a/pre-release/c101301018.lua b/pre-release/c101301018.lua new file mode 100644 index 0000000000..ce0bbc65de --- /dev/null +++ b/pre-release/c101301018.lua @@ -0,0 +1,98 @@ +--源帝従騎テセラ +--Tessera the Prime Squire +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Tribute Summon 1 monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tribsumtg) + e2:SetOperation(s.tribsumop) + c:RegisterEffect(e2) + --Special Summon 1 monster with 800 ATK/1000 DEF from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MONARCH} +function s.selfspcostfilter(c) + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsPublic() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_HAND,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,nil,true,nil,1) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) +end +function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,1,nil,true,nil,1):GetFirst() + if tc then + Duel.SummonOrSet(tp,tc,true,nil,1) + end +end +function s.spfilter(c,e,tp) + return c:IsAttack(800) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + --You cannot Special Summon from the Extra Deck for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101301024.lua b/pre-release/c101301024.lua new file mode 100644 index 0000000000..0f6d45c454 --- /dev/null +++ b/pre-release/c101301024.lua @@ -0,0 +1,90 @@ +--超量妖精ゼータン +--Super Quantal Fairy Zetan +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card, then you can make its Level become the Level of 1 "Super Quant" monster you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.hspcon) + e1:SetTarget(s.hsptg) + e1:SetOperation(s.hspop) + c:RegisterEffect(e1) + --Special Summon 1 "Super Quant" monster from your Deck, except "Super Quantal Fairy Zetan" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(Cost.SelfTribute,s.dspcost)) + e2:SetTarget(s.dsptg) + e2:SetOperation(s.dspop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_SUPER_QUANT} +function s.hspconfilter(c) + return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) +end +function s.hspcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.hspconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) +end +function s.lvfilter(c,lv) + return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and c:HasLevel() and not c:IsLevel(lv) +end +function s.hspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end + local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,c,c:GetLevel()) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local sc=g:Select(tp,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + Duel.BreakEffect() + --This card's Level becomes that monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(sc:GetLevel()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end +function s.dspcostfilter(c,e,tp) + return c:IsSetCard(SET_SUPER_QUANT) and not c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() + and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,c,e,tp) +end +function s.dspfilter(c,e,tp) + return c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.dspcostfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.dspcostfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + Duel.SendtoGrave(g,REASON_COST) +end +function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.dspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.dspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101301025.lua b/pre-release/c101301025.lua new file mode 100644 index 0000000000..84608132c6 --- /dev/null +++ b/pre-release/c101301025.lua @@ -0,0 +1,107 @@ +--超量士ブラックレイヤー +--Super Quantum Black Layer +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Discard 1 other card, and if you do, Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsMonsterEffect() end) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Special Summon 1 "Super Quantal Mech Beast" Xyz Monster from your Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.xyzsptg) + e2:SetOperation(s.xyzspop) + c:RegisterEffect(e2) + --Add 1 "Super Quant" Spell from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SUPER_QUANT,SET_SUPER_QUANTAL_MECH_BEAST} +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_EFFECT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false)end + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,exc)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.xyzspfilter(c,e,tp,mc,chk_att) + return c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and mc:IsCanBeXyzMaterial(c,tp) + and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) + and (not chk_att or Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c)) +end +function s.attachfilter(c,tp,xc) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsMonster() and c:IsCanBeXyzMaterial(xc,tp,REASON_EFFECT) +end +function s.xyzsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) + and Duel.IsExistingMatchingCard(s.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,true) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.xyzspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xc=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,false):GetFirst() + if not xc then return end + xc:SetMaterial(c) + Duel.Overlay(xc,c) + if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end + xc:CompleteProcedure() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) + local ac=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,xc):GetFirst() + if ac then + Duel.Overlay(xc,ac) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101301034.lua b/pre-release/c101301034.lua new file mode 100644 index 0000000000..c1afbda78e --- /dev/null +++ b/pre-release/c101301034.lua @@ -0,0 +1,74 @@ +--アブソリュートサイキッカー +--Absolute Axon Kicker +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Psychic Synchro Monster + 1 Synchro Monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO)) + c:AddMustFirstBeFusionSummoned() + --Banish all face-up cards your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) + e1:SetCost(Cost.PayLP(2000)) + e1:SetTarget(s.rmvtg) + e1:SetOperation(s.rmvop) + c:RegisterEffect(e1) + --Cannot be destroyed by card effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetRange(LOCATION_MZONE) + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetValue(1) + c:RegisterEffect(e2) + --Special Summon 1 Level 10 Psychic Fusion Monster from your Extra Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,id) + e3:SetCondition(aux.exccon) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.miracle_synchro_fusion=true +function s.matfilter(c,fc,sumtype,tp) + return c:IsType(TYPE_SYNCHRO,fc,sumtype,tp) and c:IsRace(RACE_PSYCHIC,fc,sumtype,tp) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsLevel(10) and c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc then + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end + end +end \ No newline at end of file diff --git a/pre-release/c101301038.lua b/pre-release/c101301038.lua new file mode 100644 index 0000000000..0941bcf39d --- /dev/null +++ b/pre-release/c101301038.lua @@ -0,0 +1,67 @@ +--沈黙のサイコマジシャン +--Silent Psychic Magician +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 Level 4 or lower Psychic monster from your GY or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card you control would be used as Synchro Material, you can treat it as a non-Tuner + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_NONTUNER) + e2:SetRange(LOCATION_MZONE) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + --Increase its Level by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e2:SetTargetRange(1,0) + e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) +end \ No newline at end of file diff --git a/pre-release/c101301039.lua b/pre-release/c101301039.lua new file mode 100644 index 0000000000..9f3fc62cfa --- /dev/null +++ b/pre-release/c101301039.lua @@ -0,0 +1,83 @@ +--メンタルクロス・デーモン +--Thought Cross Archfiend +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 of your banished Level 7 or lower Psychic monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Gain LP equal to the original ATK of 1 Tributed monster, and if you do, this card gains that much ATK until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end) + e2:SetCost(s.lpatkost) + e2:SetTarget(s.lpatktg) + e2:SetOperation(s.lpatkop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.atkfilter(c) + return c:GetTextAttack()>0 +end +function s.lpatkost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.atkfilter,1,false,nil,c) end + local g=Duel.SelectReleaseGroupCost(tp,s.atkfilter,1,1,false,nil,c) + Duel.Release(g,REASON_COST) + e:SetLabel(g:GetFirst():GetTextAttack()) +end +function s.lpatktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,e:GetLabel()) +end +function s.lpatkop(e,tp,eg,ep,ev,re,r,rp) + local lpgain=e:GetLabel() + local atk=Duel.Recover(tp,lpgain,REASON_EFFECT) + local c=e:GetHandler() + if atk>0 and c:IsFaceup() and c:IsRelateToEffect(e) then + --This card gains that much ATK until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(atk) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101301040.lua b/pre-release/c101301040.lua new file mode 100644 index 0000000000..87cc6373df --- /dev/null +++ b/pre-release/c101301040.lua @@ -0,0 +1,80 @@ +--サイコガンナーMk-Ⅱ +--Psychic Blaster Mk-II +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner Psychic monsters + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) + --Special Summon 1 banished monster to your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Banish 1 other monster on the field then gain LP equal to its original ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_RECOVER) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetCost(s.rmvcost) + e2:SetTarget(s.rmvtg) + e2:SetOperation(s.rmvop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.costfilter(c) + return c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,tc:GetBaseAttack()) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) then + local atk=tc:GetBaseAttack() + if atk>0 then + Duel.BreakEffect() + Duel.Recover(tp,atk,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101301042.lua b/pre-release/c101301042.lua new file mode 100644 index 0000000000..3bad0231da --- /dev/null +++ b/pre-release/c101301042.lua @@ -0,0 +1,85 @@ +--FNo.0 未来皇ホープ・ゼアル +--Number F0: Utopic Future Zexal +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Xyz Monsters with the same Rank + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_XYZ),nil,2,nil,nil,nil,nil,false,s.xyzcheck) + --Gains ATK/DEF equal to the total Ranks of all Xyz Monsters you control and in your opponent's GY x 500 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_GRAVE,nil):GetSum(Card.GetRank)*500 end) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2) + --Your opponent's monsters cannot target monsters for attacks, except this one + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(0,LOCATION_MZONE) + e3:SetValue(function(e,c) return c~=e:GetHandler() end) + c:RegisterEffect(e3) + --Your opponent cannot target target other cards on the field with card effects + local e4=e3:Clone() + e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) + e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) + e4:SetTarget(function(e,c) return c~=e:GetHandler() end) + e4:SetValue(aux.tgoval) + c:RegisterEffect(e4) + --Take control of 1 monster your opponent controls + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,0)) + e5:SetCategory(CATEGORY_CONTROL) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetCode(EVENT_CHAINING) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetCondition(s.ctcon) + e5:SetCost(aux.dxmcostgen(1,1,nil)) + e5:SetTarget(s.cttg) + e5:SetOperation(s.ctop) + c:RegisterEffect(e5,false,REGISTER_FLAG_DETACH_XMAT) +end +s.xyz_number=0 +function s.xyzcheck(g,tp,xyz) + local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) + return mg:GetClassCount(Card.GetRank)==1 +end +function s.ctcon(e,tp,eg,ep,ev,re,r,rp) + local trig_loc,trig_p=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER) + return trig_p==1-tp and (trig_loc&LOCATION_ONFIELD)>0 +end +function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0) +end +function s.ctop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp) + end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + --This card cannot be destroyed by battle or card effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3008) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2) + end +end diff --git a/pre-release/c101301043.lua b/pre-release/c101301043.lua new file mode 100644 index 0000000000..f492d602eb --- /dev/null +++ b/pre-release/c101301043.lua @@ -0,0 +1,64 @@ +--ガガガガガール +--Gagagaga Girl +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Add 1 "Gagaga", "Onomat", or "Xyz" card from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,{SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) end) + e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --A "Utopic Future" Xyz Monster that has this card as material gains this effect. + --● If it is Xyz Summoned: Activate this effect; it can make a second attack during each Battle Phase this turn. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCondition(s.secondattackcon) + e2:SetOperation(s.secondattackop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_ONOMAT,SET_XYZ,SET_UTOPIC_FUTURE} +function s.thfilter(c) + return c:IsSetCard({SET_GAGAGA,SET_ONOMAT,SET_XYZ}) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.secondattackcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsSetCard(SET_UTOPIC_FUTURE) and c:IsXyzSummoned() and (Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and not Duel.IsPhase(PHASE_BATTLE))) +end +function s.secondattackop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + --It can make a second attack during each Battle Phase this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3201) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_EXTRA_ATTACK) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101301044.lua b/pre-release/c101301044.lua new file mode 100644 index 0000000000..cf4dbfe6c6 --- /dev/null +++ b/pre-release/c101301044.lua @@ -0,0 +1,119 @@ +--H-C マグナム・エクスカリバー +--Heroic Champion - Magnum Excalibur +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 Warrior monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) + --Double this card's ATK during damage calculation only + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(s.atkcon) + e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --Equip this card to another monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.eqtg) + e2:SetOperation(s.eqop) + c:RegisterEffect(e2) + --Shuffle 3 Warrior monsters from your GY into the Deck. + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCost(aux.SelfBanishCost) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + c:RegisterEffect(e3) +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + return bc and bc:IsControler(1-tp) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,c:GetAttack()) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFaceup() and c:IsRelateToEffect(e) then + --Double this card's ATK during damage calculation only + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(c:GetAttack()*2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) + c:RegisterEffect(e1) + end +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then + return Duel.SendtoGrave(c,REASON_RULE,PLAYER_NONE,PLAYER_NONE) + else + if not Duel.Equip(tp,c,tc) then return end + --Equip limit + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(function(e,c) return c==tc end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e0) + --The equipped monster gains 2000 ATK/DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(2000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2) + end +end +function s.tdfilter(c) + return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_GRAVE) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil) + if #g==3 then + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301052.lua b/pre-release/c101301052.lua new file mode 100644 index 0000000000..c92ca3e21f --- /dev/null +++ b/pre-release/c101301052.lua @@ -0,0 +1,119 @@ +--ガガガ・ホープ・タクティクス +--Gagaga Hope Tactics +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --"Utopia" and "Utopic" Xyz Monsters you control whose original Attribute is LIGHT cannot be destroyed by card effects, also your opponent cannot target them with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(s.utopixyzfilter)) + e1:SetValue(1) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetValue(aux.tgoval) + c:RegisterEffect(e2) + --Change the Levels of 2 face-up monsters you control, including a "Gagaga" monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_SZONE) + e3:SetCountLimit(1,{id,0}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) + --Destroy 1 card your opponent controls + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DESTROY) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + e4:SetRange(LOCATION_SZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.descon) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_series={SET_UTOPIC,SET_GAGAGA} +function s.utopixyzfilter(c) + return c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup() +end +function s.lvfilter(c,e) + return c:HasLevel() and c:IsFaceup() and c:IsCanBeEffectTarget(e) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_GAGAGA) +end +s.nlvfilter=aux.NOT(Card.IsLevel) +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local gg=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil,e) + if chk==0 then return aux.SelectUnselectGroup(gg,e,tp,2,2,s.rescon,0) end + local g1,g2=gg:Split(Card.IsSetCard,nil,SET_GAGAGA) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK) + local lv=Duel.AnnounceNumber(tp,s.get_declarable_levels(g1,g2)) + local g=gg:Match(s.nlvfilter,nil,lv) + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TARGET) + Duel.SetTargetCard(tg) + e:SetLabel(lv) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tg,2,tp,lv) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e):Filter(Card.IsFaceup,nil) + if #tg==0 then return end + local lv=e:GetLabel() + for tc in tg:Iter() do + if not tc:IsLevel(lv) then + --Its Level becomes the declared Level + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + end +end +function s.get_declarable_levels(g1,g2) + local opts={} + for lv=1,12 do + local ct=g1:FilterCount(s.nlvfilter,nil,lv) + if ct>1 or (ct>0 and g2:IsExists(s.nlvfilter,1,nil,lv)) then + table.insert(opts,lv) + end + end + return table.unpack(opts) +end +function s.desconfilter(c,tp) + return s.utopixyzfilter(c) and c:IsSummonPlayer(tp) and c:IsXyzSummoned() +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.desconfilter,1,nil,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301059.lua b/pre-release/c101301059.lua new file mode 100644 index 0000000000..a6f8423a7b --- /dev/null +++ b/pre-release/c101301059.lua @@ -0,0 +1,67 @@ +--パラレル・テレポート +--Parallel Teleport +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 7 or lower Psychic monster from your Deck or Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_PSYCHIC) end) +end +function s.costfilter(c,e,tp) + return c:IsRace(RACE_PSYCHIC) and c:HasLevel() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,mc) + if not (c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp,mc)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + end +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(100) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 + and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,e,tp) end + local rc=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,e,tp):GetFirst() + e:SetLabel(rc:GetOriginalLevel()) + Duel.Release(rc,REASON_COST) + --You cannot Special Summon the turn you activate this card, except Psychic monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_PSYCHIC) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local cost_chk=e:GetLabel()==100 + e:SetLabel(0) + return cost_chk or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + local lv_diff=math.abs(sc:GetOriginalLevel()-e:GetLabel()) + if lv_diff>0 then + Duel.BreakEffect() + Duel.SetLP(tp,Duel.GetLP(tp)-lv_diff*1000) + end + end +end \ No newline at end of file diff --git a/pre-release/c101301060.lua b/pre-release/c101301060.lua new file mode 100644 index 0000000000..83a3965560 --- /dev/null +++ b/pre-release/c101301060.lua @@ -0,0 +1,67 @@ +--テレポート・フュージョン +--Teleport Fusion +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Psychic Fusion Monster by banishing Psychic monsters from your field and/or GY as material + local e1=Fusion.CreateSummonEff({handler=c, + fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC), + matfilter=Fusion.OnFieldMat(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC)), + extrafil=s.fextramat, + extraop=Fusion.BanishMaterial, + extratg=s.extratg} + ) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCondition(function() return Duel.IsMainPhase() end) + c:RegisterEffect(e1) + --Special Summon 1 of your banished Psychic monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.fextramat(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC),Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) +end +function s.spconfilter(c,tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + and c:IsSummonLocation(LOCATION_EXTRA) and c:IsPreviousPosition(POS_FACEUP) + and c:IsPreviousControler(tp) and c:IsPreviousRaceOnField(RACE_PSYCHIC) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101301061.lua b/pre-release/c101301061.lua new file mode 100644 index 0000000000..7210fd5e42 --- /dev/null +++ b/pre-release/c101301061.lua @@ -0,0 +1,78 @@ +--帝王の策略 +--Scheme of the Monarchs +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Send 1 "Monarch" Spell/Trap from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --Add 1 monster with 2400 ATK/1000 DEF from your Deck or GY to your hand, then you can Normal Summon 1 listed monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_REMOVE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MONARCH} +s.listed_names={id,51945556,4929256,26205777,60229110,73125233,9748752} +--"Zaborg the Thunder Monarch", "Mobius the Frost Monarch", "Thestalos the Firestorm Monarch", "Granmarg the Rock Monarch", "Raiza the Storm Monarch", "Caius the Shadow Monarch" +function s.tgfilter(c) + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.attrfilter(c,tp) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetAttribute()) +end +function s.thfilter(c,attr) + return c:IsAttribute(attr) and c:IsAttack(2400) and c:IsDefense(1000) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.attrfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.attrfilter,tp,0,LOCATION_MZONE,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.attrfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.sumfilter(c) + return c:IsSummonable(true,nil) and c:IsCode(51945556,4929256,26205777,60229110,73125233,9748752) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tc:GetAttribute()):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + Duel.ShuffleDeck(tp) + local sg=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) + if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sumc=sg:Select(tp,1,1,nil):GetFirst() + Duel.BreakEffect() + Duel.Summon(tp,sumc,true,nil) + end + end +end \ No newline at end of file diff --git a/pre-release/c101301062.lua b/pre-release/c101301062.lua new file mode 100644 index 0000000000..2c7a9f292e --- /dev/null +++ b/pre-release/c101301062.lua @@ -0,0 +1,78 @@ +--叛逆の帝王 +--Rebellion of the Monarchs +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Reveal 3 monsters with 800 or 2400 or more ATK, and 1000 DEF, from your Deck, your opponent chooses 1 for you to add to your hand, and you send the rest to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Discard(nil,true)) + e1:SetTarget(s.thtgtg) + e1:SetOperation(s.thtgop) + c:RegisterEffect(e1) + --Special Summon 1 monster with 800 ATK/1000 DEF from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.revfilter(c) + return (c:IsAttack(800) or c:IsAttackAbove(2400)) and c:IsDefense(1000) and (c:IsAbleToHand() or c:IsAbleToGrave()) +end +function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) + if chk==0 then return #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsAbleToHand,1,nil) +end +function s.thtgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) + if #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) then + local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,rg) + Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,2)) + local sc=rg:FilterSelect(1-tp,Card.IsAbleToHand,1,1,nil):GetFirst() + Duel.SendtoHand(sc,nil,REASON_EFFECT) + Duel.SendtoGrave(rg-sc,REASON_EFFECT) + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spfilter(c,e,tp) + return c:IsAttack(800) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end diff --git a/pre-release/c101301068.lua b/pre-release/c101301068.lua new file mode 100644 index 0000000000..ad046860b4 --- /dev/null +++ b/pre-release/c101301068.lua @@ -0,0 +1,103 @@ +--第19層『襲来干渉!漆黒の超量士!!』 +--Layer 19: "Preventing the Invasion! The Pitch-Black Super Quantum!!" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_SUPER_QUANT} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalAttribute,c:GetOriginalAttribute()),tp,LOCATION_MZONE,0,1,nil) +end +function s.setfilter(c) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsTrap() and c:IsSSetable() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+100) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + local b3=not Duel.HasFlagEffect(tp,id+200) + and (e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 or b3 end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return e:GetLabel()==1 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttackPos() and chkc:IsCanChangePosition() end + local cost_skip=e:GetLabel()~=-100 + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b2=(cost_skip or (not Duel.HasFlagEffect(tp,id+100) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil))) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) + and (not e:IsHasType(EFFECT_TYPE_ACTIVATE) or e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then e:SetLabel(0) return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_POSITION) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + elseif op==3 then + e:SetCategory(0) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Change 1 Attack Position monster on the field to Defense Position + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) + end + elseif op==2 then + --Special Summon 1 "Super Quant" monster from your Deck in Defense Position, with a different original Attribute from the monsters you control + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + elseif op==3 then + --Set 1 "Super Quant" Trap from your Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SSet(tp,sc)>0 then + --It can be activated this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/pre-release/c101301074.lua b/pre-release/c101301074.lua new file mode 100644 index 0000000000..c698c8ceab --- /dev/null +++ b/pre-release/c101301074.lua @@ -0,0 +1,86 @@ +--エクシーズ・アンブレイカブル・バリア +--Xyz Unbreakable Barrier +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation of a Spell/Trap Card, or monster effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,id) + e1:SetCondition(s.negcon) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --Attach 1 LIGHT "Utopia" or "Utopic" Xyz Monster from your GY to 1 Xyz Monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LEAVE_GRAVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.attachtg) + e2:SetOperation(s.attachop) + c:RegisterEffect(e2) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,1,nil) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + if Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT)==2 then + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) + if #dg==0 then return end + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end +function s.xyzfilter(c,tp) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c) +end +function s.matfilter(c,tp,xyzc) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) + and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) + local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,tc) + if #g>0 then + Duel.Overlay(tc,g) + end + end +end \ No newline at end of file diff --git a/pre-release/c101301076.lua b/pre-release/c101301076.lua new file mode 100644 index 0000000000..ca280da32c --- /dev/null +++ b/pre-release/c101301076.lua @@ -0,0 +1,151 @@ +--帝王の極致 +--Culmination of the Monarchs +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_MONARCH} +function s.effcostfilter(c) + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local cost_skip=e:GetLabel()~=-100 + --Destroy 1 monster on the field + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + --Destroy up to 2 Spells/Traps on the field + local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) + and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + --Discard 1 random card from your opponent's hand + local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) + and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT) + --Destroy 1 face-down card on the field + local b4=(cost_skip or not Duel.HasFlagEffect(tp,id+300)) + and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) + --Place 1 card on the field on top of the Deck + local b5=(cost_skip or not Duel.HasFlagEffect(tp,id+400)) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + --Banish 1 card on the field + local b6=(cost_skip or not Duel.HasFlagEffect(tp,id+500)) + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + if chk==0 then e:SetLabel(0) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) + and (b1 or b2 or b3 or b4 or b5 or b6) end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}, + {b4,aux.Stringid(id,4)}, + {b5,aux.Stringid(id,5)}, + {b6,aux.Stringid(id,6)}) + e:SetLabel(op) + if op==1 then + --Destroy 1 monster on the field + e:SetCategory(CATEGORY_DESTROY) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + elseif op==2 then + --Destroy up to 2 Spells/Traps on the field + e:SetCategory(CATEGORY_DESTROY) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + elseif op==3 then + --Discard 1 random card from your opponent's hand + e:SetCategory(CATEGORY_HANDES) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) + elseif op==4 then + --Destroy 1 face-down card on the field + e:SetCategory(CATEGORY_DESTROY) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+300,RESET_PHASE|PHASE_END,0,1) end + local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + elseif op==5 then + --Place 1 card on the field on top of the Deck + e:SetCategory(CATEGORY_TODECK) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+400,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD) + elseif op==6 then + --Banish 1 card on the field + e:SetCategory(CATEGORY_REMOVE) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+500,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Destroy 1 monster on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==2 then + --Destroy up to 2 Spells/Traps on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==3 then + --Discard 1 random card from your opponent's hand + local hg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,0,LOCATION_HAND,nil,REASON_EFFECT) + if #hg>0 then + local g=hg:RandomSelect(tp,1,1,nil) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) + end + elseif op==4 then + --Destroy 1 face-down card on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==5 then + --Place 1 card on the field on top of the Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) + end + elseif op==6 then + --Banish 1 card on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end + end +end \ No newline at end of file