From ba69d6b3b85102908d9dc8004c083ceec150dad0 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 3 Jan 2026 14:44:31 +0200 Subject: [PATCH 1/3] Delete pre-release directory --- pre-release/c100200282.lua | 66 ------------------- pre-release/c100296301.lua | 67 ------------------- pre-release/c100444301.lua | 98 ---------------------------- pre-release/c100444302.lua | 72 -------------------- pre-release/c100448001.lua | 93 -------------------------- pre-release/c100448002.lua | 79 ---------------------- pre-release/c100448003.lua | 66 ------------------- pre-release/c100448004.lua | 68 ------------------- pre-release/c100448005.lua | 102 ----------------------------- pre-release/c100448006.lua | 97 --------------------------- pre-release/c100449001.lua | 107 ------------------------------ pre-release/c100449002.lua | 77 ---------------------- pre-release/c100449003.lua | 70 -------------------- pre-release/c100449004.lua | 87 ------------------------- pre-release/c100449005.lua | 128 ------------------------------------ pre-release/c100449101.lua | 91 -------------------------- pre-release/c100450001.lua | 54 --------------- pre-release/c100450002.lua | 87 ------------------------- pre-release/c100450003.lua | 104 ----------------------------- pre-release/c100450004.lua | 63 ------------------ pre-release/c100450005.lua | 81 ----------------------- pre-release/c100450006.lua | 50 -------------- pre-release/c100450007.lua | 70 -------------------- pre-release/c100450008.lua | 112 -------------------------------- pre-release/c100450009.lua | 48 -------------- pre-release/c100450010.lua | 71 -------------------- pre-release/c100450011.lua | 88 ------------------------- pre-release/c100450012.lua | 86 ------------------------ pre-release/c100450013.lua | 70 -------------------- pre-release/c100450014.lua | 56 ---------------- pre-release/c100450015.lua | 69 -------------------- pre-release/c100450016.lua | 98 ---------------------------- pre-release/c100450017.lua | 81 ----------------------- pre-release/c100450018.lua | 71 -------------------- pre-release/c100450019.lua | 89 ------------------------- pre-release/c100450020.lua | 86 ------------------------ pre-release/c100451001.lua | 73 --------------------- pre-release/c100451004.lua | 74 --------------------- pre-release/c100451007.lua | 89 ------------------------- pre-release/c100451010.lua | 104 ----------------------------- pre-release/c100451013.lua | 130 ------------------------------------- pre-release/c100451016.lua | 74 --------------------- pre-release/c100451019.lua | 90 ------------------------- pre-release/c100451025.lua | 112 -------------------------------- pre-release/c100452001.lua | 94 --------------------------- pre-release/c100452004.lua | 69 -------------------- pre-release/c100452007.lua | 94 --------------------------- pre-release/c100452010.lua | 97 --------------------------- pre-release/c100452013.lua | 76 ---------------------- pre-release/c100452016.lua | 77 ---------------------- pre-release/c100452024.lua | 76 ---------------------- pre-release/c100452025.lua | 94 --------------------------- pre-release/c101304005.lua | 92 -------------------------- pre-release/c101304006.lua | 88 ------------------------- pre-release/c101304007.lua | 78 ---------------------- pre-release/c101304008.lua | 97 --------------------------- pre-release/c101304009.lua | 98 ---------------------------- pre-release/c101304016.lua | 107 ------------------------------ pre-release/c101304017.lua | 91 -------------------------- pre-release/c101304018.lua | 65 ------------------- pre-release/c101304022.lua | 107 ------------------------------ pre-release/c101304023.lua | 90 ------------------------- pre-release/c101304024.lua | 106 ------------------------------ pre-release/c101304025.lua | 89 ------------------------- pre-release/c101304026.lua | 79 ---------------------- pre-release/c101304027.lua | 100 ---------------------------- pre-release/c101304030.lua | 79 ---------------------- pre-release/c101304031.lua | 118 --------------------------------- pre-release/c101304033.lua | 95 --------------------------- pre-release/c101304034.lua | 92 -------------------------- pre-release/c101304035.lua | 54 --------------- pre-release/c101304038.lua | 96 --------------------------- pre-release/c101304039.lua | 67 ------------------- pre-release/c101304043.lua | 88 ------------------------- pre-release/c101304044.lua | 72 -------------------- pre-release/c101304047.lua | 83 ----------------------- pre-release/c101304048.lua | 71 -------------------- pre-release/c101304049.lua | 89 ------------------------- pre-release/c101304050.lua | 69 -------------------- pre-release/c101304051.lua | 88 ------------------------- pre-release/c101304053.lua | 88 ------------------------- pre-release/c101304054.lua | 79 ---------------------- pre-release/c101304055.lua | 86 ------------------------ pre-release/c101304062.lua | 92 -------------------------- pre-release/c101304063.lua | 80 ----------------------- pre-release/c101304064.lua | 66 ------------------- pre-release/c101304066.lua | 70 -------------------- pre-release/c101304067.lua | 71 -------------------- pre-release/c101304069.lua | 71 -------------------- pre-release/c101304075.lua | 70 -------------------- pre-release/c101304076.lua | 78 ---------------------- pre-release/c101304101.lua | 103 ----------------------------- pre-release/c101304102.lua | 97 --------------------------- pre-release/c101304103.lua | 93 -------------------------- pre-release/c101304104.lua | 86 ------------------------ pre-release/c101304105.lua | 83 ----------------------- pre-release/c101304106.lua | 70 -------------------- pre-release/c101304107.lua | 52 --------------- pre-release/c101304108.lua | 95 --------------------------- 99 files changed, 8303 deletions(-) delete mode 100644 pre-release/c100200282.lua delete mode 100644 pre-release/c100296301.lua delete mode 100644 pre-release/c100444301.lua delete mode 100644 pre-release/c100444302.lua delete mode 100644 pre-release/c100448001.lua delete mode 100644 pre-release/c100448002.lua delete mode 100644 pre-release/c100448003.lua delete mode 100644 pre-release/c100448004.lua delete mode 100644 pre-release/c100448005.lua delete mode 100644 pre-release/c100448006.lua delete mode 100644 pre-release/c100449001.lua delete mode 100644 pre-release/c100449002.lua delete mode 100644 pre-release/c100449003.lua delete mode 100644 pre-release/c100449004.lua delete mode 100644 pre-release/c100449005.lua delete mode 100644 pre-release/c100449101.lua delete mode 100644 pre-release/c100450001.lua delete mode 100644 pre-release/c100450002.lua delete mode 100644 pre-release/c100450003.lua delete mode 100644 pre-release/c100450004.lua delete mode 100644 pre-release/c100450005.lua delete mode 100644 pre-release/c100450006.lua delete mode 100644 pre-release/c100450007.lua delete mode 100644 pre-release/c100450008.lua delete mode 100644 pre-release/c100450009.lua delete mode 100644 pre-release/c100450010.lua delete mode 100644 pre-release/c100450011.lua delete mode 100644 pre-release/c100450012.lua delete mode 100644 pre-release/c100450013.lua delete mode 100644 pre-release/c100450014.lua delete mode 100644 pre-release/c100450015.lua delete mode 100644 pre-release/c100450016.lua delete mode 100644 pre-release/c100450017.lua delete mode 100644 pre-release/c100450018.lua delete mode 100644 pre-release/c100450019.lua delete mode 100644 pre-release/c100450020.lua delete mode 100644 pre-release/c100451001.lua delete mode 100644 pre-release/c100451004.lua delete mode 100644 pre-release/c100451007.lua delete mode 100644 pre-release/c100451010.lua delete mode 100644 pre-release/c100451013.lua delete mode 100644 pre-release/c100451016.lua delete mode 100644 pre-release/c100451019.lua delete mode 100644 pre-release/c100451025.lua delete mode 100644 pre-release/c100452001.lua delete mode 100644 pre-release/c100452004.lua delete mode 100644 pre-release/c100452007.lua delete mode 100644 pre-release/c100452010.lua delete mode 100644 pre-release/c100452013.lua delete mode 100644 pre-release/c100452016.lua delete mode 100644 pre-release/c100452024.lua delete mode 100644 pre-release/c100452025.lua delete mode 100644 pre-release/c101304005.lua delete mode 100644 pre-release/c101304006.lua delete mode 100644 pre-release/c101304007.lua delete mode 100644 pre-release/c101304008.lua delete mode 100644 pre-release/c101304009.lua delete mode 100644 pre-release/c101304016.lua delete mode 100644 pre-release/c101304017.lua delete mode 100644 pre-release/c101304018.lua delete mode 100644 pre-release/c101304022.lua delete mode 100644 pre-release/c101304023.lua delete mode 100644 pre-release/c101304024.lua delete mode 100644 pre-release/c101304025.lua delete mode 100644 pre-release/c101304026.lua delete mode 100644 pre-release/c101304027.lua delete mode 100644 pre-release/c101304030.lua delete mode 100644 pre-release/c101304031.lua delete mode 100644 pre-release/c101304033.lua delete mode 100644 pre-release/c101304034.lua delete mode 100644 pre-release/c101304035.lua delete mode 100644 pre-release/c101304038.lua delete mode 100644 pre-release/c101304039.lua delete mode 100644 pre-release/c101304043.lua delete mode 100644 pre-release/c101304044.lua delete mode 100644 pre-release/c101304047.lua delete mode 100644 pre-release/c101304048.lua delete mode 100644 pre-release/c101304049.lua delete mode 100644 pre-release/c101304050.lua delete mode 100644 pre-release/c101304051.lua delete mode 100644 pre-release/c101304053.lua delete mode 100644 pre-release/c101304054.lua delete mode 100644 pre-release/c101304055.lua delete mode 100644 pre-release/c101304062.lua delete mode 100644 pre-release/c101304063.lua delete mode 100644 pre-release/c101304064.lua delete mode 100644 pre-release/c101304066.lua delete mode 100644 pre-release/c101304067.lua delete mode 100644 pre-release/c101304069.lua delete mode 100644 pre-release/c101304075.lua delete mode 100644 pre-release/c101304076.lua delete mode 100644 pre-release/c101304101.lua delete mode 100644 pre-release/c101304102.lua delete mode 100644 pre-release/c101304103.lua delete mode 100644 pre-release/c101304104.lua delete mode 100644 pre-release/c101304105.lua delete mode 100644 pre-release/c101304106.lua delete mode 100644 pre-release/c101304107.lua delete mode 100644 pre-release/c101304108.lua diff --git a/pre-release/c100200282.lua b/pre-release/c100200282.lua deleted file mode 100644 index 2948e505c7..0000000000 --- a/pre-release/c100200282.lua +++ /dev/null @@ -1,66 +0,0 @@ ---聖月の皇太子レグルス ---Regulus, the Prince of Endymion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --The first time this card would be destroyed by battle each turn, it is not destroyed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetValue(function(e,re,r,rp) return (r&REASON_BATTLE)>0 end) - c:RegisterEffect(e1) - --Lose LP equal to the revealed Spellcaster monster's Level x 300, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.Reveal(function(c) return c:IsRace(RACE_SPELLCASTER) and c:HasLevel() end,true,1,1,function(e,tp,og) e:SetLabel(og:GetFirst():GetLevel()) end)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 Spell that mentions "Regulus, the Prince of Endymion" 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_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION} -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) - Duel.SetLP(tp,Duel.GetLP(tp)-e:GetLabel()*300) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSpell() and c:ListsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) 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/c100296301.lua b/pre-release/c100296301.lua deleted file mode 100644 index 7fd77eb923..0000000000 --- a/pre-release/c100296301.lua +++ /dev/null @@ -1,67 +0,0 @@ ---エンディミオンの侍女ヴェール ---Verre, the Maid of Endymion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Gains 2300 ATK while you have "Regulus, the Prince of Endymion" in your field or GY - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_REGULUS_THE_PRINCE_OF_ENDYMION),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end) - e1:SetValue(2300) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Witchcrafter" Spell/Trap or "Magical Dimension" 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_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) -end -s.listed_series={SET_WITCHCRAFTER} -s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION,28553439} --"Magical Dimension" -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return ((c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpellTrap()) or c:IsCode(28553439)) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/pre-release/c100444301.lua b/pre-release/c100444301.lua deleted file mode 100644 index 6b547b8c58..0000000000 --- a/pre-release/c100444301.lua +++ /dev/null @@ -1,98 +0,0 @@ ---大輪の霊使い ---Charmers of the Grand Circle ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2+ "Charmer" and/or "Familiar-Possessed" monsters - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,{SET_CHARMER,SET_FAMILIAR_POSSESSED}),2,99) - --Keep track of the number of different original Attributes of the monsters used as its material - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():GetClassCount(Card.GetOriginalAttribute)) end) - c:RegisterEffect(e0) - --Repeat the process of applying 1 of these effects, up to the number of different original Attributes of the monsters used as its material (max. 4) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_SEARCH+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():IsFusionSummoned() end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetLabelObject(e0) - c:RegisterEffect(e1) -end -s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED,SET_POSSESSED} -s.material_setcode={SET_CHARMER,SET_FAMILIAR_POSSESSED} -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local material_check_eff=e:GetLabelObject() - local label=material_check_eff:GetLabel() - if chk==0 then return label>0 end - material_check_eff:SetLabel(0) - Duel.SetTargetParam(label) - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,800) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.thfilter(c) - return c:IsSetCard(SET_POSSESSED) and c:IsSpellTrap() and c:IsAbleToHand() -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local b1,b2,b3,b4,b5,op - local max_count=math.min(Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM),4) - local remaining_count=max_count - repeat - b1=c:IsRelateToEffect(e) and c:IsFaceup() - b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - b3=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - b4=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) - if not (b1 or b2 or b3 or b4) then return end - b5=remaining_count0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - elseif op==3 then - --Return 1 card on the field to the hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - elseif op==4 then - --Special Summon 1 Spellcaster monster from your GY - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(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 - elseif op==5 then - --Finish applying effects - return - end - until remaining_count==0 -end \ No newline at end of file diff --git a/pre-release/c100444302.lua b/pre-release/c100444302.lua deleted file mode 100644 index 4f4780ef4d..0000000000 --- a/pre-release/c100444302.lua +++ /dev/null @@ -1,72 +0,0 @@ ---大輪の魔導書 ---Spellbook of the Grand Circle ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Add 4 "Charmer" monsters with different Attributes from your Deck, GY, and/or banishment to your hand, then shuffle 2 cards from your hand into the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Fusion Summon 1 Fusion Monster from your Extra Deck, using "Charmer" and/or "Familiar-Possessed" monsters from your hand or field, also your opponent cannot activate cards or effects when a monster is Fusion Summoned this way - local fusion_params={ - matfilter=function(c) return c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) end, - stage2=s.stage2 - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) -end -s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED} -function s.thfilter(c) - return c:IsSetCard(SET_CHARMER) and c:IsMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) - and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,nil) - return aux.SelectUnselectGroup(g,e,tp,4,4,aux.dpcheck(Card.GetAttribute),0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,nil) - if #g<4 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,4,4,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_ATOHAND) - if #sg==4 and Duel.SendtoHand(sg,nil,REASON_EFFECT)==4 then - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tdg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,2,nil) - if #tdg==2 then - Duel.BreakEffect() - Duel.SendtoDeck(tdg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - end -end -function s.stage2(e,fc,tp,sg,chk) - if chk==1 then - --Your opponent cannot activate cards or effects when a monster is Fusion Summoned this way - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_END) - e1:SetOperation(function(e) - Duel.SetChainLimitTillChainEnd(function(e,ep,tp) return tp==ep end) - e:Reset() - end) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100448001.lua b/pre-release/c100448001.lua deleted file mode 100644 index 8cd12d7eb3..0000000000 --- a/pre-release/c100448001.lua +++ /dev/null @@ -1,93 +0,0 @@ ---破滅と終焉の支配者 ---End of the World Ruler ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --This card's name becomes "Demise, King of Armageddon" while in the hand or field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_HAND|LOCATION_MZONE) - e1:SetValue(72426662) - c:RegisterEffect(e1) - --Apply the effect of a Ritual Spell that Ritual Summons - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.AND(Cost.SelfReveal,Cost.PayLP(2000),s.applycost)) - e2:SetTarget(s.applytg) - e2:SetOperation(s.applyop) - c:RegisterEffect(e2) - --Destroy as many other cards on the field as possible, then this card gains 2900 ATK - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.PayLP(2000)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_series={SET_END_OF_THE_WORLD} -s.listed_names={72426662} --"Demise, King of Armageddon" -function s.applyfilter(c) - return c:IsRitualSpell() and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil -end -function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil) end -end -function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - local te=e:GetLabelObject() - return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) - end - if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local te=g:GetFirst():CheckActivateEffect(true,true,false) - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - local tg=te:GetTarget() - e:SetProperty(te:GetProperty()) - if tg then - tg(e,tp,eg,ep,ev,re,r,rp,1) - end - te:SetLabel(e:GetLabel()) - te:SetLabelObject(e:GetLabelObject()) - e:SetLabelObject(te) - Duel.ClearOperationInfo(0) -end -function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if te then - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end - te:SetLabel(e:GetLabel()) - te:SetLabelObject(e:GetLabelObject()) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.BreakEffect() - --This card gains 2900 ATK - c:UpdateAttack(2900) - end -end \ No newline at end of file diff --git a/pre-release/c100448002.lua b/pre-release/c100448002.lua deleted file mode 100644 index 66c84ec3e3..0000000000 --- a/pre-release/c100448002.lua +++ /dev/null @@ -1,79 +0,0 @@ ---ナイトメア・アイズ・サクリファイス ---Nightmare-Eyes Restrict ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 monsters with different Types (Fiend, Illusion, or Spellcaster) - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - --Equip 1 monster your opponent controls to this card as an Equip Spell - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_EQUIP) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SPSUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.eqtg) - e1a:SetOperation(s.eqop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1b:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1b:SetRange(LOCATION_MZONE) - e1b:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) - c:RegisterEffect(e1b) - aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1a) - aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1b) - --Gains ATK equal to the combined ATK of those equipped monsters - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return e:GetHandler():GetEquipGroup():IsExists(aux.FaceupFilter(Card.HasFlagEffect,id),1,nil) end) - e2:SetValue(function(e,c) return c:GetEquipGroup():Match(function(c) return c:HasFlagEffect(id) and c:IsFaceup() and c:GetTextAttack()>0 end,nil):GetSum(Card.GetTextAttack) end) - c:RegisterEffect(e2) - --If this card battles a monster, neither can be destroyed by that battle - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(function(e,c) local handler=e:GetHandler() return c==handler or c==handler:GetBattleTarget() end) - e3:SetValue(1) - c:RegisterEffect(e3) - --Your opponent's monsters cannot attack monsters, except this one - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetValue(function(e,c) return c~=e:GetHandler() end) - c:RegisterEffect(e4) -end -function s.matfilter(c,fc,sumtype,sp,sub,mg,sg) - return c:IsRace(RACE_FIEND|RACE_ILLUSION|RACE_SPELLCASTER,fc,sumtype,sp) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp)) -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,1-tp,LOCATION_MZONE) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local sc=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - s.equipop(c,e,tp,sc) - end -end -function s.eqval(ec,c,tp) - return ec:IsControler(1-tp) -end -function s.equipop(c,e,tp,tc) - c:EquipByEffectAndLimitRegister(e,tp,tc,id) -end \ No newline at end of file diff --git a/pre-release/c100448003.lua b/pre-release/c100448003.lua deleted file mode 100644 index d21bf1bbaa..0000000000 --- a/pre-release/c100448003.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ヘル・ダイブ・ボンバー ---Infernal Strike Fighter ---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) - --Destroy as many face-up monsters on the field as possible, and if you do, inflict damage to your opponent equal to the combined original Levels of those destroyed monsters x 200 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsMainPhase2() end) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) - --Special Summon 1 Level 5 or lower Machine monster from your GY in Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetSum(Card.GetOriginalLevel)*200) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - local dam=Duel.GetOperatedGroup():GetSum(Card.GetOriginalLevel)*200 - if dam>0 then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(5) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - 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_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c100448004.lua b/pre-release/c100448004.lua deleted file mode 100644 index d47320b750..0000000000 --- a/pre-release/c100448004.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ギャラクシーアイズ・アンチマター・ドラゴン ---Galaxy-Eyes Antimatter Dragon ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 9 monsters OR 1 Xyz Monster you control with 3 or more materials (transfer its materials) - Xyz.AddProcedure(c,nil,9,2,function(c) return c:IsXyzMonster() and c:GetOverlayCount()>=3 and c:IsFaceup() end,aux.Stringid(id,0),2,s.altprocop) - --Any battle damage this card with material inflicts to your opponent is halved - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) - e1:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) - c:RegisterEffect(e1) - --Make this card gain the ability this turn to make up to 2 attacks on monsters during each Battle Phase, then if the detached material was a monster, you can send 1 monster with its same Type from your Deck to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function() return Duel.IsAbleToEnterBP() end) - e2:SetCost(Cost.DetachFromSelf(1,1,function(e,og) local oc=og:GetFirst() e:SetLabel(oc:IsMonster() and oc:GetRace() or 0) end)) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.altprocop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsHasEffect(EFFECT_EXTRA_ATTACK_MONSTER) end - local detached_type=e:GetLabel() - e:SetLabel(0) - Duel.SetTargetParam(detached_type) - if detached_type>0 then - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - end -end -function s.tgfilter(c,detached_type) - return c:IsRace(detached_type) and c:IsAbleToGrave() -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK_MONSTER) then - --This card can make up to 2 attacks on monsters this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3202) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - local detached_type=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if detached_type>0 and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,detached_type) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,detached_type) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoGrave(g,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100448005.lua b/pre-release/c100448005.lua deleted file mode 100644 index 7da9bc3437..0000000000 --- a/pre-release/c100448005.lua +++ /dev/null @@ -1,102 +0,0 @@ ---竜剣士ウィンドユニコーンP ---Wind Unicorn Parallel, the Dracoslayer ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --While this Pendulum Summoned card is in your Monster Zone, your opponent cannot target it with card effects, also it cannot be destroyed by your opponent's card effects - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_SINGLE) - e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - e2a:SetValue(aux.tgoval) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2b:SetValue(aux.indoval) - c:RegisterEffect(e2b) - --Return 1 Pendulum Monster Card you control and 1 card your opponent controls to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.rthtg) - e3:SetOperation(s.rthop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local mmz_chk=Duel.GetMZoneCount(tp)>0 - local b1=mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - local b2=mmz_chk and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,1,c,e,tp) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - local c=e:GetHandler() - if op==1 then - --Special Summon this card - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --Destroy this card, and if you do, Special Summon 1 Level 5 or lower Pendulum Monster Card from your Pendulum Zone - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.GetMZoneCount(tp)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end -function s.rthfilter(c,e,tp) - return ((c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsControler(tp)) or c:IsControler(1-tp)) - and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.rthfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e,tp) - if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_RTOHAND) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,2,tp,0) -end -function s.rthop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100448006.lua b/pre-release/c100448006.lua deleted file mode 100644 index c2a6f5e7cd..0000000000 --- a/pre-release/c100448006.lua +++ /dev/null @@ -1,97 +0,0 @@ ---水晶機巧-ハリファイバーP ---Crystron Halqifibrax Prism ---scripted by Naim -local s,id=GetID() -local TOKEN_CRYSTRON=55326323 -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters, including a Tuner - Link.AddProcedure(c,nil,2,3,s.linkmatcheck) - --Register the original Levels of the monsters used for its Link Summon - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():GetSum(Card.GetOriginalLevel)) end) - c:RegisterEffect(e0) - --Special Summon 1 Tuner from your Extra Deck in Defense Position - 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():IsLinkSummoned() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetLabelObject(e0) - c:RegisterEffect(e1) - --Special Summon 3 "Crystron Tokens" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) local opp=1-tp return Duel.IsMainPhase(opp) or Duel.IsBattlePhase(opp) end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.tokentg) - e2:SetOperation(s.tokenop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_CRYSTRON} -function s.linkmatcheck(mg,lc,sumtype,tp) - return mg:IsExists(Card.IsType,1,nil,TYPE_TUNER,lc,sumtype,tp) -end -function s.spfilter(c,e,tp,lv) - return c:IsType(TYPE_TUNER) and c:IsLevelBelow(lv) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local lv=e:GetLabelObject():GetLabel() - return lv>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local lv=e:GetLabelObject():GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end -end -function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>=3 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_CRYSTRON,SET_CRYSTRON,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_WATER) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) -end -function s.tokenop(e,tp,eg,ep,ev,re,r,rp) - if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_CRYSTRON,SET_CRYSTRON,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_WATER)) then return end - local c=e:GetHandler() - for i=1,3 do - local token=Duel.CreateToken(tp,TOKEN_CRYSTRON) - if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then - --They cannot be tributed - local e1=Effect.CreateEffect(c) - e1:SetDescription(3303) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - token:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - token:RegisterEffect(e2,true) - end - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100449001.lua b/pre-release/c100449001.lua deleted file mode 100644 index 5215734582..0000000000 --- a/pre-release/c100449001.lua +++ /dev/null @@ -1,107 +0,0 @@ ---フォーリンチーター ---Fallin' Cheatah ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --This face-up card in the Monster Zone cannot be Tributed, nor used as material for a Fusion, Synchro, Xyz, or Link Summon - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE) - e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1a:SetCode(EFFECT_UNRELEASABLE_SUM) - e1a:SetRange(LOCATION_MZONE) - e1a:SetValue(1) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EFFECT_CANNOT_BE_MATERIAL) - e1c:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) - c:RegisterEffect(e1c) - --Give control of this card to that monster's controller, also that monster cannot be Tributed nor used as material for a Fusion, Synchro, Xyz or Link Summon while this monster is face-up on the field - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_CONTROL) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2a:SetProperty(EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2a:SetCode(EVENT_CUSTOM+id) - e2a:SetRange(LOCATION_MZONE) - e2a:SetTarget(s.ctrltg) - e2a:SetOperation(s.ctrlop) - e2a:SetLabelObject(Group.CreateGroup()) - c:RegisterEffect(e2a) - --Keep track of monsters Special Summoned to the opponent's field - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - e2b:SetRange(LOCATION_MZONE) - e2b:SetLabelObject(e2a) - e2b:SetOperation(s.regop) - c:RegisterEffect(e2b) -end -function s.tgfilter(c,e,opp) - return c:IsControler(opp) and c:IsLocation(LOCATION_MZONE) and (not e or c:IsCanBeEffectTarget(e)) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.tgfilter,nil,nil,1-tp) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.ctrlfilter(c,tp) - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 -end -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetLabelObject():Filter(s.tgfilter,nil,e,1-tp):Match(s.ctrlfilter,nil,tp) - if chkc then return g:IsContains(chkc) and s.tgfilter(chkc,e,1-tp) end - local c=e:GetHandler() - if chk==0 then return true end - if #g>0 then - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) - end -end -function s.ctrlop(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 tc and tc:IsRelateToEffect(e) and Duel.GetControl(c,tc:GetControler()) and c:IsFaceup() then - c:SetCardTarget(tc) - local fid=c:GetFieldID() - tc:RegisterFlagEffect(id+100,RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET),EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,1)) - --That monster cannot be Tributed nor used as material for a Fusion, Synchro, Xyz or Link Summon while this monster is face-up on the field - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD) - e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1a:SetCode(EFFECT_UNRELEASABLE_SUM) - e1a:SetRange(LOCATION_MZONE) - e1a:SetTarget(function(e,c) return c:GetFlagEffectLabel(id+100)==fid end) - e1a:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1a:SetValue(1) - e1a:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EFFECT_CANNOT_BE_MATERIAL) - e1c:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) - c:RegisterEffect(e1c) - end -end \ No newline at end of file diff --git a/pre-release/c100449002.lua b/pre-release/c100449002.lua deleted file mode 100644 index 91f28555b9..0000000000 --- a/pre-release/c100449002.lua +++ /dev/null @@ -1,77 +0,0 @@ ---影装騎士 ブラック・ジャク ---Black Jack the Shadow-Armored Knight ---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) - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(1) - c:RegisterEffect(e1) - --Excavate cards from the top of your Deck until you excavate a monster, equip it to this card as an Equip Spell, also place the rest on the bottom of the Deck in any order - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_MOVE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(function(c) return c:IsControler(1-tp) and c:IsLocation(LOCATION_STZONE) end,1,nil) end) - e2:SetTarget(s.eqtg) - e2:SetOperation(s.eqop) - c:RegisterEffect(e2) - aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsControler(tp) and ec:IsMonster() end,Card.EquipByEffectAndLimitRegister,e2) - --Gains ATK/DEF equal to the total Levels of the monsters equipped to this card x 300 - local e3a=Effect.CreateEffect(c) - e3a:SetType(EFFECT_TYPE_SINGLE) - e3a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3a:SetCode(EFFECT_UPDATE_ATTACK) - e3a:SetRange(LOCATION_MZONE) - e3a:SetValue(function(e,c) return c:GetEquipGroup():Match(Card.HasLevel,nil):GetSum(Card.GetLevel)*300 end) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e3b) - --If the total Levels of the monsters equipped to this card is greater than 21, destroy this card - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(function(e) return e:GetHandler():GetEquipGroup():Match(Card.HasLevel,nil):GetSum(Card.GetLevel)>21 end) - c:RegisterEffect(e4) -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if deck_count==0 then return end - Duel.DisableShuffleCheck() - local g=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_DECK,0,nil) - if #g==0 then - Duel.ConfirmDecktop(tp,deck_count) - Duel.SortDeckbottom(tp,tp,deck_count) - return - end - local c=e:GetHandler() - local ec=g:GetMaxGroup(Card.GetSequence):GetFirst() - local ec_seq=ec:GetSequence() - Duel.ConfirmDecktop(tp,deck_count-ec_seq) - local top_g=Duel.GetDecktopGroup(tp,deck_count-ec_seq) - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0 - and not ec:IsForbidden() and ec:CheckUniqueOnField(tp) then - c:EquipByEffectAndLimitRegister(e,tp,ec,nil,true) - else - Duel.SendtoGrave(ec,REASON_RULE) - end - top_g:RemoveCard(ec) - Duel.MoveToDeckBottom(top_g,tp) - Duel.SortDeckbottom(tp,tp,#top_g) -end \ No newline at end of file diff --git a/pre-release/c100449003.lua b/pre-release/c100449003.lua deleted file mode 100644 index 588e63d43d..0000000000 --- a/pre-release/c100449003.lua +++ /dev/null @@ -1,70 +0,0 @@ ---恐依のペアルックマ!! ---Pair Bear Scare!! ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Your opponent can reveal 1 "Pair Bear Scare!!" in their hand or Deck, and if they do, each player gains 2000 LP, otherwise, you destroy 1 monster your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Add this card to your opponent's hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,2000) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) -end -function s.revealfilter(c) - return c:IsCode(id) and not c:IsPublic() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local opp=1-tp - if Duel.IsExistingMatchingCard(s.revealfilter,opp,LOCATION_HAND|LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(opp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_CONFIRM) - local sc=Duel.SelectMatchingCard(opp,s.revealfilter,opp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() - Duel.ConfirmCards(tp,sc) - if sc:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(opp) - else - Duel.ShuffleDeck(opp) - end - Duel.Recover(tp,2000,REASON_EFFECT) - Duel.Recover(opp,2000,REASON_EFFECT) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,1-tp,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100449004.lua b/pre-release/c100449004.lua deleted file mode 100644 index 95e2e3ca68..0000000000 --- a/pre-release/c100449004.lua +++ /dev/null @@ -1,87 +0,0 @@ ---先手必掌 ---Early Palm Gets the Win ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Roll a six-sided die and apply this effect to that monster you control based on the result until the end of this turn, or, if you activated this effect when an attack was declared involving 2 monsters in the same column, you choose the effect instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.GetBattleMonster(tp) end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_names={id} -s.roll_dice=true -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc1=Duel.GetBattleMonster(tp) - local bc2=bc1:GetBattleTarget() - if bc2 and bc1:GetColumnGroup():IsContains(bc2) then - e:SetLabel(1) - else - e:SetLabel(0) - end - e:SetLabelObject(bc1) - bc1:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - if not bc:IsRelateToEffect(e) then return end - local op=nil - if e:GetLabel()==0 then - op=Duel.TossDice(tp,1) - else - local is_faceup=bc:IsFaceup() - op=Duel.SelectEffect(tp, - {true,aux.Stringid(id,1)}, - {is_faceup,aux.Stringid(id,2)}, - {is_faceup,aux.Stringid(id,3)}) - end - local c=e:GetHandler() - if op==1 or op==4 then - --● 1 or 4: The first time it would be destroyed by battle or card effect, it is not destroyed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(function(e,re,r,rp) return r&(REASON_BATTLE|REASON_EFFECT)>0 end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - bc:RegisterEffect(e1) - elseif op==2 or op==5 then - --● 2 or 5: It loses 500 ATK, also it is unaffected by activated Spell/Trap effects, except "Early Palm Gets the Win" - bc:UpdateAttack(-500,RESETS_STANDARD_PHASE_END,c) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,5)) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetValue(function(e,te) return te:IsActivated() and te:IsSpellTrapEffect() and not te:GetHandler():IsCode(id) end) - e2:SetReset(RESETS_STANDARD_PHASE_END) - bc:RegisterEffect(e2) - elseif op==3 or op==6 then - --● 3 or 6: It gains 1000 ATK, also it can make up to 2 attacks on monsters during each Battle Phase - bc:UpdateAttack(1000,RESETS_STANDARD_PHASE_END,c) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,6)) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e3:SetValue(1) - e3:SetReset(RESETS_STANDARD_PHASE_END) - bc:RegisterEffect(e3) - end -end \ No newline at end of file diff --git a/pre-release/c100449005.lua b/pre-release/c100449005.lua deleted file mode 100644 index 22a5d6fce4..0000000000 --- a/pre-release/c100449005.lua +++ /dev/null @@ -1,128 +0,0 @@ ---海老須神鮮まつり ---Ebisu Shinsen Matsuri ---scripted by pyrQ -local s,id=GetID() -local TOKEN_SHINSEN=id+100 -local TOKEN_EBISU=id+200 -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Special Summon 1 "Shinsen Token" (Aqua/WATER/Level 3/ATK 0/DEF 0) to its controller's opponent's field in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CUSTOM+id) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetTarget(s.shinsensptg) - e1:SetOperation(s.shinsenspop) - c:RegisterEffect(e1) - --Keep track of Special Summoned Effect Monsters - aux.GlobalCheck(s,function() - s.regspgroup=Group.CreateGroup() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(s.regop) - Duel.RegisterEffect(ge1,0) - end) - --Destroy both this card and as many Tokens on the field as possible, and if you do, Special Summon 1 "Ebisu Token" (Fairy/WATER/Level 7/ATK ?/DEF ?) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(function(e) return not e:GetHandler():HasFlagEffect(id+100) end) - e2:SetTarget(s.ebisusptg) - e2:SetOperation(s.ebisuspop) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_SHINSEN,TOKEN_EBISU} -function s.efftgfilter(c,e) - return c:IsEffectMonster() and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and (not e or c:IsCanBeEffectTarget(e)) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.efftgfilter,nil) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - if Duel.GetCurrentChain()==0 then s.regspgroup:Clear() end - s.regspgroup:Merge(tg) - s.regspgroup:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - Duel.RaiseEvent(s.regspgroup,EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.sptgfilter(c,tp) - local target_player=1-c:GetControler() - return Duel.GetLocationCount(target_player,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SHINSEN,0,TYPES_TOKEN,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,target_player) -end -function s.shinsensptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=s.regspgroup:Filter(s.efftgfilter,nil,e):Match(s.sptgfilter,nil,tp) - if chkc then return g:IsContains(chkc) and s.efftgfilter(chkc,e) end - if chk==0 then return #g>0 end - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.shinsenspop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local target_player=1-tc:GetControler() - if Duel.GetLocationCount(target_player,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SHINSEN,0,TYPES_TOKEN,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,target_player) then - local token=Duel.CreateToken(tp,TOKEN_SHINSEN) - Duel.SpecialSummon(token,0,tp,target_player,false,false,POS_FACEUP_DEFENSE) - end - end -end -function s.ebisusptg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_TOKEN) - if chk==0 then return #g>0 and Duel.GetMZoneCount(tp,g)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_EBISU,0,TYPES_TOKEN,-2,-2,7,RACE_FAIRY,ATTRIBUTE_WATER) end - local c=e:GetHandler() - c:RegisterFlagEffect(id+100,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+c,#g+1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.ebisuspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_TOKEN) - if #g==0 then return end - local des_ct=Duel.Destroy(g+c,REASON_EFFECT) - local atk_def_val=(des_ct-1)*700 - if des_ct>=2 and Duel.GetOperatedGroup():IsContains(c) - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_EBISU,0,TYPES_TOKEN,atk_def_val,atk_def_val,7,RACE_FAIRY,ATTRIBUTE_WATER) then - local token=Duel.CreateToken(tp,TOKEN_EBISU) - if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then - --This Token's ATK/DEF become the number of Tokens destroyed by this effect x 700 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk_def_val) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - token:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENSE) - token:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() - end -end \ No newline at end of file diff --git a/pre-release/c100449101.lua b/pre-release/c100449101.lua deleted file mode 100644 index 7a3f5f5d39..0000000000 --- a/pre-release/c100449101.lua +++ /dev/null @@ -1,91 +0,0 @@ ---ミラクル・エクスクルーダー ---Miracle Ejector -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,0}) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 Spell/Trap that mentions an "Elemental HERO" monster's card name from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Banish 1 card from your opponent's GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.rmtg) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN} -function s.spcostfilter(c) - return c:IsSetCard(SET_NEO_SPACIAN) and c:IsMonster() and c:IsAbleToGraveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_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) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSpellTrap() and c:ListsCodeWithArchetype(SET_ELEMENTAL_HERO) 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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100450001.lua b/pre-release/c100450001.lua deleted file mode 100644 index b1e32162de..0000000000 --- a/pre-release/c100450001.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ラーニング・エルフ ---Learning Elf ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Set 1 Trap from your Deck with an effect that equips itself to a monster - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.settg) - e1a:SetOperation(s.setop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --Draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -function s.setfilter(c) - return c:IsEquipTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c100450002.lua b/pre-release/c100450002.lua deleted file mode 100644 index cb85936edf..0000000000 --- a/pre-release/c100450002.lua +++ /dev/null @@ -1,87 +0,0 @@ ---武装転生 ---Armament Reincarnation ---scripted by pyrQ -local s,id=GetID() -local TOKEN_ARMAMENT_REINCARNATION=id+100 -function s.initial_effect(c) - --Special Summon "Armament Reincarnation Tokens" (Warrior/LIGHT/Level 1/ATK 500/DEF 500) up to the number of Equip Spells, and Traps with an effect that equip themselves to a monster, in your GY, then you can destroy as many cards in your Spell & Trap Zone as possible, including this card, then Set as many Equip Spells, and Traps with an effect that equip themselves to a monster, as possible from your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_names={TOKEN_ARMAMENT_REINCARNATION} -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.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARMAMENT_REINCARNATION,0,TYPES_TOKEN,500,500,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(aux.OR(Card.IsEquipSpell,Card.IsEquipTrap),tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) -end -function s.setfilter(c) - return (c:IsEquipSpell() or c:IsEquipTrap()) and c:IsSSetable(true) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local max_ct=Duel.GetMatchingGroupCount(aux.OR(Card.IsEquipSpell,Card.IsEquipTrap),tp,LOCATION_GRAVE,0,nil) - if ft>0 and max_ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARMAMENT_REINCARNATION,0,TYPES_TOKEN,500,500,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) then - ft=math.min(ft,max_ct) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - if ft>1 then - ft=Duel.AnnounceNumberRange(tp,1,ft) - end - for i=1,ft do - local token=Duel.CreateToken(tp,TOKEN_ARMAMENT_REINCARNATION) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - if Duel.SpecialSummonComplete()>0 and c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - local g=Duel.GetFieldGroup(tp,LOCATION_STZONE,0) - Duel.BreakEffect() - if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetOperatedGroup():IsContains(c)then - local st_zones=Duel.GetLocationCount(tp,LOCATION_SZONE,0) - if st_zones>0 then - local equip_g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,nil) - local sg=Group.CreateGroup() - if #equip_g>st_zones then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - sg=equip_g:Select(tp,st_zones,st_zones,nil) - else - sg=equip_g - end - if #sg>0 then - Duel.BreakEffect() - if Duel.SSet(tp,sg)>0 then - local set_traps=Duel.GetOperatedGroup():Match(Card.IsTrap,nil) - for sc in set_traps:Iter() do - --These Traps can be activated this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - end - end - end - end - end - end - --For the rest of this turn, you cannot Special Summon - 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:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) -end \ No newline at end of file diff --git a/pre-release/c100450003.lua b/pre-release/c100450003.lua deleted file mode 100644 index 2ddfb09739..0000000000 --- a/pre-release/c100450003.lua +++ /dev/null @@ -1,104 +0,0 @@ ---ミラーバリア ---Mirror Barrier ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Equip this card to 1 face-up monster you control as an Equip Card with this effect: ● Once per Battle Step, if the equipped monster battles an opponent's monster: You can destroy that opponent's monster. - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(aux.RemainFieldCost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_PHASE|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Add 1 "Armament Reincarnation" 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_DESTROYED) - e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={100450002} --"Armament Reincarnation" -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 chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then - --● Once per Battle Step, if the equipped monster battles an opponent's monster: You can destroy that opponent's monster. - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(s.descon) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(function(e,c) return c==tc end) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e2) - else - c:CancelToGrave(false) - end -end -function s.thfilter(c) - return c:IsCode(100450002) 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.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (Duel.IsBattleStep() and not c:HasFlagEffect(id)) then return false end - local ec=c:GetEquipTarget() - local bc=ec:GetBattleTarget() - return ec and ec:IsRelateToBattle() and bc and bc:IsControler(1-tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetEquipTarget():GetBattleTarget() - e:SetLabelObject(bc) - bc:CreateEffectRelation(e) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - if bc:IsRelateToEffect(e) and bc:IsControler(1-tp) then - Duel.Destroy(bc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100450004.lua b/pre-release/c100450004.lua deleted file mode 100644 index af7230eb11..0000000000 --- a/pre-release/c100450004.lua +++ /dev/null @@ -1,63 +0,0 @@ ---M・HERO ファウンティン ---Masked HERO Fountain ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "HERO" monster from your hand in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Set 1 "Mask Change" from your Deck or GY - 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_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.setcon) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_HERO} -s.listed_names={21143940} --"Mask Change" -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_COST) and re and re:IsActivated()) or c:IsReason(REASON_EFFECT) -end -function s.setfilter(c) - return c:IsCode(21143940) 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/c100450005.lua b/pre-release/c100450005.lua deleted file mode 100644 index 62f560e8d4..0000000000 --- a/pre-release/c100450005.lua +++ /dev/null @@ -1,81 +0,0 @@ ---猛毒マムシ ---Poisonous Viper ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon it, or if your opponent controls no monsters, Special Summon it to their field in Defense Position instead - 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:SetCost(Cost.SelfReveal) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Take 500 damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,500) end) - e2:SetOperation(function(e,tp) Duel.Damage(tp,500,REASON_EFFECT) end) - c:RegisterEffect(e2) - --Destroy 1 Set Spell/Trap your opponent controls - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,2)) - e3a:SetCategory(CATEGORY_DESTROY) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3a:SetCode(EVENT_REMOVE) - e3a:SetCountLimit(1,id) - e3a:SetTarget(s.destg) - e3a:SetOperation(s.desop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EVENT_TO_GRAVE) - e3b:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) - c:RegisterEffect(e3b) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - else - local opp=1-tp - return Duel.GetLocationCount(opp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,opp) - end - 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 - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - else - Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) - end - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local tc=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) - Duel.SetChainLimit(function(e,ep,tp) return e:GetHandler()~=tc end) -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/c100450006.lua b/pre-release/c100450006.lua deleted file mode 100644 index e975a5c441..0000000000 --- a/pre-release/c100450006.lua +++ /dev/null @@ -1,50 +0,0 @@ ---闇に堕ちた天使 ---Fallen Angel in Darkness ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Darklord" monster from your hand, Deck, or banishment, ignoring its Summoning conditions - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_DARKLORD} -function s.costfilter(c,e,tp) - return c:IsRace(RACE_FAIRY) and Duel.GetMZoneCount(tp,c)>0 and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DARKLORD) and c:IsMonster() and (c:IsLocation(LOCATION_HAND|LOCATION_DECK) or c:IsFaceup()) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mmz_chk=e:GetLabel()==-100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - e:SetLabel(0) - return mmz_chk and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED) -end -function s.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 g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100450007.lua b/pre-release/c100450007.lua deleted file mode 100644 index 4c00524a8e..0000000000 --- a/pre-release/c100450007.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ジャンク・アーマー ---Junk Armor ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Your opponent cannot target Synchro Monsters you control with "Warrior" or "Stardust" in their original names with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSynchroMonster() and c:IsOriginalSetCard({SET_WARRIOR,SET_STARDUST}) and c:IsFaceup() end) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --Special Summon it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function(e) return not e:GetHandler():IsReason(REASON_DRAW) end) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Special Summon 1 "Junk" or "Synchron" monster from your Deck in Defense Position, except "Junk Armor" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.SelfTribute) - e3:SetTarget(s.decksptg) - e3:SetOperation(s.deckspop) - c:RegisterEffect(e3) -end -s.listed_series={SET_WARRIOR,SET_STARDUST,SET_JUNK,SET_SYNCHRON} -s.listed_names={id} -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.deckspfilter(c,e,tp) - return c:IsSetCard({SET_JUNK,SET_SYNCHRON}) and not c:IsCode(id) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.deckspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c100450008.lua b/pre-release/c100450008.lua deleted file mode 100644 index 1cf0b70279..0000000000 --- a/pre-release/c100450008.lua +++ /dev/null @@ -1,112 +0,0 @@ ---ジャンク・マイスター ---Junk Meister ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.Reveal(function(c) return c:IsSetCard({SET_WARRIOR,SET_STARDUST}) and c:IsSynchroMonster() end,nil,1,1,nil,LOCATION_EXTRA)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Junk" card from your Deck to your hand, except "Junk Meister" - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Decrease the Level of 1 "Junk" monster you control by up to 2 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_series={SET_WARRIOR,SET_STARDUST,SET_JUNK} -s.listed_names={id} -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end -function s.thfilter(c) - return c:IsSetCard(SET_JUNK) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.lvfilter(c) - return c:IsSetCard(SET_JUNK) and c:IsLevelAbove(2) and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:HasLevel() then - local b1=tc:IsLevelAbove(2) - local b2=tc:IsLevelAbove(3) - local lv=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,4)}, - {b2,aux.Stringid(id,5)}) - if not lv then return end - --Decrease its Level by up to 2 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100450009.lua b/pre-release/c100450009.lua deleted file mode 100644 index f456fab3a5..0000000000 --- a/pre-release/c100450009.lua +++ /dev/null @@ -1,48 +0,0 @@ ---オーバー・チューニング ---Over Tuning ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Tuner from your hand, Deck, or GY, also you cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_TUNER),tp,LOCATION_MZONE,0,1,nil) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -function s.spfilter(c,e,tp) - return c:IsType(TYPE_TUNER) 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) -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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end \ No newline at end of file diff --git a/pre-release/c100450010.lua b/pre-release/c100450010.lua deleted file mode 100644 index 12edde4e96..0000000000 --- a/pre-release/c100450010.lua +++ /dev/null @@ -1,71 +0,0 @@ ---王者の鼓動 ---Champion's Pulse ---Scripted by The Razgriz -local s,id=GetID() -local CARD_HOT_RED_DRAGON_ARCHFIEND=39765958 -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_BATTLE_START) - c:RegisterEffect(e1) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND,CARD_HOT_RED_DRAGON_ARCHFIEND} -function s.spfilter(c,e,tp,mmz_chk) - if not (c:IsCode(CARD_RED_DRAGON_ARCHFIEND,CARD_HOT_RED_DRAGON_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_GRAVE) then - return mmz_chk - else - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsBattlePhase(1-tp) - local event_chaining,_,event_player,event_value,event_reason_effect=Duel.CheckEvent(EVENT_CHAINING,true) - local b2=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)0) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_RECOVER) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY) - e:SetLabel(op,event_value) - local rc=event_reason_effect:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,rc,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(event_reason_effect) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,tp,0) - end - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op,event_value=e:GetLabel() - if op==1 then - --Your opponent gains 1000 LP, then end the Battle Phase - if Duel.Recover(1-tp,1000,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) - end - elseif op==2 then - --Special Summon 1 "Red Dragon Archfiend" or "Hot Red Dragon Archfiend" from your Extra Deck or GY, and if you do, negate that activated effect, and if you do that, destroy that monster - local trig_eff=Duel.GetChainInfo(event_value,CHAININFO_TRIGGERING_EFFECT) - local rc=trig_eff:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.NegateEffect(event_value) - and rc:IsRelateToEffect(trig_eff) then - Duel.Destroy(rc,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100450011.lua b/pre-release/c100450011.lua deleted file mode 100644 index 0fefdbca6e..0000000000 --- a/pre-release/c100450011.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ガガガイリュージョン ---Gagaga Illusion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 monster from your GY, then you can make its Level/Rank become equal to the Level/Rank of 1 "Gagaga" 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_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,1,nil) end) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Immediately after this effect resolves, Normal Summon 1 "Gagaga" monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.nstg) - e2:SetOperation(s.nsop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GAGAGA} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,0,1,nil,e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,0,1,1,nil,e,0,tp,false,false) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.lvfilter(c,lv_rank) - local c_haslevel,c_hasrank=c:HasLevel(),c:HasRank() - if not (c:IsSetCard(SET_GAGAGA) and (c_haslevel or c_hasrank) and c:IsFaceup()) then return false end - if c_haslevel then - return not c:IsLevel(lv_rank) - elseif c_hasrank then - return not c:IsRank(lv_rank) - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - local tc_haslevel,tc_hasrank=tc:HasLevel(),tc:HasRank() - if not (tc_haslevel or tc_hasrank) then return end - local lv_rank=tc_haslevel and tc:GetLevel() or tc:GetRank() - if Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil,lv_rank) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local sc=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,lv_rank):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - local eff_code=tc_haslevel and EFFECT_CHANGE_LEVEL or EFFECT_CHANGE_RANK - local sc_lv_rank=sc:HasLevel() and sc:GetLevel() or sc:GetRank() - Duel.BreakEffect() - --Its Level/Rank become equal to the Level/Rank of 1 "Gagaga" monster you control - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(eff_code) - e1:SetValue(sc_lv_rank) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - end -end -function s.nsfilter(c) - return c:IsSetCard(SET_GAGAGA) and c:IsSummonable(true,nil) -end -function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.nsop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end -end \ No newline at end of file diff --git a/pre-release/c100450012.lua b/pre-release/c100450012.lua deleted file mode 100644 index 6207bfc072..0000000000 --- a/pre-release/c100450012.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ガガガの脱出劇 ---Gagaga Escape ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Negate the activation, then you can discard 1 card, and if you do, Special Summon 1 "Gagaga" monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Change as many "Gagaga" monsters you control as possible to Defense Position, and if you do, "Gagaga" monsters you control cannot be destroyed by battle or card effects this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.postg) - e2:SetOperation(s.posop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_GAGAGA} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsChainNegatable(ev) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)>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 - end -end -function s.posfilter(c) - return c:IsSetCard(SET_GAGAGA) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEUP_DEFENSE) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) - if #g>0 and Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)>0 then - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --"Gagaga" monsters you control cannot be destroyed by battle or card effects this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_GAGAGA) end) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - Duel.RegisterEffect(e2,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100450013.lua b/pre-release/c100450013.lua deleted file mode 100644 index ba390b3b18..0000000000 --- a/pre-release/c100450013.lua +++ /dev/null @@ -1,70 +0,0 @@ ---永遠の絆 ---Endless Bond ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can Special Summon 1 "Number 39: Utopia" from your GY, and if you do, it gains ATK equal to the total ATK of all LIGHT "Utopia" and "Utopic" Xyz Monsters in your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Make that monster you control lose 1000 ATK, and if you do, it can attack again in a row - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(s.atkcon) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - c:RegisterEffect(e2) -end -s.listed_series={SET_XYZ,SET_UTOPIA,SET_UTOPIC} -s.listed_names={84013237} --"Number 39: Utopia" -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsCode(84013237) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.utopigyfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard({SET_UTOPIA,SET_UTOPIC}) and c:IsXyzMonster() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=g:Select(tp,1,1,nil):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - local atk=Duel.GetMatchingGroup(s.utopigyfilter,tp,LOCATION_GRAVE,0,nil):GetSum(Card.GetAttack) - --It gains ATK equal to the total ATK of all LIGHT "Utopia" and "Utopic" Xyz Monsters in your GY - sc:UpdateAttack(atk,RESET_EVENT|RESETS_STANDARD,e:GetHandler()) - end - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local bc=eg:GetFirst() - return bc==Duel.GetAttacker() and bc:IsControler(tp) and bc:CanChainAttack() and bc:IsSetCard({SET_UTOPIA,SET_UTOPIC}) - and bc:IsOriginalAttribute(ATTRIBUTE_LIGHT) and bc:GetBattleTarget():IsPreviousControler(1-tp) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=eg:GetFirst() - e:SetLabelObject(bc) - bc:CreateEffectRelation(e) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - --Make that monster you control lose 1000 ATK, and if you do, it can attack again in a row - if bc:IsRelateToEffect(e) and bc:IsControler(tp) and bc:IsFaceup() and not bc:IsImmuneToEffect(e) - and bc:UpdateAttack(-1000,RESET_EVENT|RESETS_STANDARD,e:GetHandler())<0 then - Duel.ChainAttack() - end -end \ No newline at end of file diff --git a/pre-release/c100450014.lua b/pre-release/c100450014.lua deleted file mode 100644 index 07cd32b42a..0000000000 --- a/pre-release/c100450014.lua +++ /dev/null @@ -1,56 +0,0 @@ ---紫毒の茨牙 ---Thorn Fangs of Violet Poison ---Scripted by The Razgriz -local s,id=GetID() -local CARD_STARVING_VENOM_FUSION_DRAGON=41209827 -function s.initial_effect(c) - --Make 1 "Starving Venom Fusion Dragon" you control unable to attack for the rest of this turn, also destroy as many monsters your opponent controls as possible with less ATK than that monster, then you can discard your entire hand, and if you do, inflict damage to your opponent equal to the combined original ATK of those destroyed monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_PREDAP} -s.listed_names={CARD_STARVING_VENOM_FUSION_DRAGON} -function s.tgfilter(c,tp) - return c:IsCode(CARD_STARVING_VENOM_FUSION_DRAGON) and c:IsFaceup() - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackBelow,c:GetAttack()-1),tp,0,LOCATION_MZONE,1,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttackBelow,tc:GetAttack()-1),tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetSum(Card.GetBaseAttack)) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --It cannot attack for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3206) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttackBelow,tc:GetAttack()-1),tp,0,LOCATION_MZONE,nil) - local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and #hg>0 and #hg==hg:FilterCount(Card.IsDiscardable,nil,REASON_EFFECT) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - local dam=Duel.GetOperatedGroup():Match(aux.NOT(Card.IsTextAttack),nil,-2):GetSum(Card.GetTextAttack) - Duel.BreakEffect() - if Duel.SendtoGrave(hg,REASON_EFFECT|REASON_DISCARD)==#hg then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100450015.lua b/pre-release/c100450015.lua deleted file mode 100644 index 283d61c849..0000000000 --- a/pre-release/c100450015.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ペネトレーション・フュージョン ---Penetration Fusion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters from your hand or field, and if you do, it gains this effect: ● (Quick Effect): You can Tribute this card, then target 1 face-up monster you control; it gains 500 ATK. - local e1=Fusion.CreateSummonEff({handler=c,stage2=s.stage2}) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(function() return Duel.HasFlagEffect(0,id) end) - c:RegisterEffect(e1) - --Track if a monster is destroyed by battle - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DESTROYED) - ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) - Duel.RegisterEffect(ge1,0) - end) -end -function s.stage2(e,fc,tp,sg,chk) - if chk==0 then - fc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) - --Make 1 face-up monster you control gain 500 ATK - local e1=Effect.CreateEffect(fc) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(Cost.SelfTribute) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - fc:RegisterEffect(e1,true) - if not fc:IsType(TYPE_EFFECT) then - --It becomes an Effect Monster if it wasn't already - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - fc:RegisterEffect(e2,true) - end - end -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,500) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --It gains 500 ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100450016.lua b/pre-release/c100450016.lua deleted file mode 100644 index da85699c15..0000000000 --- a/pre-release/c100450016.lua +++ /dev/null @@ -1,98 +0,0 @@ ---サプライズ・フュージョン ---Surprise Fusion ---scripted by pyrQ -local s,id=GetID() -local TOKEN_SURPRISE=id+100 -function s.initial_effect(c) - --Make 1 face-up monster you control become the declared Type and Attribute, then you can Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control, including the targeted monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Tribute 1 Fusion Monster, and if you do, Special Summon 2 "Surprise Tokens" (Spellcaster/DARK/ATK 0/DEF 0) with a Level equal to the Level the Tributed monster had on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.tokentg) - e2:SetOperation(s.tokenop) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_SURPRISE} -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 chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - local race=Duel.AnnounceRace(tp,1,RACE_ALL) - local attr=tc:IsRaceExcept(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or tc:AnnounceAnotherAttribute(tp) - e:SetLabel(race,attr) - Duel.SetPossibleOperationInfo(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() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local c=e:GetHandler() - local race,attr=e:GetLabel() - if tc:IsRaceExcept(race) then - --It becomes that Type - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(race) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - if tc:IsAttributeExcept(attr) then - --It becomes that Attribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(attr) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e2) - end - if not (tc:IsRace(race) or tc:IsAttribute(attr)) then return end - local fusion_params={matfilter=Fusion.OnFieldMat,gc=tc} - if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - end - end -end -function s.tributefilter(c,tp) - return c:IsFusionMonster() and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>=2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SURPRISE,0,TYPES_TOKEN,0,0,c:GetLevel(),RACE_SPELLCASTER,ATTRIBUTE_DARK) -end -function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.CheckReleaseGroup(tp,s.tributefilter,1,false,1,true,nil,tp,nil,false,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.tokenop(e,tp,eg,ep,ev,re,r,rp) - local sc=Duel.SelectReleaseGroup(tp,s.tributefilter,1,1,false,false,true,nil,tp,nil,false,nil,tp):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - local lv=sc:GetLevel() - if Duel.Release(sc,REASON_EFFECT)>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SURPRISE,0,TYPES_TOKEN,0,0,lv,RACE_SPELLCASTER,ATTRIBUTE_DARK) then - for i=1,2 do - local token=Duel.CreateToken(tp,TOKEN_SURPRISE) - token:Level(lv) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() - end -end \ No newline at end of file diff --git a/pre-release/c100450017.lua b/pre-release/c100450017.lua deleted file mode 100644 index 375d1776dc..0000000000 --- a/pre-release/c100450017.lua +++ /dev/null @@ -1,81 +0,0 @@ ---閃刀機-アディルセイバー ---Sky Striker Mecha - Adhilsaber ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Make 1 "Sky Striker" monster on the field gain 1500 ATK - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.discardatktg) - e1:SetOperation(s.discardatkop) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - c:RegisterEffect(e1) - --Equip this card to a "Sky Striker" Link Monster as an Equip Card that gives it 1500 ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_EQUIP+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.eqatktg) - e2:SetOperation(s.eqatkop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SKY_STRIKER} -function s.discardatktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_SKY_STRIKER) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_SKY_STRIKER),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_SKY_STRIKER),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,1500) -end -function s.discardatkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --It gains 1500 ATK until the end of this turn - tc:UpdateAttack(1500,RESETS_STANDARD_PHASE_END,e:GetHandler()) - end -end -function s.eqatkfilter(c) - return c:IsSetCard(SET_SKY_STRIKER) and c:IsLinkMonster() -end -function s.eqatktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqatkfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(s.eqatkfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,s.eqpatkfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) -end -function s.eqatkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Equip(tp,c,tc) then - --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 1500 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100450018.lua b/pre-release/c100450018.lua deleted file mode 100644 index 70d8803911..0000000000 --- a/pre-release/c100450018.lua +++ /dev/null @@ -1,71 +0,0 @@ ---エンディミオンの侍女ジェニー ---Genni, the Maid of Endymion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,nil) end) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Banish 1 Spellcaster monster you control, and if you do, Special Summon 1 "Witchcrafter" monster from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.rmsptg) - e2:SetOperation(s.rmspop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_series={SET_WITCHCRAFTER} -s.listed_names={id} -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.rmfilter(c,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemove() and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.deckspfilter(c,e,tp) - return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.rmsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.rmfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.rmspop(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 Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100450019.lua b/pre-release/c100450019.lua deleted file mode 100644 index b24f155d44..0000000000 --- a/pre-release/c100450019.lua +++ /dev/null @@ -1,89 +0,0 @@ ---エンディミオン皇国 ---Endymion Empire ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: Add 1 "Regulus, the Prince of Endymion" or 1 monster that mentions it from your Deck to your hand, then if your opponent controls a monster, you can Special Summon 1 Spellcaster monster from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --If a card(s) you control would be destroyed by battle or card effect, you can destroy 1 "Regulus, the Prince of Endymion" in your hand or face-up Monster Zone instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.desreptg) - e2:SetOperation(s.desrepop) - e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) - c:RegisterEffect(e2) -end -s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION} -function s.thfilter(c) - return (c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) or (c:IsMonster() and c:ListsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION))) - 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_HAND) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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) - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end -function s.repfilter(c,tp) - return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_BATTLE|REASON_EFFECT) - and not c:IsReason(REASON_REPLACE) -end -function s.desfilter(c,e) - return c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) - and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED|STATUS_BATTLE_DESTROYED) -end -function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e) end - if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then - Duel.Hint(HINT_CARD,0,id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local sc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e):GetFirst() - e:SetLabelObject(sc) - sc:SetStatus(STATUS_DESTROY_CONFIRMED,true) - if sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - else - Duel.HintSelection(sc) - end - return true - else - return false - end -end -function s.desrepop(e,tp,eg,ep,ev,re,r,rp) - local sc=e:GetLabelObject() - sc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(sc,REASON_EFFECT|REASON_REPLACE) -end \ No newline at end of file diff --git a/pre-release/c100450020.lua b/pre-release/c100450020.lua deleted file mode 100644 index 13b4df3404..0000000000 --- a/pre-release/c100450020.lua +++ /dev/null @@ -1,86 +0,0 @@ ---レグルスの矢 ---Regulus' Arrow ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_REGULUS_THE_PRINCE_OF_ENDYMION),tp,LOCATION_ONFIELD,0,1,nil) end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Special Summon 1 "Regulus, the Prince of Endymion" or 1 monster that mentions it from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION} -function s.desfilter(c) - return c:GetBattledGroupCount()>0 -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil) - local event_chaining,_,_,event_value,reason_effect=Duel.CheckEvent(EVENT_CHAINING,true) - local reason_card=reason_effect and reason_effect:GetHandler() or nil - local b2=event_chaining and reason_effect:IsHasType(EFFECT_TYPE_ACTIVATE) - and (reason_card:IsNormalSpell() or reason_card:IsQuickPlaySpell()) - and Duel.IsChainDisablable(ev) - 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,event_value or 0) - if op==1 then - e:SetCategory(CATEGORY_DESTROY) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) - elseif op==2 then - e:SetCategory(CATEGORY_DISABLE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op,event_value=e:GetLabel() - if op==1 then - --Destroy 1 monster your opponent controls that battled this turn - 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 - elseif op==2 then - --When a Normal or Quick-Play Spell Card is activated: Negate that effect - Duel.NegateEffect(event_value) - end -end -function s.spfilter(c,e,tp) - return (c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) or c:ListsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION)) - 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 diff --git a/pre-release/c100451001.lua b/pre-release/c100451001.lua deleted file mode 100644 index e6cbf31d14..0000000000 --- a/pre-release/c100451001.lua +++ /dev/null @@ -1,73 +0,0 @@ ---王のしもべ-ブラック・マジシャン ---Dark Magician, the Pharaoh's Servant ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Change name - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e1:SetValue(CARD_DARK_MAGICIAN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.Reveal(function(c) return c:IsSpell() end)) - e2:SetTarget(s.hsptg) - e2:SetOperation(s.hspop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetCost(Cost.Discard(function(c) return c:IsSpell() end)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) - c:RegisterEffect(e3) -end -s.listed_names={CARD_DARK_MAGICIAN} -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) -end -function s.setfilter(c) - return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and c:IsSSetable() -end -function s.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SSet(tp,sg) - end - end - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100451004.lua b/pre-release/c100451004.lua deleted file mode 100644 index 94070de536..0000000000 --- a/pre-release/c100451004.lua +++ /dev/null @@ -1,74 +0,0 @@ ---F・HERO シャイニング・フレア・ウィングマン ---Favorite HERO Shining Flare Wingman ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Fusion Monster + 1 face-up monster on the field - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),s.matfilter) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW|CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) - --Inflict damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdcon) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.matfilter(c) - return c:IsFaceup() and c:IsOnField() -end -function s.tdfilter(c) - return c:IsMonster() and c:IsAbleToDeck() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) - and Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) - if #g~=5 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 then - if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - Duel.BreakEffect() - if Duel.Draw(p,d,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then - c:UpdateAttack(1000) - end - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c100451007.lua b/pre-release/c100451007.lua deleted file mode 100644 index 1f8566084b..0000000000 --- a/pre-release/c100451007.lua +++ /dev/null @@ -1,89 +0,0 @@ ---スターダスト・ドラゴン-ヴィクテム・サンクチュアリ ---Stardust Dragon - Victim Sanctuary ---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) - --When your opponent activates a card or effect in response to your card or effect activation (Quick Effect): You can Tribute this card; negate that opponent's effect, and if you do, destroy that card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.discon) - e1:SetCost(Cost.AND(aux.StardustCost,Cost.HardOncePerChain(id))) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --If a monster(s) in your possession was Tributed this turn (Quick Effect): You can banish this card from your GY; Special Summon 1 "Stardust" Synchro 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_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id+100) end) - e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.HardOncePerChain(id))) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) - --Keep track of monsters being Tributed - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_RELEASE) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_STARDUST} -function s.checkfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(s.checkfilter,nil) - if g:IsExists(Card.IsPreviousControler,1,nil,0) then - Duel.RegisterFlagEffect(0,id+100,RESET_PHASE|PHASE_END,0,1) - end - if g:IsExists(Card.IsPreviousControler,1,nil,1) then - Duel.RegisterFlagEffect(1,id+100,RESET_PHASE|PHASE_END,0,1) - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local ch=Duel.GetCurrentChain()-1 - return ch>0 and ep==1-tp and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER)==tp and Duel.IsChainDisablable(ev) -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 -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_STARDUST) and c:IsSynchroMonster() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.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 g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100451010.lua b/pre-release/c100451010.lua deleted file mode 100644 index 7df68f2449..0000000000 --- a/pre-release/c100451010.lua +++ /dev/null @@ -1,104 +0,0 @@ ---No.39 光の使者 希望皇ホープ ---Number 39: Utopia the Envoy of Light ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters - Xyz.AddProcedure(c,nil,4,2) - --Cannot be destroyed by battle, except with a "Number" monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) - c:RegisterEffect(e1) - --(Quick Effect): You can detach 1 material from this card, then target 1 monster you control; the first time it would be destroyed by battle or card effect this turn, it is not destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.DetachFromSelf(1)) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) - --When the second attack of this turn is declared: You can make this card gain 2500 ATK, and if you do, it gains this effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(function() return Duel.GetFlagEffect(0,id)==1 end) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) - --Keep track of attacks being declared - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_NUMBER} -s.xyz_number=39 -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - --The first time it would be destroyed by battle or card effect this turn, it is not destroyed - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3001) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(s.indesval) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.indesval(e,re,r,rp) - if r&(REASON_BATTLE|REASON_EFFECT)>0 then - e:Reset() - return true - end - return false -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --This card gains 2500 ATK - c:UpdateAttack(2500) - --When this card destroys a monster by battle and sends it to the GY: You can Special Summon it to your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdgcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,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/c100451013.lua b/pre-release/c100451013.lua deleted file mode 100644 index 5aa26c910d..0000000000 --- a/pre-release/c100451013.lua +++ /dev/null @@ -1,130 +0,0 @@ ---四天の龍 オッドアイズ・ペンデュラム・ドラゴン ---Odd-Eyes Pendulum Dragon of the Four Heavenly Dragons ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --search and destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY|CATEGORY_TOHAND|CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - e2:SetValue(s.atkval) - c:RegisterEffect(e2) - --double damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - c:RegisterEffect(e3) - --to hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.thcon2) - e4:SetTarget(s.thtg2) - e4:SetOperation(s.thop2) - c:RegisterEffect(e4) -end -function s.thfilter(c) - return c:IsPendulumMonster() and c:IsAttackBelow(1500) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 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 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetLabelObject(e1) - e0:SetOperation(s.checkop) - e0:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e0,tp) -end -function s.actlimit(e,re) - local rc=re:GetHandler() - return rc and rc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() -end -function s.psfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local ef=e:GetLabelObject() - if ef and eg and eg:IsExists(s.psfilter,1,nil,tp) then - ef:Reset() - e:Reset() - end -end -function s.atkval(e,c) - local pg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_PZONE,0) - if #pg~=2 then return 0 end - local pc1,pc2=pg:GetFirst(),pg:GetNext() - return math.abs(pc1:GetScale()-pc2:GetScale())*300 -end -function s.thcon2(e,tp,eg,ep,ev,re,r,rp) - return r&(REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - if rp==1-tp then - e:SetLabel(1) - else - e:SetLabel(0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - if e:GetLabel()==1 then - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) - end -end -function s.thop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 - and e:GetLabel()==1 and c:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451016.lua b/pre-release/c100451016.lua deleted file mode 100644 index ceef53244d..0000000000 --- a/pre-release/c100451016.lua +++ /dev/null @@ -1,74 +0,0 @@ ---デコード・トーカー・インテグレーション ---Decode Talker Integration ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_EMZONE) - e1:SetValue(s.atkval) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_EMZONE) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetCost(s.cost) - e3:SetTarget(s.target) - e3:SetOperation(s.operation) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsLinkMonster,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,e:GetHandler())*500 -end -function s.cfilter(c,g) - return g:IsContains(c) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local lg=e:GetHandler():GetLinkedGroup() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,lg) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,lg) - Duel.Release(g,REASON_COST) -end -function s.filter(c) - return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil) - if #g==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - 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/c100451019.lua b/pre-release/c100451019.lua deleted file mode 100644 index d3ccd4dfdb..0000000000 --- a/pre-release/c100451019.lua +++ /dev/null @@ -1,90 +0,0 @@ ---黄泉天輪 ---Underworld Circle ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Allow each player to Special Summon 1 monster from their GY during the Standby Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,5,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_GRAVE,5,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spnormalfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - local rg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToRemove,Card.IsMonster),tp,LOCATION_DECK,LOCATION_DECK,nil) - if #rg==0 then return end - Duel.BreakEffect() - if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.ignoresumconsp(e,p) - if Duel.GetLocationCount(p,LOCATION_MZONE)==0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,p,LOCATION_GRAVE,0,nil,e,p) - if #g==0 or not Duel.SelectYesNo(p,aux.Stringid(id,3)) then return end - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) - local tc=g:Select(p,1,1,nil):GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,p,p,true,false,POS_FACEUP) then - --Banish it if it leaves the field - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - tc:RegisterEffect(e1,true) - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local turn_p=Duel.GetTurnPlayer() - s.ignoresumconsp(e,turn_p) - s.ignoresumconsp(e,1-turn_p) - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100451025.lua b/pre-release/c100451025.lua deleted file mode 100644 index 66b9443318..0000000000 --- a/pre-release/c100451025.lua +++ /dev/null @@ -1,112 +0,0 @@ ---大精霊機巧軍-ペンデュラム・ルーラー ---Master Spirit Tech Force - Pendulum Ruler ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c,false) - --Fusion Materials: 1 Level 7 or higher Pendulum Monster + 1 Pendulum Monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) - --During your Main Phase: You can return this card to the Extra Deck, then you can add 1 Level 7 Pendulum Monster from your Deck or face-up Extra 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_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.textg) - e1:SetOperation(s.texop) - 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:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Your opponent's monsters cannot attack, except Pendulum Monsters without a Level - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(function(e,c) return not (c:IsPendulumMonster() and not c:HasLevel()) end) - e3:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e3) - --You can Tribute 1 monster, then target 1 card your opponent controls; destroy it, and if you do, inflict 1600 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(2,{id,1}) - e4:SetCost(s.descost) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) - --Once per turn: You can place this card in your Pendulum Zone - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,2)) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e5:SetOperation(s.plop) - c:RegisterEffect(e5) -end -function s.matfilter(c,fc,sumtype,tp) - return c:IsLevelAbove(7) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) -end -function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.thfilter(c) - return c:IsLevel(7) and c:IsPendulumMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToHand() -end -function s.texop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.descostfilter(c,tp) - local exg=c:GetEquipGroup()+c - return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,exg) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,1,false,nil,nil,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,1,1,false,nil,nil,tp) - Duel.Release(g,REASON_COST) -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) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1600,REASON_EFFECT) - end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c100452001.lua b/pre-release/c100452001.lua deleted file mode 100644 index 20708329b8..0000000000 --- a/pre-release/c100452001.lua +++ /dev/null @@ -1,94 +0,0 @@ ---白き幻獣-青眼の白龍 ---Blue-Eyes White Dragon, the White Phantom Beast ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When a card or effect is activated that targets this card on the field (Quick Effect): You can discard 1 card; negate that effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.discon) - e1:SetCost(Cost.Discard()) - e1:SetTarget(s.distg) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e1) - --When this card is added from the Deck to your hand, or your monster is destroyed by battle: You can reveal this card in your hand; Special Summon it - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_TO_HAND) - e2a:SetCountLimit(1,{id,0}) - e2a:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_DECK) end) - e2a:SetCost(Cost.SelfReveal) - e2a:SetTarget(s.sptg) - e2a:SetOperation(s.spop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2b:SetCode(EVENT_BATTLE_DESTROYED) - e2b:SetRange(LOCATION_HAND) - e2b:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsPreviousControler,1,nil,tp) end) - c:RegisterEffect(e2b) - --If this card is Special Summoned from the hand or Deck: You can destroy all monsters your opponent controls, also you cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND|LOCATION_DECK) end) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLUE_EYES} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(c) 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,0,0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) - --You cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_BLUE_EYES) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100452004.lua b/pre-release/c100452004.lua deleted file mode 100644 index d61e3dab89..0000000000 --- a/pre-release/c100452004.lua +++ /dev/null @@ -1,69 +0,0 @@ ---終撃竜-サイバー・エンド・ドラゴン ---Cyber End Dragon the Decisive Strike Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Machine monsters with 2100 or more ATK - Fusion.AddProcMixN(c,true,true,s.matfilter,3) - c:AddMustBeFusionSummoned() - --material check - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(s.valcheck) - c:RegisterEffect(e0) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e0:GetLabel()==1 end) - e1:SetCost(Cost.PayLP(4000)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --extra att - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EXTRA_ATTACK) - e3:SetCondition(s.atcon) - e3:SetValue(2) - c:RegisterEffect(e3) -end -s.listed_names={23171610} -function s.matfilter(c,sc,st,tp) - return c:IsRace(RACE_MACHINE,sc,st,tp) and c:IsAttackAbove(2100) -end -function s.valcheck(e,c) - local mg=c:GetMaterial() - e:SetLabel(mg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)==#mg and 1 or 0) -end -function s.thfilter(c) - return c:IsCode(23171610) 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.atcon(e) - local c=e:GetHandler() - return c:GetAttack()>c:GetBaseAttack() -end \ No newline at end of file diff --git a/pre-release/c100452007.lua b/pre-release/c100452007.lua deleted file mode 100644 index 75211ae5e5..0000000000 --- a/pre-release/c100452007.lua +++ /dev/null @@ -1,94 +0,0 @@ ---赤き竜-ケッツァーコアトル ---Crimson Dragon Quetzacoatl ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --special summon - 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,0}) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.atkval) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOEXTRA|CATEGORY_NEGATE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.negcon) - e3:SetTarget(s.negtg) - e3:SetOperation(s.negop) - c:RegisterEffect(e3) -end -function s.spfilter(c,e,tp) - return c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),#g) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end - if ft>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon 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) - Duel.RegisterEffect(e1,tp) -end -function s.atkval(e,c) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()):GetSum(Card.GetBaseAttack) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and rp==1-tp and re:IsMonsterEffect() -end -function s.negfilter(c) - return c:IsFaceup() and c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.negfilter,tp,LOCATION_MZONE,0,1,1,exc) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then - Duel.NegateActivation(ev) - end -end \ No newline at end of file diff --git a/pre-release/c100452010.lua b/pre-release/c100452010.lua deleted file mode 100644 index b39ef063a8..0000000000 --- a/pre-release/c100452010.lua +++ /dev/null @@ -1,97 +0,0 @@ ---超銀河眼の光子龍-フォトン・ハウリング ---Neo Galaxy-Eyes Photon Dragon - Photon Howling ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 8 monsters OR 1 Rank 8 Xyz Monster - Xyz.AddProcedure(c,nil,8,3,s.altmatfilter,aux.Stringid(id,0),3,s.xyzop) - --Take 1 "Photon" monster from your Deck, and either Special Summon it in Defense Position or attach it to this card as material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - 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:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetTarget(s.spattachtg) - e1:SetOperation(s.spattachop) - c:RegisterEffect(e1) - --Tribute 1 other Xyz Monster, and if you do, negate the effects of all other face-up cards currently on the field until the end of this turn. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.DetachFromSelf(3)) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_series={SET_PHOTON} -function s.altmatfilter(c,tp,xyzc) - return c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRank(8) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - return true -end -function s.spcheck(c,e,tp,mmz_chk) - return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.attachcheck(c,e,tp) - return c:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) -end -function s.spattachfilter(c,e,tp,mmz_chk) - return c:IsSetCard(SET_PHOTON) and c:IsMonster() and (s.spcheck(c,e,tp,mmz_chk) or s.attachcheck(c,e,tp)) -end -function s.spattachtg(e,tp,eg,ep,ev,re,r,rp,chk) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chk==0 then return Duel.IsExistingMatchingCard(s.spattachfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_chk) end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spattachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,s.spattachfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not sc then return end - local b1=s.spcheck(sc,e,tp,mmz_chk) - local b2=s.attachcheck(sc,e,tp) and c:IsRelateToEffect(e) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,4)}, --"Special Summon it in Defense Position" - {b2,aux.Stringid(id,5)}) --"Attach it to this card as material" - if op==1 then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - elseif op==2 then - Duel.Overlay(c,sc,true) - end -end -function s.xyzfilter(c,self_exc) - return c:IsXyzMonster() and c:IsReleasableByEffect() - and Duel.IsExistingMatchingCard(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,self_exc)) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,c,c) end - local g=Duel.GetMatchingGroup(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g-1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,exc,exc) - if not sc then return end - Duel.HintSelection(sc) - if Duel.Release(sc,REASON_EFFECT)>0 then - local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) - --Negate the effects of all other face-up cards currently on the field until the end of this turn - for tc in g:Iter() do - tc:NegateEffects(c,RESET_PHASE|PHASE_END) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452013.lua b/pre-release/c100452013.lua deleted file mode 100644 index 8f7fb64afc..0000000000 --- a/pre-release/c100452013.lua +++ /dev/null @@ -1,76 +0,0 @@ ---四天の龍 スターヴ・ヴェノム・フュージョン・ドラゴン ---Starving Venom Fusion Dragon of the Four Heavenly Dragons ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 DARK monsters on the field - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - --atk to 0 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --fusion summon - local fusion_params={ - handler=c, - fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) end, - matfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsOnField() end, - extrafil=s.fextra, - gc=Fusion.ForcedHandler - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_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:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) -end -s.listed_series={SET_PREDAPLANT} -s.material_location=LOCATION_ONFIELD -function s.matfilter(c,fc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsOnField() -end -function s.atkfilter(c) - return c:IsFaceup() and (c:HasNonZeroAttack() or c:IsNegatableMonster() or c:IsAttributeExcept(ATTRIBUTE_DARK)) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:NegateEffects(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(ATTRIBUTE_DARK) - tc:RegisterEffect(e2) - end -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) -end \ No newline at end of file diff --git a/pre-release/c100452016.lua b/pre-release/c100452016.lua deleted file mode 100644 index 1e6cd93973..0000000000 --- a/pre-release/c100452016.lua +++ /dev/null @@ -1,77 +0,0 @@ ---ヴァレルロード・L・ドラゴン ---Borreload Liberator Dragon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 3+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) - --You can only Special Summon "Borreload Liberator Dragon(s)" once per turn - c:SetSPSummonOnce(id) - --Place 1 monster your opponent controls in a zone this card points to and take control of it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(function() return Duel.IsBattlePhase() end) - e1:SetTarget(s.controltg) - e1:SetOperation(s.controlop) - e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_PHASE|TIMING_BATTLE_END) - c:RegisterEffect(e1) - --Destroy 1 monster you control and Special Summon itself from the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) - c:RegisterEffect(e2) -end -function s.controlfilter(c,zones) - return c:IsControlerCanBeChanged(false,zones) -end -function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk) - local zones=e:GetHandler():GetLinkedZone()&ZONES_MMZ - if chk==0 then return Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil,zones) end - Duel.SetChainLimit(function(e,ep,tp) return tp==ep end) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function s.controlop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local zones=c:GetLinkedZone()&ZONES_MMZ - if not (c:IsRelateToEffect(e) and zones~=0) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil,zones) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp,0,0,zones) - end -end -function s.desfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100452024.lua b/pre-release/c100452024.lua deleted file mode 100644 index e41fcf7161..0000000000 --- a/pre-release/c100452024.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ガトリング・オーガ ---Gatling Ogre ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Inflict 800 damage to your damage for each facedow Spell/Trap Card sent to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(3,id) - e1:SetCost(s.damcost) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --When this card is targeted for an attack: Inflict 500 damage for each Attack Position monster they control, then end the Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.damendbptg) - e2:SetOperation(s.damendbpop) - c:RegisterEffect(e2) -end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,nil) - if chk==0 then return #g>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,1,#g,nil) - e:SetLabel(#g) - Duel.SendtoGrave(g,REASON_COST) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetLabel()*800 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - --Your opponent takes no damage from non-Fiend monsters' effects for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetTargetRange(0,1) - e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.damval(e,re,val,r,rp,rc) - if re and r&REASON_EFFECT>0 and re:IsMonsterEffect() and re:GetHandler():IsRaceExcept(RACE_FIEND) then - return 0 - else - return val - end -end -function s.damendbptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) - if chk==0 then return ct>0 end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) -end -function s.damendbpop(e,tp,eg,ep,ev,re,r,rp) - local dam=500*Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) - if dam>0 and Duel.Damage(1-tp,dam,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) - end -end \ No newline at end of file diff --git a/pre-release/c100452025.lua b/pre-release/c100452025.lua deleted file mode 100644 index c5bf946b79..0000000000 --- a/pre-release/c100452025.lua +++ /dev/null @@ -1,94 +0,0 @@ ---インフェルニティ・デス・ガンマン ---Infernity Doom Slinger ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --During your Main Phase: You can Special Summon 1 Fiend monster 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_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If you have no cards in your hand (Quick Effect): You can banish this card from your GY; your opponent chooses 1 of these effects for you to apply - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,4000) end) - e2:SetOperation(s.effop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_FIEND) 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 -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local top_card=Duel.GetDecktopGroup(tp,1):GetFirst() - local b1=top_card - local b2=true - local op=Duel.SelectEffect(1-tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - local c=e:GetHandler() - if op==1 then - --Reveal the top card of your Deck, and if it is a monster, your opponent takes any effect damage you would have taken this turn instead. Otherwise, you take 4000 damage - Duel.ConfirmDecktop(tp,1) - if top_card:IsMonster() then - --Your opponent takes any effect damage you would have taken this turn instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(function(e,_,_,r) return (r&REASON_EFFECT)==REASON_EFFECT end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - else - Duel.Damage(tp,4000,REASON_EFFECT) - end - elseif op==2 then - --You take no effect damage this turn - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,5)) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2a:SetCode(EFFECT_CHANGE_DAMAGE) - e2a:SetTargetRange(1,0) - e2a:SetValue(s.damval) - e2a:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2a,tp) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_NO_EFFECT_DAMAGE) - Duel.RegisterEffect(e2b,tp) - end -end -function s.damval(e,re,val,r,rp,rc) - if (r&REASON_EFFECT)>0 then - return 0 - else - return val - end -end \ No newline at end of file diff --git a/pre-release/c101304005.lua b/pre-release/c101304005.lua deleted file mode 100644 index ba8c58e3b7..0000000000 --- a/pre-release/c101304005.lua +++ /dev/null @@ -1,92 +0,0 @@ ---バスターソニック・ウォリアー ---Assault Sonic Warrior ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If you control "Junk Warrior", "Assault Mode Activate", or a card that mentions either of them: You can 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,0}) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can add 1 "Synchron" monster or "Assault Mode Activate" from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --If this card is sent to the GY as Synchro Material: You can activate this effect; this turn, monsters you control gain 500 ATK - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SYNCHRON} -s.listed_names={CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE} -function s.spconfilter(c) - return (c:IsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE)) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) -end -function s.thfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return ((c:IsSetCard(SET_SYNCHRON) and c:IsMonster()) or c:IsCode(CARD_ASSAULT_MODE)) 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.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --This turn, monsters you control gain 500 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(500) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101304006.lua b/pre-release/c101304006.lua deleted file mode 100644 index 78f1d5b09f..0000000000 --- a/pre-release/c101304006.lua +++ /dev/null @@ -1,88 +0,0 @@ ---重装騎士バベルデッカー ---Heavy Knight Babel Decker ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Normal Summon this card without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(s.ntcon) - c:RegisterEffect(e1) - --Special Summon 1 EARTH Machine monster from your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,0}) - e2a:SetTarget(s.handsptg) - e2a:SetOperation(s.handspop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Special Summon 1 Rank 10 EARTH Machine Xyz Monster from your Extra Deck using this card you control as material (this is treated as an Xyz Summon) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) - e3:SetTarget(s.extrasptg) - e3:SetOperation(s.extraspop) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,aux.FALSE) -end -function s.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:IsLevelAbove(4) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function s.handspfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.handspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.handspfilter,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 -function s.extraspfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(10) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) - and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.extrasptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) - and Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.extraspop(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.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c):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 - xc:CompleteProcedure() - end -end \ No newline at end of file diff --git a/pre-release/c101304007.lua b/pre-release/c101304007.lua deleted file mode 100644 index 7552558ffa..0000000000 --- a/pre-release/c101304007.lua +++ /dev/null @@ -1,78 +0,0 @@ ---夜光列車ブルートラベラー ---Noctilucent Train Bleu Traveler ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Train Connection" or "Revolving Switchyard" 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_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon both 1 other EARTH Machine monster in your GY and this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={60879050,76136345} --"Train Connection", "Revolving Switchyard" -function s.thfilter(c) - return c:IsCode(60879050,76136345) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.SpecialSummon(Group.FromCards(c,tc),0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine 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_MACHINE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101304008.lua b/pre-release/c101304008.lua deleted file mode 100644 index c1dea0bda5..0000000000 --- a/pre-release/c101304008.lua +++ /dev/null @@ -1,97 +0,0 @@ ---捕食植物テッポウリザード ---Predaplant Lilizard ---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_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --1 face-up monster becomes DARK until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.attg) - e2:SetOperation(s.atop) - c:RegisterEffect(e2) - --Draw 1 card if this card is Special Summoned from the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_GRAVE) end) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) -end -s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} -s.listed_names={CARD_POLYMERIZATION} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_PREDAPLANT,SET_STARVING_VENOM}),tp,LOCATION_MZONE,0,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - if #sg==0 then return end - Duel.BreakEffect() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end -end -function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttributeExcept(ATTRIBUTE_DARK) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.atop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - --It becomes DARK until the end of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(ATTRIBUTE_DARK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/pre-release/c101304009.lua b/pre-release/c101304009.lua deleted file mode 100644 index 5028a19f87..0000000000 --- a/pre-release/c101304009.lua +++ /dev/null @@ -1,98 +0,0 @@ ---捕食植物ロンギネフィラ ---Predaplant Longinephila ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Predap" card from your Deck to your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.thtg) - e1a:SetOperation(s.thop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --Activate 1 of the following effects (Place Predator Counter, Set "Polymerization" from GY or banishment) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_PREDAP} -s.listed_names={CARD_POLYMERIZATION,id} -s.counter_place_list={COUNTER_PREDATOR} -function s.predapthfilter(c) - return c:IsSetCard(SET_PREDAP) 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.predapthfilter,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.predapthfilter,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.predctfilter(c) - return c:IsFaceup() and c:IsCanAddCounter(COUNTER_PREDATOR,1) -end -function s.polysetfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsFaceup() and c:IsSSetable() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=Duel.IsExistingMatchingCard(s.polysetfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_COUNTER) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_PREDATOR) - elseif op==2 then - Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Place 1 Predator Counter on 1 monster on the field and make it Level 1 so long as it has a Predator Counter if it is Level 2 or higher - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) - local tc=Duel.SelectMatchingCard(tp,s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if not tc then return end - Duel.HintSelection(tc) - if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then - --It becomes Level 1 as long as it has a Predator Counter - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - elseif op==2 then - --Set 1 "Polymerization" from your GY or banishment - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.polysetfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #sg>0 then - Duel.HintSelection(sg) - Duel.SSet(tp,sg) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304016.lua b/pre-release/c101304016.lua deleted file mode 100644 index 212144217c..0000000000 --- a/pre-release/c101304016.lua +++ /dev/null @@ -1,107 +0,0 @@ ---妖精伝姫-マチリル ---Fairy Tail - Matchlille ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand or GY, also you cannot Special Summon for the rest of this turn, except Spellcaster monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Fairy Tail" Spell/Trap from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Make the name of 1 Effect Monster your opponent controls become "Fairy Prince" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.PayLP(500)) - e3:SetTarget(s.namechangetg) - e3:SetOperation(s.namechangeop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" -function s.spconfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsBaseAttack(1850) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon for the rest of this turn, except Spellcaster monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsSpellTrap()) or c:IsCode(91957038)) 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.namechangefilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsCode(CARD_FAIRY_PRINCE) -end -function s.namechangetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.namechangefilter,tp,0,LOCATION_MZONE,1,nil) end -end -function s.namechangeop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - local sc=Duel.SelectMatchingCard(tp,s.namechangefilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --Its name becomes "Fairy Prince" - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304017.lua b/pre-release/c101304017.lua deleted file mode 100644 index 3f52755d71..0000000000 --- a/pre-release/c101304017.lua +++ /dev/null @@ -1,91 +0,0 @@ ---ミミグル・フラワー ---Mimighoul Flower -local s,id=GetID() -function s.initial_effect(c) - --FLIP: Apply these effects in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --During your Main Phase: You can Special Summon this card from your hand to your opponent's field in face-down Defense Position, or if a face-down monster is on the field, you can Special Summon this card face-up on your field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MIMIGHOUL} -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - if c:IsAbleToChangeControler() then - Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_DECK) -end -function s.thfilter(c) - return (c:IsType(TYPE_FLIP) or c:IsSetCard(SET_MIMIGHOUL)) and c:IsAbleToHand() -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - local break_chk=false - --Your opponent can add 1 Flip monster or "Mimighoul" card from their Deck to their hand - local opp=1-tp - if Duel.IsExistingMatchingCard(s.thfilter,opp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(opp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(opp,s.thfilter,opp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - break_chk=true - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(tp,g) - Duel.ShuffleHand(opp) - end - end - --Give control of this card to your opponent - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if break_chk then Duel.BreakEffect() end - Duel.GetControl(c,opp) - end -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return (Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)) - or (Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local b1=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp) - local b2=Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - local op=nil - if b1 and b2 then - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - else - op=(b1 and 1) or (b2 and 2) or 1 - end - if op==1 then - if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)==0 then return end - Duel.ConfirmCards(tp,c) - elseif op==2 then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101304018.lua b/pre-release/c101304018.lua deleted file mode 100644 index 9d88d0014c..0000000000 --- a/pre-release/c101304018.lua +++ /dev/null @@ -1,65 +0,0 @@ ---見えざる手マキブエル ---Hecahands Makibel -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --You can reveal this card in your hand; Fusion Summon 1 "Hecahands" Fusion Monster from your Extra Deck, using monsters from your hand or field, including this card in the hand - local fusion_params={ - handler=c, - fusfilter=function(c) return c:IsSetCard(SET_HECAHANDS) end, - gc=Fusion.ForcedHandler - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) - --If an Illusion Fusion Monster(s) is sent to your GY while this card is in your GY: You can add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_HECAHANDS} -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.thconfilter(c,tp) - return c:IsRace(RACE_ILLUSION) and c:IsFusionMonster() and c:IsControler(tp) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.thconfilter,1,nil,tp) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304022.lua b/pre-release/c101304022.lua deleted file mode 100644 index b6afd02f8d..0000000000 --- a/pre-release/c101304022.lua +++ /dev/null @@ -1,107 +0,0 @@ ---精霊術の使い魔 ---Familiars of the Spiritual Arts ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --search - 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --change type/attribute - 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.chngtg) - e3:SetOperation(s.chngop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(s.spcon) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -s.listed_names={38057522} -s.listed_series={SET_FAMILIAR_POSSESSED,SET_POSSESSED } -function s.thfilter(c) - return c:IsAbleToHand() and (c:IsCode(38057522) or (c:IsSpellTrap() and c:IsSetCard(SET_POSSESSED))) -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.chngtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local race=Duel.AnnounceRace(tp,1,RACE_ALL) - local attr=c:IsRaceExcept(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or c:AnnounceAnotherAttribute(tp) - e:SetLabel(race,attr) -end -function s.chngop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if (not c:IsFaceup() and c:IsRelateToEffect(e)) then return end - local race,attr=e:GetLabel() - if c:IsRaceExcept(race) then - --Change its Monster Type - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(race) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end - if c:IsAttributeExcept(attr) then - --Change its Attribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(attr) - e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e2) - end -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return r&(REASON_BATTLE|REASON_EFFECT)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) 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|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101304023.lua b/pre-release/c101304023.lua deleted file mode 100644 index 83e8574428..0000000000 --- a/pre-release/c101304023.lua +++ /dev/null @@ -1,90 +0,0 @@ ---仮初の幻臉師 ---Transient Masquerader of Illusion -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can send 1 Fiend, Illusion, or Spellcaster monster from your Deck to the GY, then you can change this card's Type to the sent monster's original Type - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOGRAVE) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.tgtg) - e1a:SetOperation(s.tgop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --If this card battles a monster, neither can be destroyed by that battle - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(s.indestg) - e2:SetValue(1) - c:RegisterEffect(e2) - --If this card is in your GY: You can banish 1 Spell from your GY; Special Summon this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e3:SetCost(s.spcost) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -function s.tgfilter(c) - return c:IsRace(RACE_FIEND|RACE_ILLUSION|RACE_SPELLCASTER) 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) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then - local original_type=sc:GetOriginalRace() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsRaceExcept(original_type) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - --Change this card's Type to the sent monster's original Type - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(original_type) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - end -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.spcostfilter(c) - return c:IsSpell() and c:IsAbleToRemoveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101304024.lua b/pre-release/c101304024.lua deleted file mode 100644 index 575e710188..0000000000 --- a/pre-release/c101304024.lua +++ /dev/null @@ -1,106 +0,0 @@ ---調和ノ天救竜 ---Fidraulis Harmonia ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect on the field (Quick Effect): You can reveal this card in your hand and up to 5 Synchro Monsters in your Extra Deck; apply these effects in sequence based on the total number revealed, also you cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.effcon) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE -end -function s.revealfilter(c) - return c:IsSynchroMonster() and not c:IsPublic() -end -function s.rescon(sg,e,tp,mg) - local b1=#sg==1 - local b2=#sg==3 and sg:IsExists(Card.IsAbleToGrave,1,nil) - local b3=#sg==5 and sg:IsExists(Card.IsAbleToGrave,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - return b1 or b2 or b3 -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.revealfilter,tp,LOCATION_EXTRA,0,nil) - if chk==0 then return not c:IsPublic() and #g>0 end - local max_reveal_count=math.min(#g,5) - local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,s.rescon,1,tp,HINTMSG_CONFIRM,s.rescon) - Duel.ConfirmCards(1-tp,c) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleExtra(tp) - e:SetLabel(#sg+1) - e:SetLabelObject(sg) - for sc in sg:Iter() do - sc:CreateEffectRelation(e) - end -end -function s.efftg(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 - local reveal_count=e:GetLabel() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - if reveal_count>=4 then - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) - end - if reveal_count==6 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,0,LOCATION_MZONE),1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local break_chk=false - local reveal_count=e:GetLabel() - if reveal_count>=2 and c:IsRelateToEffect(e) then - --● 2+: Special Summon this card - break_chk=true - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - if reveal_count>=4 then - --● 4+: Send 1 of the revealed Synchro Monsters to the GY - local revealed_synchros=e:GetLabelObject():Match(Card.IsRelateToEffect,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=revealed_synchros:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) - if #g>0 then - if break_chk then Duel.BreakEffect() end - break_chk=true - Duel.SendtoGrave(g,REASON_EFFECT) - end - end - if reveal_count==6 then - --● 6: Destroy 1 monster your opponent controls - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - if break_chk then Duel.BreakEffect() end - Duel.Destroy(g,REASON_EFFECT) - end - end - local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 - --You cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) - Duel.RegisterEffect(e1,tp) -end -function s.aclimit(e,re,tp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_EXTRA) - and not rc:IsSynchroMonster() -end \ No newline at end of file diff --git a/pre-release/c101304025.lua b/pre-release/c101304025.lua deleted file mode 100644 index 1f4cd2a08e..0000000000 --- a/pre-release/c101304025.lua +++ /dev/null @@ -1,89 +0,0 @@ ---妖光のディアーブロッケン ---Diabrocken of the Ghost Light ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --(Quick Effect): You can banish 1 FIRE monster from your face-up field or GY; Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If this card is Special Summoned: You can target 1 face-up card on the field; negate its effects until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --If this card is sent to the GY as Link Material: You can Set 1 Quick-Play Spell or Normal Trap from your GY that was sent there this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LEAVE_GRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -function s.spcostfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsFaceup() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return 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,1,tp,tp,false,false,POS_FACEUP) - end -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsNegatable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) - end -end -function s.setfilter(c,turn_count) - return (c:IsQuickPlaySpell() or c:IsNormalTrap()) and c:GetTurnID()==turn_count 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_GRAVE,0,1,nil,Duel.GetTurnCount()) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,Duel.GetTurnCount()) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101304026.lua b/pre-release/c101304026.lua deleted file mode 100644 index 4655f1ee50..0000000000 --- a/pre-release/c101304026.lua +++ /dev/null @@ -1,79 +0,0 @@ ---コンベックス・ナイト ---Convex Knight ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If a Machine monster is on the field and this card is in your hand: You can Special Summon this card in Defense Position, then you can make its Level become equal to the Level/Rank of 1 Machine monster on the field - 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,0}) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During your Main Phase: You can send 1 EARTH Machine monster from your Deck to the GY, then this card gains ATK equal to the sent monster's Level x 100 until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) -end -function s.lvfilter(c,lv) - return ((c:HasLevel() and not c:IsLevel(lv)) or (c:HasRank() and not c:IsRank(lv))) - and c:IsRace(RACE_MACHINE) and c:IsFaceup() -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local lv=c:GetLevel() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 - and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lv) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local sc=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - local lv_rnk=(sc:HasLevel() and sc:GetLevel()) - or (sc:HasRank() and sc:GetRank()) - Duel.BreakEffect() - --Make its Level become equal to the Level/Rank of 1 Machine monster on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv_rnk) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end -function s.tgfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,0) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) - and c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.BreakEffect() - --This card gains ATK equal to the sent monster's Level x 100 until the end of this turn - c:UpdateAttack(sc:GetLevel()*100,RESETS_STANDARD_DISABLE_PHASE_END) - end -end \ No newline at end of file diff --git a/pre-release/c101304027.lua b/pre-release/c101304027.lua deleted file mode 100644 index 84d3b9607e..0000000000 --- a/pre-release/c101304027.lua +++ /dev/null @@ -1,100 +0,0 @@ ---血樹竜姫ドラセレア ---Draselea the Blood Tree Dragon Princess ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can send 1 Level 4 or lower Plant monster from your Deck to the GY, except "Draselea the Blood Tree Dragon Princess"; Special Summon this card from your hand, and if you do, its Level becomes the sent monster's - 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,0}) - e1:SetCost(Cost.AND(s.selfspcost,s.effcost)) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --You can banish this card and 1 Plant monster from your GY; Special Summon 1 Dragon monster from your hand or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(s.dragonspcost,s.effcost)) - e2:SetTarget(s.dragonsptg) - e2:SetOperation(s.dragonspop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_DRAGON|RACE_PLANT) end) -end -s.listed_names={id} -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon the turn you activate either of this card's effects, except Dragon or Plant monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_DRAGON|RACE_PLANT) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.selfspcostfilter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and not c:IsCode(id) and c:IsAbleToGraveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - Duel.SendtoGrave(sc,REASON_COST) - e:SetLabel(sc:GetLevel()) -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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - --Its Level becomes the sent monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end -function s.dragonspcostfilter(c,e,tp,handler) - return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.dragonspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,Group.FromCards(c,handler),e,tp) -end -function s.dragonspfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.dragonspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp,c) - Duel.Remove(g+c,POS_FACEUP,REASON_COST) -end -function s.dragonsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.dragonspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) -end -function s.dragonspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dragonspfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101304030.lua b/pre-release/c101304030.lua deleted file mode 100644 index 12fad1219d..0000000000 --- a/pre-release/c101304030.lua +++ /dev/null @@ -1,79 +0,0 @@ ---デス・レジーナ・デーモン ---Doom Regina Archfiend ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c) - c:AddMustBeRitualSummoned() - --You can target 1 "Archfiend" Spell/Trap in your GY or banishment; destroy this card, and if you do, add the targeted card to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If this card is Ritual Summoned: You can destroy as many Spells/Traps your opponent controls as possible, then if this card is in the Extra Monster Zone, you can banish all Spells and Traps from your opponent's GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --Unaffected by other monsters' effects while in the Extra Monster Zone - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetRange(LOCATION_EMZONE) - e3:SetValue(function(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end) - c:RegisterEffect(e3) -end -s.listed_series={SET_ARCHFIEND} -s.listed_names={63679166} --"Throne of Archfiends" -function s.thfilter(c) - return c:IsSetCard(SET_ARCHFIEND) and c:IsSpellTrap() and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_REMOVED) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsInExtraMZone() - and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local rg=Duel.GetMatchingGroup(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,nil) - if #rg>0 then - Duel.BreakEffect() - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304031.lua b/pre-release/c101304031.lua deleted file mode 100644 index d51da63c4d..0000000000 --- a/pre-release/c101304031.lua +++ /dev/null @@ -1,118 +0,0 @@ ---覇王暴竜スターヴ・ヴェノム・ウィング・ドラゴン ---Starving Venom Wing Dragon ---Scripted By The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c,false) - --Fusion Materials: 1 Fusion Monster + 1 "Clear Wing" monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CLEAR_WING)) - --Place Predator Counters on monsters Special Summoned to your opponent's field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_PZONE) - e1:SetOperation(s.counterplaceop) - c:RegisterEffect(e1) - --If your opponent Special Summons a monster(s): You can target 1 of them; this card gains ATK equal to its ATK, and its effects are negated. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.atknegeffcon) - e2:SetTarget(s.atknegefftg) - e2:SetOperation(s.atknegeffop) - c:RegisterEffect(e2) - --When another card or effect is activated on the field: You can destroy 1 card on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_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 re:GetHandler()~=e:GetHandler() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD>0 end) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) - --Place itself into Pendulum Zone if it is destroyed - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end local c=e:GetHandler() if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) end end) - e4:SetOperation(s.penop) - c:RegisterEffect(e4) -end -s.listed_series={SET_CLEAR_WING} -s.material_setcode={SET_CLEAR_WING} -s.counter_place_list={COUNTER_PREDATOR} -function s.counterplaceop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=eg:Filter(Card.IsControler,nil,1-tp) - for tc in g:Iter() do - if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then - --It becomes Level 1 as long as it has a Predator Counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - end -end -function s.atknegefffilter(c,e,tp) - return c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) and c:HasNonZeroAttack() -end -function s.atknegeffcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.atknegefffilter,1,nil,e,tp) -end -function s.atknegefftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and s.atknegefffilter(chkc,e,tp) end - if chk==0 then return eg:IsExists(s.atknegefffilter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local tc=nil - if #eg==1 then - tc=eg:GetFirst() - Duel.SetTargetCard(tc) - else - tc=eg:FilterSelect(tp,s.atknegefffilter,1,1,nil,e,tp) - Duel.SetTargetCard(tc) - end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) -end -function s.atknegeffop(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() - and c:UpdateAttack(tc:GetAttack(),RESETS_STANDARD_DISABLE_PHASE_END) and tc:IsNegatableMonster() then - tc:NegateEffects(c,RESETS_STANDARD_PHASE_END) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD),1,tp,LOCATION_ONFIELD) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end -function s.penop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101304033.lua b/pre-release/c101304033.lua deleted file mode 100644 index 775975c06f..0000000000 --- a/pre-release/c101304033.lua +++ /dev/null @@ -1,95 +0,0 @@ ---妖精伝姫を紡ぐ者 ---Weaver of Fairy Tail Tales ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Fairy Tail" monster + 1 Spellcaster monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FAIRY_TAIL),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) - --Special Summon 1 "Fairy Tail" monster from your Deck 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_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_DISABLE) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2a:SetCondition(s.discon) - e2a:SetTarget(s.distg) - e2a:SetOperation(s.disop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Every "Fairy Prince" on the field becomes Spellcaster - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CHANGE_RACE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(function(e,c) return c:IsCode(CARD_FAIRY_PRINCE) end) - e3:SetValue(RACE_SPELLCASTER) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} -s.material_setcode={SET_FAIRY_TAIL} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_REMOVED) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.disconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsAttributeExcept(ATTRIBUTE_EARTH) and c:IsSetCard(SET_FAIRY_TAIL) and c:IsFaceup() -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.disconfilter,1,nil,tp) -end -function s.disfilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local c=e:GetHandler() - --Negate its effects - tc:NegateEffects(c) - --Its name becomes "Fairy Prince" - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end diff --git a/pre-release/c101304034.lua b/pre-release/c101304034.lua deleted file mode 100644 index 98440fdf4e..0000000000 --- a/pre-release/c101304034.lua +++ /dev/null @@ -1,92 +0,0 @@ ---妖精伝姫を語る者 ---Chronicler of Fairy Tail Tales ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 LIGHT "Fairy Tail" monster + 1 Spellcaster monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) - --Your "Fairy Tail" monsters cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Destroy as many cards your opponent controls as possible, and if you do, inflict 500 damage to your opponent for each card destroyed - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SPSUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,0}) - e2a:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()==1 end) - e2a:SetTarget(s.destg) - e2a:SetOperation(s.desop) - c:RegisterEffect(e2a) - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_SINGLE) - e2b:SetCode(EFFECT_MATERIAL_CHECK) - e2b:SetValue(function(e,c) e2a:SetLabel(c:GetMaterial():IsExists(Card.IsCode,1,nil,CARD_FAIRY_PRINCE) and 1 or 0) end) - c:RegisterEffect(e2b) - --Negate the activation of an opponent's card or effect, and if you do, destroy that card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) - e3:SetCost(s.negcost) - e3:SetTarget(s.negtg) - e3:SetOperation(s.negop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} -s.material_setcode={SET_FAIRY_TAIL} -function s.matfilter(c,fc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT,fc,sumtype,tp) and c:IsSetCard(SET_FAIRY_TAIL,fc,sumtype,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if #g>0 then - local dam=Duel.Destroy(g,REASON_EFFECT)*500 - if dam>0 then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end -function s.negcostfilter(c) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToRemoveAsCost() -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - 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/c101304035.lua b/pre-release/c101304035.lua deleted file mode 100644 index 9a2cdd0aac..0000000000 --- a/pre-release/c101304035.lua +++ /dev/null @@ -1,54 +0,0 @@ ---見えざる手ダンダロス ---Hecahands Dandalos -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 "Hecahands" monsters - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECAHANDS),2) - --You can target 1 monster your opponent controls; take control of it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.ctrltg) - e1:SetOperation(s.ctrlop) - c:RegisterEffect(e1) - --Your "Hecahands" Fusion Monsters and your monsters that are owned by your opponent can attack directly - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(function(e,c) return (c:IsSetCard(SET_HECAHANDS) and c:IsFusionMonster()) or c:IsOwner(1-e:GetHandlerPlayer()) end) - c:RegisterEffect(e2) - --If this card battles a monster, neither can be destroyed by that battle - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(s.indestg) - e3:SetValue(1) - c:RegisterEffect(e3) -end -s.listed_series={SET_HECAHANDS} -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) -end -function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.GetControl(tc,tp) - end -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end \ No newline at end of file diff --git a/pre-release/c101304038.lua b/pre-release/c101304038.lua deleted file mode 100644 index 0b2593706a..0000000000 --- a/pre-release/c101304038.lua +++ /dev/null @@ -1,96 +0,0 @@ ---スカーレッド・ハイパーノヴァ・ドラゴン ---Red Hypernova Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 4 Tuners + 1+ non-Tuner Synchro Monsters - Synchro.AddProcedure(c,nil,4,4,Synchro.NonTunerEx(Card.IsType,TYPE_SYNCHRO),1,99) - --Multiple Tuners - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_MULTIPLE_TUNERS) - c:RegisterEffect(e0) - --Must first be Synchro Summoned with the above materials - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(s.splimit) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.atkval) - c:RegisterEffect(e2) - --cannot target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetValue(aux.tgoval) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(aux.indoval) - c:RegisterEffect(e4) - --banish - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetCategory(CATEGORY_REMOVE|CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(s.rmtg) - e5:SetOperation(s.rmop) - e5:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e5) -end -s.listed_names={97489701} -s.synchro_nt_required=1 -function s.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or ((st&SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO and not se) -end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_TUNER)*500 -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemove() end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) - g:AddCard(c) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spfilter(c,e,tp) - return c:IsCode(97489701) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) - if c:IsRelateToEffect(e) and c:IsAbleToRemove() then g:AddCard(c) end - if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then - local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if #sg>=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=sg:Select(tp,1,1,nil):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - Duel.BreakEffect() - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101304039.lua b/pre-release/c101304039.lua deleted file mode 100644 index 5b05d48756..0000000000 --- a/pre-release/c101304039.lua +++ /dev/null @@ -1,67 +0,0 @@ ---捕食植物バアル・テア ---Predaplant Baalthea ---Scripted by The Razgriz -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 "Predaplant" or "Starving Venom" monster from your face-up Extra Deck or GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Fusion Summon 1 Fusion Monster, using monsters from your hand or field as material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) - e2:SetCost(s.fuscost) - e2:SetTarget(Fusion.SummonEffTG()) - e2:SetOperation(Fusion.SummonEffOP()) - c:RegisterEffect(e2) -end -s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} -s.listed_names={CARD_POLYMERIZATION} -function s.spfilter(c,e,tp) - if not (c:IsSetCard({SET_PREDAPLANT,SET_STARVING_VENOM}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_GRAVE) then - return Duel.GetMZoneCount(tp)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.fuscostfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToRemoveAsCost() -end -function s.fuscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.fuscostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.fuscostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/pre-release/c101304043.lua b/pre-release/c101304043.lua deleted file mode 100644 index 40446fbcdc..0000000000 --- a/pre-release/c101304043.lua +++ /dev/null @@ -1,88 +0,0 @@ ---超弩級砲塔列車グスタフ・ロケット ---Superdreadnought Rail Cannon Gustav Rocket ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 10 monsters, OR by discarding 1 card and using "Superdreadnought Rail Cannon Gustav Max" you control - Xyz.AddProcedure(c,nil,10,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) - --Negate that effect, and if you do, destroy that monster, then inflict 1000 damage to your opponent - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.discon) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --Detach 1 material from this card or destroy it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.detachtg) - e2:SetOperation(s.detachop) - c:RegisterEffect(e2) -end -s.listed_names={id,56910167} --"Superdreadnought Rail Cannon Gustav Max" -function s.ovfilter(c,tp,xyzc) - return c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,56910167) and c:IsFaceup() -end -function s.xyzop(e,tp,chk,mc) - if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sc=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) - if sc and Duel.SendtoGrave(sc,REASON_DISCARD|REASON_COST)>0 then - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - else - return false - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and e:GetHandler():GetOverlayCount()>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) - local rc=re:GetHandler() - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end -function s.detachtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - if c:GetOverlayCount()==0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) -end -function s.detachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local b1=c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) - local b2=true - --Detach 1 material from this card or destroy it - local op=b1 and Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) or 2 - if op==1 then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - elseif op==2 then - Duel.Destroy(c,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304044.lua b/pre-release/c101304044.lua deleted file mode 100644 index 526d42f3a1..0000000000 --- a/pre-release/c101304044.lua +++ /dev/null @@ -1,72 +0,0 @@ ---超弩級砲塔列車フライング・ランチャー ---Superdreadnought Rail Cannon Flying Launcher ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 10 monsters - Xyz.AddProcedure(c,nil,10,2) - --You can Normal Summon 1 Machine monster during your Main Phase each turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsRace(RACE_MACHINE) end) - c:RegisterEffect(e1) - --Add 1 EARTH Machine monster or "Barrage Blast" from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Destroy Spells/Traps on the field equal to the number of materials detached - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetTargetCount(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) end,function(e,og) e:SetLabel(#og) end)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_names={51369889} --"Barrage Blast" -function s.thfilter(c) - return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)) or c:IsCode(51369889)) 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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304047.lua b/pre-release/c101304047.lua deleted file mode 100644 index 06ff71ea9f..0000000000 --- a/pre-release/c101304047.lua +++ /dev/null @@ -1,83 +0,0 @@ ---妖精伝姫-ウィキャット ---Fairy Tail - Wickat ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 Spellcaster monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,2) - --"Fairy Tail" monsters you control whose original Attribute is LIGHT are unaffected by your opponent's activated effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) end) - e1:SetValue(function(e,te) return te:GetOwnerPlayer()==1-e:GetHandlerPlayer() and te:IsActivated() end) - c:RegisterEffect(e1) - --Send that many "Fairy Tail" cards from your Deck to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.DetachFromSelf(1,s.tgmaxcost,function(e,og) e:SetLabel(#og) end)) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) - --Special Summon this card, and if you do, send that monster to the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -function s.tgfilter(c) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToGrave() -end -function s.tgmaxcost(e,tp) - return math.min(2,Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil)) -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,e:GetLabel(),tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,ct,ct,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.sptgfilter(c) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave() and c:IsFaceup() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.sptgfilter(chkc,tp) end - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.sptgfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,s.sptgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304048.lua b/pre-release/c101304048.lua deleted file mode 100644 index 9b1d9b83b8..0000000000 --- a/pre-release/c101304048.lua +++ /dev/null @@ -1,71 +0,0 @@ ---黒智天至イリスフィール ---Cherubidamn Irisfiel ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 8 monsters, OR 1 Xyz Monster you control that has not activated its effect in the Monster Zone this turn - Xyz.AddProcedure(c,nil,8,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop) - --Keep track of Xyz Monsters that have activated their effect in the Monster Zone each turn - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_CHAIN_SOLVED) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) - --If this card is Xyz Summoned: You can activate this effect; this turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --If this card would be destroyed by battle or card effect, you can detach 1 material from a monster you control instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.reptg) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.ovfilter(c,tp,xyzc) - return c:IsXyzMonster() and not c:HasFlagEffect(id) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if re:IsMonsterEffect() and rc:IsXyzMonster() and rc:IsRelateToEffect(re) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE then - rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) - end -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --This turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(function(e,c) return c:IsXyzMonster() end) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(function() return Duel.IsBattlePhase() end) - e1:SetValue(function(e,c) return c:GetRank()*100 end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) - and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end - return Duel.SelectEffectYesNo(tp,c,96) and Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)>0 -end \ No newline at end of file diff --git a/pre-release/c101304049.lua b/pre-release/c101304049.lua deleted file mode 100644 index c4b6304fb3..0000000000 --- a/pre-release/c101304049.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ブリーチヴァレル・ドラゴン ---Breechborrel Dragon ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 DARK Dragon monsters, including a "Rokket" monster - Link.AddProcedure(c,s.matfilter,2,nil,s.matcheck) - --If this card is Link Summoned: You can add 1 "Borrel" Spell/Trap from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --(Quick Effect): You can target 1 DARK monster you control; it gains 500 ATK, or if that monster is no longer on the field, you can Special Summon 1 "Rokket" monster from your Deck in Defense Position instead - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.StatChangeDamageStepCondition) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_BORREL,SET_ROKKET} -function s.matfilter(c,linkc,st,tp) - return c:IsAttribute(ATTRIBUTE_DARK,linkc,st,tp) and c:IsRace(RACE_DRAGON,linkc,st,tp) -end -function s.matcheck(g,linkc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,SET_ROKKET,linkc,sumtype,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_BORREL) 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 -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttribute(ATTRIBUTE_DARK) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if tc:IsFacedown() then return end - --It gains 500 ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - elseif Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) 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_DEFENSE) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304050.lua b/pre-release/c101304050.lua deleted file mode 100644 index a095808a80..0000000000 --- a/pre-release/c101304050.lua +++ /dev/null @@ -1,69 +0,0 @@ ---四花繚乱の霊使い ---Four Charmers in Profusion ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters - Link.AddProcedure(c,nil,2) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return 300*Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil):GetBinClassCount(Card.GetAttribute) end) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET|EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spchk(sg,e,tp) - local t=sg:GetClassCount(Card.GetRace) - local a=sg:GetClassCount(Card.GetAttribute) - return (t==1 and a==#sg) or (a==1 and t==#sg) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,0) end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,1,tp,HINTMSG_SPSUMMON) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,#sg,0,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e) - if #tg==2 and Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)>0 then - local g=Duel.GetOperatedGroup() - if c:IsRelateToEffect(e) then g=g+c end - for tc in g:Iter() do - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_BE_MATERIAL) - e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) - e1:SetReset(RESETS_STANDARD_PHASE_END,2) - tc:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304051.lua b/pre-release/c101304051.lua deleted file mode 100644 index f2b9af54e3..0000000000 --- a/pre-release/c101304051.lua +++ /dev/null @@ -1,88 +0,0 @@ ---神書の使いラハムゥ ---Lahamu the Messenger of Sacred Scripture ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) - --Once while this Link Summoned card is face-up on the field, you can Normal Summon 1 Level 5 or higher monster without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.ntcon) - e1:SetTarget(aux.FieldSummonProcTg(function(e,c) return c:IsLevelAbove(5) end)) - c:RegisterEffect(e1) - --During the Main Phase, you can (Quick Effect): Immediately after this effect resolves, Normal Summon 1 Level 5 or higher DARK monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.nstg) - e2:SetOperation(s.nsop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) - --During your End Phase: You can reveal any number of monsters in your hand and place them on the bottom of the Deck in any order, then draw the same number of cards - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) -end -function s.ntcon(e,c,minc) - if c==nil then return true end - return e:GetHandler():IsLinkSummoned() and minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function s.nsfilter(c) - return c:IsSummonable(true,nil) and c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) -end -function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.nsop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_HAND,0,1,nil) - and Duel.IsPlayerCanDraw(tp) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local target_player=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local max_count=Duel.GetMatchingGroupCount(aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,nil) - if max_count==0 then return end - Duel.Hint(HINT_SELECTMSG,target_player,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(target_player,aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,1,max_count,nil) - if #g>0 then - Duel.ConfirmCards(1-target_player,g) - local draw_count=Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - if draw_count>0 then - if draw_count>1 then Duel.SortDeckbottom(target_player,target_player,draw_count) end - Duel.BreakEffect() - Duel.Draw(target_player,draw_count,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304053.lua b/pre-release/c101304053.lua deleted file mode 100644 index c9b2b3f27d..0000000000 --- a/pre-release/c101304053.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ジャンク・シグナル ---Junk Signal ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_names={CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON} -function s.spcostfilter(c,e,tp) - return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) -end -function s.spfilter(c,e,tp) - return (c:IsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) - local ex,_,event_player,event_value,event_reff=Duel.CheckEvent(EVENT_CHAINING,true) - local trig_player,trig_type=nil - if ex then - trig_player,trig_type=Duel.GetChainInfo(event_value-1,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE) - end - local b2=ex and event_player==1-tp and Duel.IsChainDisablable(event_value) and trig_player==tp and trig_type&TYPE_SYNCHRO>0 - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst() - Duel.Release(sc,REASON_COST) - e:SetLabelObject(sc) - sc:CreateEffectRelation(e) - elseif op==2 then - e:SetLabel(op,event_value) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local op=e:GetLabel() - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - elseif op==2 then - e:SetCategory(CATEGORY_DISABLE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op,event_value=e:GetLabel() - if op==1 then - --Tribute 1 monster; Special Summon 1 "Junk Warrior", 1 "Stardust Dragon", or 1 monster that mentions either of them from your hand, Deck, or GY, except the Tributed monster - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sc=e:GetLabelObject() - local exc=sc:IsRelateToEffect(e) and sc or nil - 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,exc,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --When your opponent activates a card or effect in response to the activation of your Synchro Monster's effect: Negate that opponent's effect - Duel.NegateEffect(event_value) - end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end \ No newline at end of file diff --git a/pre-release/c101304054.lua b/pre-release/c101304054.lua deleted file mode 100644 index 76a2b1f12e..0000000000 --- a/pre-release/c101304054.lua +++ /dev/null @@ -1,79 +0,0 @@ ---特別ダイヤ ---Exceptional Schedule ---scripted by pyrQ -local s,id=GetID() -local TOKEN_SCHEDULE=id+100 -function s.initial_effect(c) - --Add 1 "Special Schedule" or "Urgent Schedule" from your Deck to your hand, then you can Special Summon 1 "Schedule Token" (Machine/EARTH/Level 10/ATK 3000/DEF 3000) to your opponent's field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Send 1 card you control to the GY, and if you do, Special Summon that Level 10 Machine monster in your GY or banishment - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={97520701,25274141,TOKEN_SCHEDULE} --"Special Schedule, "Urgent Schedule" -function s.thfilter(c) - return c:IsCode(97520701,25274141) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local 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.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCHEDULE,0,TYPES_TOKEN,3000,3000,10,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local token=Duel.CreateToken(tp,TOKEN_SCHEDULE) - Duel.BreakEffect() - Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP) - end - end -end -function s.tgfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGrave() -end -function s.spfilter(c,e,tp) - return c:IsLevel(10) and c:IsRace(RACE_MACHINE) 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_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - 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_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) - 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() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and 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/c101304055.lua b/pre-release/c101304055.lua deleted file mode 100644 index 46e767e7b1..0000000000 --- a/pre-release/c101304055.lua +++ /dev/null @@ -1,86 +0,0 @@ ---捕食原生 ---Predaprimitive ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Send 1 "Predap" card from your Deck to the GY; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --You can banish this card from your GY, then target 1 Fusion monster you control; destroy it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(s.descon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_FUSION,SET_PREDAP} -s.listed_names={id} -function s.tgfilter(c,tp) - return c:IsSetCard(SET_PREDAP) and c:IsAbleToGraveAsCost() and not c:IsCode(id) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,c) -end -function s.thfilter(c) - return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp) - Duel.SendtoGrave(g,REASON_COST) -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 - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon monsters for the rest of the this turn after this card resolves, except Plant and Dragon monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_PLANT|RACE_DRAGON) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function s.desfilter(c) - return c:IsFaceup() and c:IsFusionMonster() -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304062.lua b/pre-release/c101304062.lua deleted file mode 100644 index 0c37494807..0000000000 --- a/pre-release/c101304062.lua +++ /dev/null @@ -1,92 +0,0 @@ ---妖精伝姫のはじまりはじまり ---Fairy Tail Long Long Ago ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon up to 1 LIGHT "Fairy Tail" monster each from your hand, GY, and banishment, with different names, also you cannot Special Summon for the rest of this turn, except Spellcaster monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Set this card, but it cannot be activated unless you control a "Fairy Tail" monster - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_REMOVE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.settg) - e2a:SetOperation(s.setop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_TO_GRAVE) - e2b:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - c:RegisterEffect(e2b) -end -s.listed_series={SET_FAIRY_TAIL} -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) -end -function s.spcheck(sg,e,tp,mg) - local ct1=sg:GetClassCount(Card.GetCode) - local ct2=sg:GetClassCount(Card.GetLocation) - local ct3=#sg - return ct1==ct3 and ct2==ct3,ct1~=ct3 or ct2~=ct3 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>0 then - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) - if #g>0 then - ft=math.min(ft,3) - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.spcheck,1,tp,HINTMSG_SPSUMMON) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - end - --You cannot Special Summon for the rest of this turn, except Spellcaster monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SSet(tp,c)>0 then - --It cannot be activated unless you control a "Fairy Tail" monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetCondition(function() return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304063.lua b/pre-release/c101304063.lua deleted file mode 100644 index c8481f8a3d..0000000000 --- a/pre-release/c101304063.lua +++ /dev/null @@ -1,80 +0,0 @@ ---妖精伝姫の舞踏会 ---Fairy Tail Ball ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can add 1 "Fairy Tail" monster or "Fairy Tail Tales" from your Deck or banishment 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) - --Your "Fairy Tail" monsters can attack directly - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FAIRY_TAIL)) - c:RegisterEffect(e2) - --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" -function s.thfilter(c) - return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsMonster()) or c:IsCode(91957038)) and c:IsAbleToHand() - and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,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|LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.disfilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local c=e:GetHandler() - --Negate its effects - tc:NegateEffects(c) - --Its name becomes "Fairy Prince" - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304064.lua b/pre-release/c101304064.lua deleted file mode 100644 index 87d24d4647..0000000000 --- a/pre-release/c101304064.lua +++ /dev/null @@ -1,66 +0,0 @@ ---テールズオブ妖精伝姫 ---Tales of Fairy Tail ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - aux.AddEquipProcedure(c) - --The equipped monster gains 1000 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - c:RegisterEffect(e1) - --Fusion Summon 1 Spellcaster Fusion Monster from your Extra Deck, using monsters from your hand or field, when you do, you can also use any "Fairy Prince" your opponent controls - local fusion_params={ - handler=c, - fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER), - extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FaceupFilter(Card.IsCode,CARD_FAIRY_PRINCE)),tp,0,LOCATION_ONFIELD,nil) end - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) - --Equip this card to a "Fairy Tail" monster on the field, then immediately after this effect resolves, you can Normal Summon 1 Spellcaster monster with 1850 ATK - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,id) - e3:SetTarget(s.eqtg) - e3:SetOperation(s.eqop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) -end -function s.nsfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttack(1850) and c:IsSummonable(true,nil) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.Equip(tp,c,sc) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local nsc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if nsc then - Duel.Summon(tp,nsc,true,nil) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101304066.lua b/pre-release/c101304066.lua deleted file mode 100644 index dd4177cdd1..0000000000 --- a/pre-release/c101304066.lua +++ /dev/null @@ -1,70 +0,0 @@ ---憑依共鳴 ---Possessed Resonance ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.postg) - e2:SetOperation(s.posop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED} -function s.filter(c,e,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetAttribute()) -end -function s.spfilter(c,e,tp,att) - return c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) and c:IsAttribute(att) - and c:IsCanBeSpecialSummoned(e,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetAttribute()) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 - and tc:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - end - end -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCanChangePosition() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end \ No newline at end of file diff --git a/pre-release/c101304067.lua b/pre-release/c101304067.lua deleted file mode 100644 index a33bef0108..0000000000 --- a/pre-release/c101304067.lua +++ /dev/null @@ -1,71 +0,0 @@ ---デーモンの簒奪 ---Archfiend Usurpation ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_ARCHFIEND} -function s.setfilter(c) - return c:IsSetCard(SET_ARCHFIEND) and c:IsTrap() and c:IsSSetable(true) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local b1=((e:GetHandler():IsLocation(LOCATION_SZONE) and ft>0) or ft>1) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) - local ritual_params={ - lvtype=RITPROC_GREATER, - filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), - location=LOCATION_HAND|LOCATION_EXTRA - } - local b2=Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,0) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(0) - elseif op==2 then - e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,1) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Set 1 "Archfiend" Trap from your Deck or GY, it can be activated this turn - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - elseif op==2 then - --Ritual Summon 1 "Archfiend" Ritual Monster from your hand or face-up Extra Deck, by Tributing monsters from your hand or field whose total Levels equal or exceed its Level - local ritual_params={ - lvtype=RITPROC_GREATER, - filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), - location=LOCATION_HAND|LOCATION_EXTRA - } - Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) - end -end \ No newline at end of file diff --git a/pre-release/c101304069.lua b/pre-release/c101304069.lua deleted file mode 100644 index 88a54c49fa..0000000000 --- a/pre-release/c101304069.lua +++ /dev/null @@ -1,71 +0,0 @@ ---超逸融合 ---Apex Polymerization ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_FUSION_SUMMON|CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(Cost.PayLP(2000)) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.filter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,tc) - return c:IsRace(tc:GetRace()) and c:IsAttribute(tc:GetAttribute()) - and c:HasLevel() and not c:IsLevel(tc:GetLevel()) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - Duel.SetChainLimit(aux.FALSE) - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - sc:NegateEffects(e:GetHandler()) - Duel.BreakEffect() - local fusion_params={matfilter=Fusion.OnFieldMat,extrafil=s.fextra(tc,sc)} - local b1=Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) - local b2=sc:IsAbleToGrave() - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - if op==1 then - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - elseif op==2 then - Duel.SendtoGrave(sc,REASON_EFFECT) - end - end -end -function s.fextra(tc,sc) - return function(e,tp,mg) - return Group.FromCards(tc),s.fcheck(tc,sc) - end -end -function s.fcheck(tc,sc) - return function(tp,sg,fc) - return #sg==2 and sg:IsContains(tc) and sg:IsContains(sc) - end -end diff --git a/pre-release/c101304075.lua b/pre-release/c101304075.lua deleted file mode 100644 index b546a2048c..0000000000 --- a/pre-release/c101304075.lua +++ /dev/null @@ -1,70 +0,0 @@ ---見えざる導き手 ---Bayt'al-Hecahands -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) - --You can Tribute 1 monster you control that is a "Hecahands" monster or a monster owned by your opponent; take control of 1 monster your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,id) - e1:SetCost(s.ctrlcost) - e1:SetTarget(s.ctrltg) - e1:SetOperation(s.ctrlop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Once per turn, during your End Phase: Send 1 card you control to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -s.listed_series={SET_HECAHANDS} -function s.ctrlcostfilter(c,tp,opp) - return (c:IsSetCard(SET_HECAHANDS) or c:IsOwner(opp)) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 - and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,c) -end -function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk) - local opp=1-tp - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.ctrlcostfilter,1,false,nil,nil,tp,opp) end - local g=Duel.SelectReleaseGroupCost(tp,s.ctrlcostfilter,1,1,false,nil,nil,tp,opp) - Duel.Release(g,REASON_COST) -end -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp) - end -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304076.lua b/pre-release/c101304076.lua deleted file mode 100644 index 8cff5ab402..0000000000 --- a/pre-release/c101304076.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ノーザンクロスファイア ---Northern Cross Fire ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If the total Levels of monsters you control are 10 or higher: Take 1 Level 10 monster from your hand or Deck, and either add it to your hand or Special Summon it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>=10 end) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If the total Levels of monsters your opponent controls are 10 or higher: You can banish this card and 1 Level 10 monster from your GY, then target 1 card your opponent controls; banish it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(Card.GetLevel)>=10 end) - e2:SetCost(s.bancost) - e2:SetTarget(s.bantg) - e2:SetOperation(s.banop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -function s.thspfilter(c,e,tp,sp_chk) - return c:IsLevel(10) and (c:IsAbleToHand() or (sp_chk 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 - local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,sp_chk) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,sp_chk):GetFirst() - if not sc then return end - aux.ToHandOrElse(sc,tp, - function() return sp_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function() Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,3) - ) -end -function s.bancostfilter(c) - return c:IsLevel(10) and c:IsAbleToRemoveAsCost() -end -function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.bancostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.bancostfilter,tp,LOCATION_GRAVE,0,1,1,c) - Duel.Remove(g+c,POS_FACEUP,REASON_COST) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.banop(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/c101304101.lua b/pre-release/c101304101.lua deleted file mode 100644 index 84294b58b0..0000000000 --- a/pre-release/c101304101.lua +++ /dev/null @@ -1,103 +0,0 @@ ---ダークネス・リゾネーター ---Darkness Resonator ---Scripted by Eerie Code -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,0}) - e1:SetCost(Cost.Reveal(function(c) return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) end,nil,1,1,nil,LOCATION_EXTRA)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Apply a "during your Main Phase this turn, you can Normal Summon 1 "Resonator" monster in addition to your Normal Summon/Set (you can only gain this effect once per turn)" effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsPlayerCanAdditionalSummon(tp) end) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSummon(tp) end end) - e2:SetOperation(s.extransop) - c:RegisterEffect(e2) - --Change the Levels of any number of Tuners you control to 1 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -s.listed_series={SET_RESONATOR} -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end -function s.extransop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,4)) - --During your Main Phase this turn, you can Normal Summon 1 "Resonator" monster in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,5)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_RESONATOR) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.lvfilter(c) - return c:IsType(TYPE_TUNER) and not c:IsLevel(1) and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - local max_ct=Duel.GetTargetCount(s.lvfilter,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,max_ct,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e) - for tc in tg:Iter() do - --Their Levels become 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCategory(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304102.lua b/pre-release/c101304102.lua deleted file mode 100644 index 85f371a4e2..0000000000 --- a/pre-release/c101304102.lua +++ /dev/null @@ -1,97 +0,0 @@ ---パワー・バイス・ドラゴン ---Power Vice Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --A "Red Dragon Archfiend" that was Synchro Summoned using this card as material cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsCode(CARD_RED_DRAGON_ARCHFIEND) end) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Resonator" 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_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -s.listed_series={SET_RESONATOR} -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetDescription(3000) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - rc:RegisterEffect(e1) -end -function s.spconfilter(c) - return not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsFaceup()) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_RESONATOR) 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 - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK Synchro monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster()) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not (c:IsOriginalAttribute(ATTRIBUTE_DARK) and c:IsOriginalType(TYPE_SYNCHRO)) end) -end \ No newline at end of file diff --git a/pre-release/c101304103.lua b/pre-release/c101304103.lua deleted file mode 100644 index e092ccd86d..0000000000 --- a/pre-release/c101304103.lua +++ /dev/null @@ -1,93 +0,0 @@ ---デモン・ピース・ゴーレム ---Fiend Piece Golem ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Decrease this card's Level by up to 2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LVCHANGE) - 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(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLevelAbove(2) end end) - e2:SetOperation(s.lvchangeop) - c:RegisterEffect(e2) - --Special Summon 1 Level 4 or lower Fiend monster from your GY - 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+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.gyspcon) - e3:SetTarget(s.gysptg) - e3:SetOperation(s.gyspop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.selfspconfilter(c) - return c:IsRace(RACE_FIEND) and c:IsType(TYPE_TUNER) and c:IsFaceup() -end -function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.lvchangeop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsLevelAbove(2) then - local b1=c:IsLevelAbove(2) - local b2=c:IsLevelAbove(3) - local lv=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - --Decrease its Level by up to 2 - c:UpdateLevel(-lv,RESET_EVENT|RESETS_STANDARD_DISABLE) - end -end -function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sync=c:GetReasonCard() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and (sync:IsCode(CARD_RED_DRAGON_ARCHFIEND) or sync:ListsCode(CARD_RED_DRAGON_ARCHFIEND)) -end -function s.gyspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.gyspfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101304104.lua b/pre-release/c101304104.lua deleted file mode 100644 index 4135357721..0000000000 --- a/pre-release/c101304104.lua +++ /dev/null @@ -1,86 +0,0 @@ ---スカーレッド・ノヴァ・ドラゴン/バスター ---Red Nova Dragon/Assault Mode ---Scripted by The Razgriz -local s,id=GetID() -local CARD_RED_NOVA_DRAGON=97489701 -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Banish cards your opponent controls, up to the number of Tuners in your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e1:SetCost(s.tempbanishcost) - e1:SetTarget(s.rmtg) - e1:SetOperation(s.rmop) - c:RegisterEffect(e1) - --Negate the attack and end Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e2:SetCost(s.tempbanishcost) - e2:SetOperation(s.negbpop) - c:RegisterEffect(e2) - --Special Summon 1 "Red Nova Dragon" from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_ASSAULT_MODE,CARD_RED_NOVA_DRAGON} -s.assault_mode=CARD_RED_NOVA_DRAGON -function s.tempbanishcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() end - --Banish this card until the End Phase - aux.RemoveUntil(c,nil,REASON_COST,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_TUNER) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) - local max_ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_TUNER) - if max_ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,max_ct,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end -function s.negbpop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) - end -end -function s.spfilter(c,e,tp) - return c:IsCode(CARD_RED_NOVA_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local 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 \ No newline at end of file diff --git a/pre-release/c101304105.lua b/pre-release/c101304105.lua deleted file mode 100644 index 126c39b0b5..0000000000 --- a/pre-release/c101304105.lua +++ /dev/null @@ -1,83 +0,0 @@ ---紅蓮の王者 ---The Crimson King -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner DARK monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),1,99) - --Add 1 card that mentions "Red Dragon Archfiend" from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon 1 "Red Dragon Archfiend" from your Extra Deck (this is treated as a Synchro Summon) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_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 and re:IsMonsterEffect() end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.thfilter(c) - return c:ListsCode(CARD_RED_DRAGON_ARCHFIEND) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spfilter(c,e,tp,mc) - if not c:IsCode(CARD_RED_DRAGON_ARCHFIEND) then return false end - local forcedg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) - return #forcedg==0 and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) 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 not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then - sc:CompleteProcedure() - --Its ATK becomes doubled - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(sc:GetAttack()*2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - --Also it cannot be destroyed by your opponent's card effects - local e2=e1:Clone() - e2:SetDescription(3060) - e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(aux.indoval) - sc:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/pre-release/c101304106.lua b/pre-release/c101304106.lua deleted file mode 100644 index 01294eea9a..0000000000 --- a/pre-release/c101304106.lua +++ /dev/null @@ -1,70 +0,0 @@ --- クリムゾン・ブレード・ドラゴン ---Crimson Blade Dragon -local s,id=GetID() -local CARD_CRIMSON_BLADER=80321197 -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 "Resonator" Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RESONATOR),1,1,Synchro.NonTuner(nil),1,99) - --Take 1 Level 8 or higher monster from your Deck or GY that cannot be Normal Summoned/Set, and either Special Summon it (but negate its effects) or add it to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.thsptg) - e1:SetOperation(s.thspop) - c:RegisterEffect(e1) - --Destroy that monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_CRIMSON_BLADER} -s.listed_series={SET_RESONATOR} -function s.thspfilter(c,e,tp,mmz_chk) - return c:IsLevelAbove(8) and not c:IsSummonableCard() and (c:IsAbleToHand() - or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not sc then return end - aux.ToHandOrElse(sc,tp, - function() - return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - end, - function() - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - Duel.SpecialSummonComplete() - end, - aux.Stringid(id,3) - ) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsFaceup() and bc:IsLevelAbove(5) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304107.lua b/pre-release/c101304107.lua deleted file mode 100644 index 39d7bcedae..0000000000 --- a/pre-release/c101304107.lua +++ /dev/null @@ -1,52 +0,0 @@ ---クリムゾン・ヘルコール ---Crimson Call ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Add 1 Level 4 or lower Fiend monster from your GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Allow your "/Assault Mode" monster or "Red Dragon Archfiend" to make a second attack in a row - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(s.atkcon) - e2:SetCost(Cost.SelfBanish) - e2:SetOperation(function() Duel.ChainAttack() end) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -s.listed_series={SET_ASSAULT_MODE} -function s.thfilter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsAbleToHand() -end -function s.rdafilter(c) - return (c:IsCode(CARD_RED_DRAGON_ARCHFIEND) or (c:IsSynchroMonster() and c:ListsCode(CARD_RED_DRAGON_ARCHFIEND))) and c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,locations,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,locations) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,locations,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local ac=Duel.GetAttacker() - return ac:IsControler(tp) and ac:CanChainAttack() and (ac:IsCode(CARD_RED_DRAGON_ARCHFIEND) or ac:IsSetCard(SET_ASSAULT_MODE)) -end diff --git a/pre-release/c101304108.lua b/pre-release/c101304108.lua deleted file mode 100644 index b2587ece8b..0000000000 --- a/pre-release/c101304108.lua +++ /dev/null @@ -1,95 +0,0 @@ ---覇者の鳴動 ---The Ruler's Rumbling ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Apply these effects, in sequence, based on the number of monsters your opponent Special Summoned this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - 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) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Keep track of how many monsters each player has Special Summoned in a given turn - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local g0,g1=eg:Split(Card.IsSummonPlayer,nil,0) - for sc0 in g0:Iter() do - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - end - for sc1 in g1:Iter() do - Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) - end -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFlagEffect(1-tp,id) - if chk==0 then - local b1=ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) - local b2=ct>=3 - local b3=ct>=5 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) - return b1 or b2 or b3 - end - if ct>=1 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - end - if ct>=5 then - Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE) - if e:IsHasType(EFFECT_TYPE_ACTIVATE) and ct>=10 then - Duel.SetChainLimit(aux.FALSE) - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFlagEffect(1-tp,id) - local breakeff=false - if ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - breakeff=true - end - if ct>=3 then - if breakeff then Duel.BreakEffect() end - local c=e:GetHandler() - local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) - --"Red Dragon Archfiend" in your Monster Zone is unaffected by your opponent's activated effects until the end of your next turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_RED_DRAGON_ARCHFIEND)) - e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) - Duel.RegisterEffect(e1,tp) - breakeff=true - end - if ct>=5 then - if breakeff then Duel.BreakEffect() end - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) - end - end -end \ No newline at end of file From b8edc440ac2619c6984afdb1447715bc8f9a7349 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 3 Jan 2026 14:47:23 +0200 Subject: [PATCH 2/3] Add files via upload --- official/c21501961.lua | 70 ++++++++++++++++++++ official/c30138615.lua | 79 ++++++++++++++++++++++ official/c30875635.lua | 91 ++++++++++++++++++++++++++ official/c32126000.lua | 54 +++++++++++++++ official/c34041788.lua | 89 +++++++++++++++++++++++++ official/c35167375.lua | 98 ++++++++++++++++++++++++++++ official/c35989913.lua | 70 ++++++++++++++++++++ official/c3739500.lua | 93 ++++++++++++++++++++++++++ official/c39016067.lua | 102 +++++++++++++++++++++++++++++ official/c46001505.lua | 71 ++++++++++++++++++++ official/c53770666.lua | 87 +++++++++++++++++++++++++ official/c561300.lua | 81 +++++++++++++++++++++++ official/c58995660.lua | 87 +++++++++++++++++++++++++ official/c59011257.lua | 107 ++++++++++++++++++++++++++++++ official/c60439482.lua | 86 ++++++++++++++++++++++++ official/c61151074.lua | 81 +++++++++++++++++++++++ official/c613496.lua | 48 ++++++++++++++ official/c65400671.lua | 97 +++++++++++++++++++++++++++ official/c66122213.lua | 66 +++++++++++++++++++ official/c66206748.lua | 63 ++++++++++++++++++ official/c72374522.lua | 56 ++++++++++++++++ official/c73218792.lua | 112 ++++++++++++++++++++++++++++++++ official/c73496100.lua | 88 +++++++++++++++++++++++++ official/c7656689.lua | 71 ++++++++++++++++++++ official/c8778267.lua | 69 ++++++++++++++++++++ official/c91215724.lua | 70 ++++++++++++++++++++ official/c92517928.lua | 68 +++++++++++++++++++ official/c93023136.lua | 50 ++++++++++++++ official/c94384774.lua | 128 ++++++++++++++++++++++++++++++++++++ official/c95506252.lua | 77 ++++++++++++++++++++++ official/c95915457.lua | 104 +++++++++++++++++++++++++++++ official/c9591819.lua | 86 ++++++++++++++++++++++++ official/c96228804.lua | 66 +++++++++++++++++++ pre-release/c100296301.lua | 67 +++++++++++++++++++ pre-release/c100444301.lua | 98 ++++++++++++++++++++++++++++ pre-release/c100444302.lua | 72 ++++++++++++++++++++ pre-release/c100451001.lua | 73 +++++++++++++++++++++ pre-release/c100451004.lua | 74 +++++++++++++++++++++ pre-release/c100451007.lua | 89 +++++++++++++++++++++++++ pre-release/c100451010.lua | 104 +++++++++++++++++++++++++++++ pre-release/c100451013.lua | 130 +++++++++++++++++++++++++++++++++++++ pre-release/c100451016.lua | 74 +++++++++++++++++++++ pre-release/c100451019.lua | 90 +++++++++++++++++++++++++ pre-release/c100451025.lua | 112 ++++++++++++++++++++++++++++++++ pre-release/c100452001.lua | 94 +++++++++++++++++++++++++++ pre-release/c100452004.lua | 69 ++++++++++++++++++++ pre-release/c100452007.lua | 94 +++++++++++++++++++++++++++ pre-release/c100452010.lua | 97 +++++++++++++++++++++++++++ pre-release/c100452013.lua | 76 ++++++++++++++++++++++ pre-release/c100452016.lua | 77 ++++++++++++++++++++++ pre-release/c100452024.lua | 76 ++++++++++++++++++++++ pre-release/c100452025.lua | 94 +++++++++++++++++++++++++++ pre-release/c101304005.lua | 92 ++++++++++++++++++++++++++ pre-release/c101304006.lua | 88 +++++++++++++++++++++++++ pre-release/c101304007.lua | 78 ++++++++++++++++++++++ pre-release/c101304008.lua | 97 +++++++++++++++++++++++++++ pre-release/c101304009.lua | 98 ++++++++++++++++++++++++++++ pre-release/c101304016.lua | 107 ++++++++++++++++++++++++++++++ pre-release/c101304017.lua | 91 ++++++++++++++++++++++++++ pre-release/c101304018.lua | 65 +++++++++++++++++++ pre-release/c101304022.lua | 107 ++++++++++++++++++++++++++++++ pre-release/c101304023.lua | 90 +++++++++++++++++++++++++ pre-release/c101304024.lua | 106 ++++++++++++++++++++++++++++++ pre-release/c101304025.lua | 89 +++++++++++++++++++++++++ pre-release/c101304026.lua | 79 ++++++++++++++++++++++ pre-release/c101304027.lua | 100 ++++++++++++++++++++++++++++ pre-release/c101304030.lua | 79 ++++++++++++++++++++++ pre-release/c101304031.lua | 118 +++++++++++++++++++++++++++++++++ pre-release/c101304033.lua | 95 +++++++++++++++++++++++++++ pre-release/c101304034.lua | 92 ++++++++++++++++++++++++++ pre-release/c101304035.lua | 54 +++++++++++++++ pre-release/c101304038.lua | 96 +++++++++++++++++++++++++++ pre-release/c101304039.lua | 67 +++++++++++++++++++ pre-release/c101304043.lua | 88 +++++++++++++++++++++++++ pre-release/c101304044.lua | 72 ++++++++++++++++++++ pre-release/c101304047.lua | 83 +++++++++++++++++++++++ pre-release/c101304048.lua | 71 ++++++++++++++++++++ pre-release/c101304049.lua | 89 +++++++++++++++++++++++++ pre-release/c101304050.lua | 69 ++++++++++++++++++++ pre-release/c101304051.lua | 88 +++++++++++++++++++++++++ pre-release/c101304053.lua | 88 +++++++++++++++++++++++++ pre-release/c101304054.lua | 79 ++++++++++++++++++++++ pre-release/c101304055.lua | 86 ++++++++++++++++++++++++ pre-release/c101304062.lua | 92 ++++++++++++++++++++++++++ pre-release/c101304063.lua | 80 +++++++++++++++++++++++ pre-release/c101304064.lua | 66 +++++++++++++++++++ pre-release/c101304066.lua | 70 ++++++++++++++++++++ pre-release/c101304067.lua | 71 ++++++++++++++++++++ pre-release/c101304069.lua | 71 ++++++++++++++++++++ pre-release/c101304075.lua | 70 ++++++++++++++++++++ pre-release/c101304076.lua | 78 ++++++++++++++++++++++ pre-release/c101304101.lua | 103 +++++++++++++++++++++++++++++ pre-release/c101304102.lua | 97 +++++++++++++++++++++++++++ pre-release/c101304103.lua | 93 ++++++++++++++++++++++++++ pre-release/c101304104.lua | 86 ++++++++++++++++++++++++ pre-release/c101304105.lua | 83 +++++++++++++++++++++++ pre-release/c101304106.lua | 70 ++++++++++++++++++++ pre-release/c101304107.lua | 52 +++++++++++++++ pre-release/c101304108.lua | 95 +++++++++++++++++++++++++++ 99 files changed, 8303 insertions(+) create mode 100644 official/c21501961.lua create mode 100644 official/c30138615.lua create mode 100644 official/c30875635.lua create mode 100644 official/c32126000.lua create mode 100644 official/c34041788.lua create mode 100644 official/c35167375.lua create mode 100644 official/c35989913.lua create mode 100644 official/c3739500.lua create mode 100644 official/c39016067.lua create mode 100644 official/c46001505.lua create mode 100644 official/c53770666.lua create mode 100644 official/c561300.lua create mode 100644 official/c58995660.lua create mode 100644 official/c59011257.lua create mode 100644 official/c60439482.lua create mode 100644 official/c61151074.lua create mode 100644 official/c613496.lua create mode 100644 official/c65400671.lua create mode 100644 official/c66122213.lua create mode 100644 official/c66206748.lua create mode 100644 official/c72374522.lua create mode 100644 official/c73218792.lua create mode 100644 official/c73496100.lua create mode 100644 official/c7656689.lua create mode 100644 official/c8778267.lua create mode 100644 official/c91215724.lua create mode 100644 official/c92517928.lua create mode 100644 official/c93023136.lua create mode 100644 official/c94384774.lua create mode 100644 official/c95506252.lua create mode 100644 official/c95915457.lua create mode 100644 official/c9591819.lua create mode 100644 official/c96228804.lua create mode 100644 pre-release/c100296301.lua create mode 100644 pre-release/c100444301.lua create mode 100644 pre-release/c100444302.lua create mode 100644 pre-release/c100451001.lua create mode 100644 pre-release/c100451004.lua create mode 100644 pre-release/c100451007.lua create mode 100644 pre-release/c100451010.lua create mode 100644 pre-release/c100451013.lua create mode 100644 pre-release/c100451016.lua create mode 100644 pre-release/c100451019.lua create mode 100644 pre-release/c100451025.lua create mode 100644 pre-release/c100452001.lua create mode 100644 pre-release/c100452004.lua create mode 100644 pre-release/c100452007.lua create mode 100644 pre-release/c100452010.lua create mode 100644 pre-release/c100452013.lua create mode 100644 pre-release/c100452016.lua create mode 100644 pre-release/c100452024.lua create mode 100644 pre-release/c100452025.lua create mode 100644 pre-release/c101304005.lua create mode 100644 pre-release/c101304006.lua create mode 100644 pre-release/c101304007.lua create mode 100644 pre-release/c101304008.lua create mode 100644 pre-release/c101304009.lua create mode 100644 pre-release/c101304016.lua create mode 100644 pre-release/c101304017.lua create mode 100644 pre-release/c101304018.lua create mode 100644 pre-release/c101304022.lua create mode 100644 pre-release/c101304023.lua create mode 100644 pre-release/c101304024.lua create mode 100644 pre-release/c101304025.lua create mode 100644 pre-release/c101304026.lua create mode 100644 pre-release/c101304027.lua create mode 100644 pre-release/c101304030.lua create mode 100644 pre-release/c101304031.lua create mode 100644 pre-release/c101304033.lua create mode 100644 pre-release/c101304034.lua create mode 100644 pre-release/c101304035.lua create mode 100644 pre-release/c101304038.lua create mode 100644 pre-release/c101304039.lua create mode 100644 pre-release/c101304043.lua create mode 100644 pre-release/c101304044.lua create mode 100644 pre-release/c101304047.lua create mode 100644 pre-release/c101304048.lua create mode 100644 pre-release/c101304049.lua create mode 100644 pre-release/c101304050.lua create mode 100644 pre-release/c101304051.lua create mode 100644 pre-release/c101304053.lua create mode 100644 pre-release/c101304054.lua create mode 100644 pre-release/c101304055.lua create mode 100644 pre-release/c101304062.lua create mode 100644 pre-release/c101304063.lua create mode 100644 pre-release/c101304064.lua create mode 100644 pre-release/c101304066.lua create mode 100644 pre-release/c101304067.lua create mode 100644 pre-release/c101304069.lua create mode 100644 pre-release/c101304075.lua create mode 100644 pre-release/c101304076.lua create mode 100644 pre-release/c101304101.lua create mode 100644 pre-release/c101304102.lua create mode 100644 pre-release/c101304103.lua create mode 100644 pre-release/c101304104.lua create mode 100644 pre-release/c101304105.lua create mode 100644 pre-release/c101304106.lua create mode 100644 pre-release/c101304107.lua create mode 100644 pre-release/c101304108.lua diff --git a/official/c21501961.lua b/official/c21501961.lua new file mode 100644 index 0000000000..588e63d43d --- /dev/null +++ b/official/c21501961.lua @@ -0,0 +1,70 @@ +--恐依のペアルックマ!! +--Pair Bear Scare!! +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Your opponent can reveal 1 "Pair Bear Scare!!" in their hand or Deck, and if they do, each player gains 2000 LP, otherwise, you destroy 1 monster your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Add this card to your opponent's hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,2000) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) +end +function s.revealfilter(c) + return c:IsCode(id) and not c:IsPublic() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local opp=1-tp + if Duel.IsExistingMatchingCard(s.revealfilter,opp,LOCATION_HAND|LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(opp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_CONFIRM) + local sc=Duel.SelectMatchingCard(opp,s.revealfilter,opp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() + Duel.ConfirmCards(tp,sc) + if sc:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(opp) + else + Duel.ShuffleDeck(opp) + end + Duel.Recover(tp,2000,REASON_EFFECT) + Duel.Recover(opp,2000,REASON_EFFECT) + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,1-tp,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c30138615.lua b/official/c30138615.lua new file mode 100644 index 0000000000..66c84ec3e3 --- /dev/null +++ b/official/c30138615.lua @@ -0,0 +1,79 @@ +--ナイトメア・アイズ・サクリファイス +--Nightmare-Eyes Restrict +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 monsters with different Types (Fiend, Illusion, or Spellcaster) + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + --Equip 1 monster your opponent controls to this card as an Equip Spell + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_EQUIP) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SPSUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.eqtg) + e1a:SetOperation(s.eqop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1b:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1b:SetRange(LOCATION_MZONE) + e1b:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) + c:RegisterEffect(e1b) + aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1a) + aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1b) + --Gains ATK equal to the combined ATK of those equipped monsters + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():GetEquipGroup():IsExists(aux.FaceupFilter(Card.HasFlagEffect,id),1,nil) end) + e2:SetValue(function(e,c) return c:GetEquipGroup():Match(function(c) return c:HasFlagEffect(id) and c:IsFaceup() and c:GetTextAttack()>0 end,nil):GetSum(Card.GetTextAttack) end) + c:RegisterEffect(e2) + --If this card battles a monster, neither can be destroyed by that battle + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e3:SetTarget(function(e,c) local handler=e:GetHandler() return c==handler or c==handler:GetBattleTarget() end) + e3:SetValue(1) + c:RegisterEffect(e3) + --Your opponent's monsters cannot attack monsters, except this one + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD) + e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetTargetRange(0,LOCATION_MZONE) + e4:SetValue(function(e,c) return c~=e:GetHandler() end) + c:RegisterEffect(e4) +end +function s.matfilter(c,fc,sumtype,sp,sub,mg,sg) + return c:IsRace(RACE_FIEND|RACE_ILLUSION|RACE_SPELLCASTER,fc,sumtype,sp) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp)) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,1-tp,LOCATION_MZONE) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local sc=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + s.equipop(c,e,tp,sc) + end +end +function s.eqval(ec,c,tp) + return ec:IsControler(1-tp) +end +function s.equipop(c,e,tp,tc) + c:EquipByEffectAndLimitRegister(e,tp,tc,id) +end \ No newline at end of file diff --git a/official/c30875635.lua b/official/c30875635.lua new file mode 100644 index 0000000000..7a3f5f5d39 --- /dev/null +++ b/official/c30875635.lua @@ -0,0 +1,91 @@ +--ミラクル・エクスクルーダー +--Miracle Ejector +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,0}) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 Spell/Trap that mentions an "Elemental HERO" monster's card name from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Banish 1 card from your opponent's GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.rmtg) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN} +function s.spcostfilter(c) + return c:IsSetCard(SET_NEO_SPACIAN) and c:IsMonster() and c:IsAbleToGraveAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_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) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSpellTrap() and c:ListsCodeWithArchetype(SET_ELEMENTAL_HERO) 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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c32126000.lua b/official/c32126000.lua new file mode 100644 index 0000000000..b1e32162de --- /dev/null +++ b/official/c32126000.lua @@ -0,0 +1,54 @@ +--ラーニング・エルフ +--Learning Elf +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Set 1 Trap from your Deck with an effect that equips itself to a monster + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.settg) + e1a:SetOperation(s.setop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +function s.setfilter(c) + return c:IsEquipTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c34041788.lua b/official/c34041788.lua new file mode 100644 index 0000000000..b24f155d44 --- /dev/null +++ b/official/c34041788.lua @@ -0,0 +1,89 @@ +--エンディミオン皇国 +--Endymion Empire +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: Add 1 "Regulus, the Prince of Endymion" or 1 monster that mentions it from your Deck to your hand, then if your opponent controls a monster, you can Special Summon 1 Spellcaster monster from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --If a card(s) you control would be destroyed by battle or card effect, you can destroy 1 "Regulus, the Prince of Endymion" in your hand or face-up Monster Zone instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.desreptg) + e2:SetOperation(s.desrepop) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + c:RegisterEffect(e2) +end +s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION} +function s.thfilter(c) + return (c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) or (c:IsMonster() and c:ListsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION))) + 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_HAND) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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) + if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end +function s.repfilter(c,tp) + return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_BATTLE|REASON_EFFECT) + and not c:IsReason(REASON_REPLACE) +end +function s.desfilter(c,e) + return c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED|STATUS_BATTLE_DESTROYED) +end +function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) + and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e) end + if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then + Duel.Hint(HINT_CARD,0,id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) + local sc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e):GetFirst() + e:SetLabelObject(sc) + sc:SetStatus(STATUS_DESTROY_CONFIRMED,true) + if sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + else + Duel.HintSelection(sc) + end + return true + else + return false + end +end +function s.desrepop(e,tp,eg,ep,ev,re,r,rp) + local sc=e:GetLabelObject() + sc:SetStatus(STATUS_DESTROY_CONFIRMED,false) + Duel.Destroy(sc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c35167375.lua b/official/c35167375.lua new file mode 100644 index 0000000000..5b6a5072ac --- /dev/null +++ b/official/c35167375.lua @@ -0,0 +1,98 @@ +--サプライズ・フュージョン +--Surprise Fusion +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SURPRISE=id+1 +function s.initial_effect(c) + --Make 1 face-up monster you control become the declared Type and Attribute, then you can Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control, including the targeted monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Tribute 1 Fusion Monster, and if you do, Special Summon 2 "Surprise Tokens" (Spellcaster/DARK/ATK 0/DEF 0) with a Level equal to the Level the Tributed monster had on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.tokentg) + e2:SetOperation(s.tokenop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_SURPRISE} +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 chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local race=Duel.AnnounceRace(tp,1,RACE_ALL) + local attr=tc:IsRaceExcept(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or tc:AnnounceAnotherAttribute(tp) + e:SetLabel(race,attr) + Duel.SetPossibleOperationInfo(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() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + local race,attr=e:GetLabel() + if tc:IsRaceExcept(race) then + --It becomes that Type + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(race) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + if tc:IsAttributeExcept(attr) then + --It becomes that Attribute + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(attr) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e2) + end + if not (tc:IsRace(race) or tc:IsAttribute(attr)) then return end + local fusion_params={matfilter=Fusion.OnFieldMat,gc=tc} + if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + end + end +end +function s.tributefilter(c,tp) + return c:IsFusionMonster() and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>=2 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SURPRISE,0,TYPES_TOKEN,0,0,c:GetLevel(),RACE_SPELLCASTER,ATTRIBUTE_DARK) +end +function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.CheckReleaseGroup(tp,s.tributefilter,1,false,1,true,nil,tp,nil,false,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.tokenop(e,tp,eg,ep,ev,re,r,rp) + local sc=Duel.SelectReleaseGroup(tp,s.tributefilter,1,1,false,false,true,nil,tp,nil,false,nil,tp):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + local lv=sc:GetLevel() + if Duel.Release(sc,REASON_EFFECT)>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SURPRISE,0,TYPES_TOKEN,0,0,lv,RACE_SPELLCASTER,ATTRIBUTE_DARK) then + for i=1,2 do + local token=Duel.CreateToken(tp,TOKEN_SURPRISE) + token:Level(lv) + Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) + end + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/official/c35989913.lua b/official/c35989913.lua new file mode 100644 index 0000000000..ba390b3b18 --- /dev/null +++ b/official/c35989913.lua @@ -0,0 +1,70 @@ +--永遠の絆 +--Endless Bond +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can Special Summon 1 "Number 39: Utopia" from your GY, and if you do, it gains ATK equal to the total ATK of all LIGHT "Utopia" and "Utopic" Xyz Monsters in your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Make that monster you control lose 1000 ATK, and if you do, it can attack again in a row + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetRange(LOCATION_SZONE) + e2:SetCondition(s.atkcon) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + c:RegisterEffect(e2) +end +s.listed_series={SET_XYZ,SET_UTOPIA,SET_UTOPIC} +s.listed_names={84013237} --"Number 39: Utopia" +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsCode(84013237) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.utopigyfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard({SET_UTOPIA,SET_UTOPIC}) and c:IsXyzMonster() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=g:Select(tp,1,1,nil):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + local atk=Duel.GetMatchingGroup(s.utopigyfilter,tp,LOCATION_GRAVE,0,nil):GetSum(Card.GetAttack) + --It gains ATK equal to the total ATK of all LIGHT "Utopia" and "Utopic" Xyz Monsters in your GY + sc:UpdateAttack(atk,RESET_EVENT|RESETS_STANDARD,e:GetHandler()) + end + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local bc=eg:GetFirst() + return bc==Duel.GetAttacker() and bc:IsControler(tp) and bc:CanChainAttack() and bc:IsSetCard({SET_UTOPIA,SET_UTOPIC}) + and bc:IsOriginalAttribute(ATTRIBUTE_LIGHT) and bc:GetBattleTarget():IsPreviousControler(1-tp) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc=eg:GetFirst() + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + --Make that monster you control lose 1000 ATK, and if you do, it can attack again in a row + if bc:IsRelateToEffect(e) and bc:IsControler(tp) and bc:IsFaceup() and not bc:IsImmuneToEffect(e) + and bc:UpdateAttack(-1000,RESET_EVENT|RESETS_STANDARD,e:GetHandler())<0 then + Duel.ChainAttack() + end +end \ No newline at end of file diff --git a/official/c3739500.lua b/official/c3739500.lua new file mode 100644 index 0000000000..8cd12d7eb3 --- /dev/null +++ b/official/c3739500.lua @@ -0,0 +1,93 @@ +--破滅と終焉の支配者 +--End of the World Ruler +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --This card's name becomes "Demise, King of Armageddon" while in the hand or field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) + e1:SetValue(72426662) + c:RegisterEffect(e1) + --Apply the effect of a Ritual Spell that Ritual Summons + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.AND(Cost.SelfReveal,Cost.PayLP(2000),s.applycost)) + e2:SetTarget(s.applytg) + e2:SetOperation(s.applyop) + c:RegisterEffect(e2) + --Destroy as many other cards on the field as possible, then this card gains 2900 ATK + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.PayLP(2000)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_series={SET_END_OF_THE_WORLD} +s.listed_names={72426662} --"Demise, King of Armageddon" +function s.applyfilter(c) + return c:IsRitualSpell() and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil +end +function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil) end +end +function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local te=e:GetLabelObject() + return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) + end + if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + local te=g:GetFirst():CheckActivateEffect(true,true,false) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + local tg=te:GetTarget() + e:SetProperty(te:GetProperty()) + if tg then + tg(e,tp,eg,ep,ev,re,r,rp,1) + end + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + e:SetLabelObject(te) + Duel.ClearOperationInfo(0) +end +function s.applyop(e,tp,eg,ep,ev,re,r,rp) + local te=e:GetLabelObject() + if te then + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + local op=te:GetOperation() + if op then op(e,tp,eg,ep,ev,re,r,rp) end + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsFaceup() then + Duel.BreakEffect() + --This card gains 2900 ATK + c:UpdateAttack(2900) + end +end \ No newline at end of file diff --git a/official/c39016067.lua b/official/c39016067.lua new file mode 100644 index 0000000000..7da9bc3437 --- /dev/null +++ b/official/c39016067.lua @@ -0,0 +1,102 @@ +--竜剣士ウィンドユニコーンP +--Wind Unicorn Parallel, the Dracoslayer +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --While this Pendulum Summoned card is in your Monster Zone, your opponent cannot target it with card effects, also it cannot be destroyed by your opponent's card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_SINGLE) + e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e2a:SetValue(aux.tgoval) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2b:SetValue(aux.indoval) + c:RegisterEffect(e2b) + --Return 1 Pendulum Monster Card you control and 1 card your opponent controls to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.rthtg) + e3:SetOperation(s.rthop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local mmz_chk=Duel.GetMZoneCount(tp)>0 + local b1=mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + local b2=mmz_chk and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,1,c,e,tp) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local c=e:GetHandler() + if op==1 then + --Special Summon this card + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --Destroy this card, and if you do, Special Summon 1 Level 5 or lower Pendulum Monster Card from your Pendulum Zone + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.GetMZoneCount(tp)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end +function s.rthfilter(c,e,tp) + return ((c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsControler(tp)) or c:IsControler(1-tp)) + and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.rthfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e,tp) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_RTOHAND) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,2,tp,0) +end +function s.rthop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c46001505.lua b/official/c46001505.lua new file mode 100644 index 0000000000..12edde4e96 --- /dev/null +++ b/official/c46001505.lua @@ -0,0 +1,71 @@ +--王者の鼓動 +--Champion's Pulse +--Scripted by The Razgriz +local s,id=GetID() +local CARD_HOT_RED_DRAGON_ARCHFIEND=39765958 +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_BATTLE_START) + c:RegisterEffect(e1) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND,CARD_HOT_RED_DRAGON_ARCHFIEND} +function s.spfilter(c,e,tp,mmz_chk) + if not (c:IsCode(CARD_RED_DRAGON_ARCHFIEND,CARD_HOT_RED_DRAGON_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_GRAVE) then + return mmz_chk + else + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsBattlePhase(1-tp) + local event_chaining,_,event_player,event_value,event_reason_effect=Duel.CheckEvent(EVENT_CHAINING,true) + local b2=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)0) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_RECOVER) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY) + e:SetLabel(op,event_value) + local rc=event_reason_effect:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,rc,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(event_reason_effect) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,tp,0) + end + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op,event_value=e:GetLabel() + if op==1 then + --Your opponent gains 1000 LP, then end the Battle Phase + if Duel.Recover(1-tp,1000,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + end + elseif op==2 then + --Special Summon 1 "Red Dragon Archfiend" or "Hot Red Dragon Archfiend" from your Extra Deck or GY, and if you do, negate that activated effect, and if you do that, destroy that monster + local trig_eff=Duel.GetChainInfo(event_value,CHAININFO_TRIGGERING_EFFECT) + local rc=trig_eff:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.NegateEffect(event_value) + and rc:IsRelateToEffect(trig_eff) then + Duel.Destroy(rc,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c53770666.lua b/official/c53770666.lua new file mode 100644 index 0000000000..8416cdc13b --- /dev/null +++ b/official/c53770666.lua @@ -0,0 +1,87 @@ +--武装転生 +--Armament Reincarnation +--scripted by pyrQ +local s,id=GetID() +local TOKEN_ARMAMENT_REINCARNATION=id+1 +function s.initial_effect(c) + --Special Summon "Armament Reincarnation Tokens" (Warrior/LIGHT/Level 1/ATK 500/DEF 500) up to the number of Equip Spells, and Traps with an effect that equip themselves to a monster, in your GY, then you can destroy as many cards in your Spell & Trap Zone as possible, including this card, then Set as many Equip Spells, and Traps with an effect that equip themselves to a monster, as possible from your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={TOKEN_ARMAMENT_REINCARNATION} +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.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARMAMENT_REINCARNATION,0,TYPES_TOKEN,500,500,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) + and Duel.IsExistingMatchingCard(aux.OR(Card.IsEquipSpell,Card.IsEquipTrap),tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) +end +function s.setfilter(c) + return (c:IsEquipSpell() or c:IsEquipTrap()) and c:IsSSetable(true) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + local max_ct=Duel.GetMatchingGroupCount(aux.OR(Card.IsEquipSpell,Card.IsEquipTrap),tp,LOCATION_GRAVE,0,nil) + if ft>0 and max_ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARMAMENT_REINCARNATION,0,TYPES_TOKEN,500,500,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) then + ft=math.min(ft,max_ct) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + if ft>1 then + ft=Duel.AnnounceNumberRange(tp,1,ft) + end + for i=1,ft do + local token=Duel.CreateToken(tp,TOKEN_ARMAMENT_REINCARNATION) + Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) + end + if Duel.SpecialSummonComplete()>0 and c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local g=Duel.GetFieldGroup(tp,LOCATION_STZONE,0) + Duel.BreakEffect() + if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetOperatedGroup():IsContains(c)then + local st_zones=Duel.GetLocationCount(tp,LOCATION_SZONE,0) + if st_zones>0 then + local equip_g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,nil) + local sg=Group.CreateGroup() + if #equip_g>st_zones then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + sg=equip_g:Select(tp,st_zones,st_zones,nil) + else + sg=equip_g + end + if #sg>0 then + Duel.BreakEffect() + if Duel.SSet(tp,sg)>0 then + local set_traps=Duel.GetOperatedGroup():Match(Card.IsTrap,nil) + for sc in set_traps:Iter() do + --These Traps can be activated this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + end + end + end + end + end + end + --For the rest of this turn, you cannot Special Summon + 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:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/official/c561300.lua b/official/c561300.lua new file mode 100644 index 0000000000..62f560e8d4 --- /dev/null +++ b/official/c561300.lua @@ -0,0 +1,81 @@ +--猛毒マムシ +--Poisonous Viper +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon it, or if your opponent controls no monsters, Special Summon it to their field in Defense Position instead + 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:SetCost(Cost.SelfReveal) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Take 500 damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,500) end) + e2:SetOperation(function(e,tp) Duel.Damage(tp,500,REASON_EFFECT) end) + c:RegisterEffect(e2) + --Destroy 1 Set Spell/Trap your opponent controls + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,2)) + e3a:SetCategory(CATEGORY_DESTROY) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3a:SetCode(EVENT_REMOVE) + e3a:SetCountLimit(1,id) + e3a:SetTarget(s.destg) + e3a:SetOperation(s.desop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_TO_GRAVE) + e3b:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) + c:RegisterEffect(e3b) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then + if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + else + local opp=1-tp + return Duel.GetLocationCount(opp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,opp) + end + 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 + if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + else + Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local tc=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) + Duel.SetChainLimit(function(e,ep,tp) return e:GetHandler()~=tc end) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c58995660.lua b/official/c58995660.lua new file mode 100644 index 0000000000..95e2e3ca68 --- /dev/null +++ b/official/c58995660.lua @@ -0,0 +1,87 @@ +--先手必掌 +--Early Palm Gets the Win +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Roll a six-sided die and apply this effect to that monster you control based on the result until the end of this turn, or, if you activated this effect when an attack was declared involving 2 monsters in the same column, you choose the effect instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_ATTACK_ANNOUNCE) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.GetBattleMonster(tp) end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_names={id} +s.roll_dice=true +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc1=Duel.GetBattleMonster(tp) + local bc2=bc1:GetBattleTarget() + if bc2 and bc1:GetColumnGroup():IsContains(bc2) then + e:SetLabel(1) + else + e:SetLabel(0) + end + e:SetLabelObject(bc1) + bc1:CreateEffectRelation(e) + Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + if not bc:IsRelateToEffect(e) then return end + local op=nil + if e:GetLabel()==0 then + op=Duel.TossDice(tp,1) + else + local is_faceup=bc:IsFaceup() + op=Duel.SelectEffect(tp, + {true,aux.Stringid(id,1)}, + {is_faceup,aux.Stringid(id,2)}, + {is_faceup,aux.Stringid(id,3)}) + end + local c=e:GetHandler() + if op==1 or op==4 then + --● 1 or 4: The first time it would be destroyed by battle or card effect, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetCountLimit(1) + e1:SetValue(function(e,re,r,rp) return r&(REASON_BATTLE|REASON_EFFECT)>0 end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + bc:RegisterEffect(e1) + elseif op==2 or op==5 then + --● 2 or 5: It loses 500 ATK, also it is unaffected by activated Spell/Trap effects, except "Early Palm Gets the Win" + bc:UpdateAttack(-500,RESETS_STANDARD_PHASE_END,c) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,5)) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetValue(function(e,te) return te:IsActivated() and te:IsSpellTrapEffect() and not te:GetHandler():IsCode(id) end) + e2:SetReset(RESETS_STANDARD_PHASE_END) + bc:RegisterEffect(e2) + elseif op==3 or op==6 then + --● 3 or 6: It gains 1000 ATK, also it can make up to 2 attacks on monsters during each Battle Phase + bc:UpdateAttack(1000,RESETS_STANDARD_PHASE_END,c) + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,6)) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) + e3:SetValue(1) + e3:SetReset(RESETS_STANDARD_PHASE_END) + bc:RegisterEffect(e3) + end +end \ No newline at end of file diff --git a/official/c59011257.lua b/official/c59011257.lua new file mode 100644 index 0000000000..2b9c655718 --- /dev/null +++ b/official/c59011257.lua @@ -0,0 +1,107 @@ +--フォーリンチーター +--Fallin' Cheatah +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --This face-up card in the Monster Zone cannot be Tributed, nor used as material for a Fusion, Synchro, Xyz, or Link Summon + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1a:SetCode(EFFECT_UNRELEASABLE_SUM) + e1a:SetRange(LOCATION_MZONE) + e1a:SetValue(1) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UNRELEASABLE_NONSUM) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EFFECT_CANNOT_BE_MATERIAL) + e1c:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) + c:RegisterEffect(e1c) + --Give control of this card to that monster's controller, also that monster cannot be Tributed nor used as material for a Fusion, Synchro, Xyz or Link Summon while this monster is face-up on the field + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_CONTROL) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2a:SetProperty(EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2a:SetCode(EVENT_CUSTOM+id) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTarget(s.ctrltg) + e2a:SetOperation(s.ctrlop) + e2a:SetLabelObject(Group.CreateGroup()) + c:RegisterEffect(e2a) + --Keep track of monsters Special Summoned to the opponent's field + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + e2b:SetRange(LOCATION_MZONE) + e2b:SetLabelObject(e2a) + e2b:SetOperation(s.regop) + c:RegisterEffect(e2b) +end +function s.tgfilter(c,e,opp) + return c:IsControler(opp) and c:IsLocation(LOCATION_MZONE) and (not e or c:IsCanBeEffectTarget(e)) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.tgfilter,nil,nil,1-tp) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.ctrlfilter(c,tp) + return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 +end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=e:GetLabelObject():Filter(s.tgfilter,nil,e,1-tp):Match(s.ctrlfilter,nil,tp) + if chkc then return g:IsContains(chkc) and s.tgfilter(chkc,e,1-tp) end + local c=e:GetHandler() + if chk==0 then return true end + if #g>0 then + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) + end +end +function s.ctrlop(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 tc and tc:IsRelateToEffect(e) and Duel.GetControl(c,tc:GetControler()) and c:IsFaceup() then + c:SetCardTarget(tc) + local fid=c:GetFieldID() + tc:RegisterFlagEffect(id+1,RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET),EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,1)) + --That monster cannot be Tributed nor used as material for a Fusion, Synchro, Xyz or Link Summon while this monster is face-up on the field + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1a:SetCode(EFFECT_UNRELEASABLE_SUM) + e1a:SetRange(LOCATION_MZONE) + e1a:SetTarget(function(e,c) return c:GetFlagEffectLabel(id+1)==fid end) + e1a:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1a:SetValue(1) + e1a:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UNRELEASABLE_NONSUM) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EFFECT_CANNOT_BE_MATERIAL) + e1c:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) + c:RegisterEffect(e1c) + end +end \ No newline at end of file diff --git a/official/c60439482.lua b/official/c60439482.lua new file mode 100644 index 0000000000..13b4df3404 --- /dev/null +++ b/official/c60439482.lua @@ -0,0 +1,86 @@ +--レグルスの矢 +--Regulus' Arrow +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_REGULUS_THE_PRINCE_OF_ENDYMION),tp,LOCATION_ONFIELD,0,1,nil) end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Special Summon 1 "Regulus, the Prince of Endymion" or 1 monster that mentions it from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION} +function s.desfilter(c) + return c:GetBattledGroupCount()>0 +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil) + local event_chaining,_,_,event_value,reason_effect=Duel.CheckEvent(EVENT_CHAINING,true) + local reason_card=reason_effect and reason_effect:GetHandler() or nil + local b2=event_chaining and reason_effect:IsHasType(EFFECT_TYPE_ACTIVATE) + and (reason_card:IsNormalSpell() or reason_card:IsQuickPlaySpell()) + and Duel.IsChainDisablable(ev) + 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,event_value or 0) + if op==1 then + e:SetCategory(CATEGORY_DESTROY) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) + elseif op==2 then + e:SetCategory(CATEGORY_DISABLE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op,event_value=e:GetLabel() + if op==1 then + --Destroy 1 monster your opponent controls that battled this turn + 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 + elseif op==2 then + --When a Normal or Quick-Play Spell Card is activated: Negate that effect + Duel.NegateEffect(event_value) + end +end +function s.spfilter(c,e,tp) + return (c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) or c:ListsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION)) + 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 diff --git a/official/c61151074.lua b/official/c61151074.lua new file mode 100644 index 0000000000..375d1776dc --- /dev/null +++ b/official/c61151074.lua @@ -0,0 +1,81 @@ +--閃刀機-アディルセイバー +--Sky Striker Mecha - Adhilsaber +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Make 1 "Sky Striker" monster on the field gain 1500 ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.discardatktg) + e1:SetOperation(s.discardatkop) + e1:SetHintTiming(TIMING_DAMAGE_STEP) + c:RegisterEffect(e1) + --Equip this card to a "Sky Striker" Link Monster as an Equip Card that gives it 1500 ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_EQUIP+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.eqatktg) + e2:SetOperation(s.eqatkop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SKY_STRIKER} +function s.discardatktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_SKY_STRIKER) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_SKY_STRIKER),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_SKY_STRIKER),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,1500) +end +function s.discardatkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --It gains 1500 ATK until the end of this turn + tc:UpdateAttack(1500,RESETS_STANDARD_PHASE_END,e:GetHandler()) + end +end +function s.eqatkfilter(c) + return c:IsSetCard(SET_SKY_STRIKER) and c:IsLinkMonster() +end +function s.eqatktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqatkfilter(chkc) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(s.eqatkfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,s.eqpatkfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.eqatkop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Equip(tp,c,tc) then + --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 1500 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c613496.lua b/official/c613496.lua new file mode 100644 index 0000000000..f456fab3a5 --- /dev/null +++ b/official/c613496.lua @@ -0,0 +1,48 @@ +--オーバー・チューニング +--Over Tuning +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Tuner from your hand, Deck, or GY, also you cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_TUNER),tp,LOCATION_MZONE,0,1,nil) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsType(TYPE_TUNER) 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) +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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end \ No newline at end of file diff --git a/official/c65400671.lua b/official/c65400671.lua new file mode 100644 index 0000000000..c2a6f5e7cd --- /dev/null +++ b/official/c65400671.lua @@ -0,0 +1,97 @@ +--水晶機巧-ハリファイバーP +--Crystron Halqifibrax Prism +--scripted by Naim +local s,id=GetID() +local TOKEN_CRYSTRON=55326323 +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters, including a Tuner + Link.AddProcedure(c,nil,2,3,s.linkmatcheck) + --Register the original Levels of the monsters used for its Link Summon + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():GetSum(Card.GetOriginalLevel)) end) + c:RegisterEffect(e0) + --Special Summon 1 Tuner from your Extra Deck in Defense Position + 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():IsLinkSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetLabelObject(e0) + c:RegisterEffect(e1) + --Special Summon 3 "Crystron Tokens" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) local opp=1-tp return Duel.IsMainPhase(opp) or Duel.IsBattlePhase(opp) end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.tokentg) + e2:SetOperation(s.tokenop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_CRYSTRON} +function s.linkmatcheck(mg,lc,sumtype,tp) + return mg:IsExists(Card.IsType,1,nil,TYPE_TUNER,lc,sumtype,tp) +end +function s.spfilter(c,e,tp,lv) + return c:IsType(TYPE_TUNER) and c:IsLevelBelow(lv) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local lv=e:GetLabelObject():GetLabel() + return lv>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local lv=e:GetLabelObject():GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end +function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>=3 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_CRYSTRON,SET_CRYSTRON,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_WATER) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) +end +function s.tokenop(e,tp,eg,ep,ev,re,r,rp) + if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_CRYSTRON,SET_CRYSTRON,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_WATER)) then return end + local c=e:GetHandler() + for i=1,3 do + local token=Duel.CreateToken(tp,TOKEN_CRYSTRON) + if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then + --They cannot be tributed + local e1=Effect.CreateEffect(c) + e1:SetDescription(3303) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_UNRELEASABLE_SUM) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e1,true) + local e2=e1:Clone() + e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) + token:RegisterEffect(e2,true) + end + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c66122213.lua b/official/c66122213.lua new file mode 100644 index 0000000000..d21bf1bbaa --- /dev/null +++ b/official/c66122213.lua @@ -0,0 +1,66 @@ +--ヘル・ダイブ・ボンバー +--Infernal Strike Fighter +--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) + --Destroy as many face-up monsters on the field as possible, and if you do, inflict damage to your opponent equal to the combined original Levels of those destroyed monsters x 200 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsMainPhase2() end) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) + --Special Summon 1 Level 5 or lower Machine monster from your GY in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetSum(Card.GetOriginalLevel)*200) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local dam=Duel.GetOperatedGroup():GetSum(Card.GetOriginalLevel)*200 + if dam>0 then + Duel.Damage(1-tp,dam,REASON_EFFECT) + end + end +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(5) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + 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_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c66206748.lua b/official/c66206748.lua new file mode 100644 index 0000000000..af7230eb11 --- /dev/null +++ b/official/c66206748.lua @@ -0,0 +1,63 @@ +--M・HERO ファウンティン +--Masked HERO Fountain +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "HERO" monster from your hand in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Set 1 "Mask Change" from your Deck or GY + 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_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.setcon) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_HERO} +s.listed_names={21143940} --"Mask Change" +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return (c:IsReason(REASON_COST) and re and re:IsActivated()) or c:IsReason(REASON_EFFECT) +end +function s.setfilter(c) + return c:IsCode(21143940) 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/c72374522.lua b/official/c72374522.lua new file mode 100644 index 0000000000..07cd32b42a --- /dev/null +++ b/official/c72374522.lua @@ -0,0 +1,56 @@ +--紫毒の茨牙 +--Thorn Fangs of Violet Poison +--Scripted by The Razgriz +local s,id=GetID() +local CARD_STARVING_VENOM_FUSION_DRAGON=41209827 +function s.initial_effect(c) + --Make 1 "Starving Venom Fusion Dragon" you control unable to attack for the rest of this turn, also destroy as many monsters your opponent controls as possible with less ATK than that monster, then you can discard your entire hand, and if you do, inflict damage to your opponent equal to the combined original ATK of those destroyed monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_PREDAP} +s.listed_names={CARD_STARVING_VENOM_FUSION_DRAGON} +function s.tgfilter(c,tp) + return c:IsCode(CARD_STARVING_VENOM_FUSION_DRAGON) and c:IsFaceup() + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackBelow,c:GetAttack()-1),tp,0,LOCATION_MZONE,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttackBelow,tc:GetAttack()-1),tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetSum(Card.GetBaseAttack)) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --It cannot attack for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3206) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttackBelow,tc:GetAttack()-1),tp,0,LOCATION_MZONE,nil) + local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and #hg>0 and #hg==hg:FilterCount(Card.IsDiscardable,nil,REASON_EFFECT) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local dam=Duel.GetOperatedGroup():Match(aux.NOT(Card.IsTextAttack),nil,-2):GetSum(Card.GetTextAttack) + Duel.BreakEffect() + if Duel.SendtoGrave(hg,REASON_EFFECT|REASON_DISCARD)==#hg then + Duel.Damage(1-tp,dam,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/official/c73218792.lua b/official/c73218792.lua new file mode 100644 index 0000000000..1cf0b70279 --- /dev/null +++ b/official/c73218792.lua @@ -0,0 +1,112 @@ +--ジャンク・マイスター +--Junk Meister +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.Reveal(function(c) return c:IsSetCard({SET_WARRIOR,SET_STARDUST}) and c:IsSynchroMonster() end,nil,1,1,nil,LOCATION_EXTRA)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Junk" card from your Deck to your hand, except "Junk Meister" + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Decrease the Level of 1 "Junk" monster you control by up to 2 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) +end +s.listed_series={SET_WARRIOR,SET_STARDUST,SET_JUNK} +s.listed_names={id} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end +function s.thfilter(c) + return c:IsSetCard(SET_JUNK) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.lvfilter(c) + return c:IsSetCard(SET_JUNK) and c:IsLevelAbove(2) and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:HasLevel() then + local b1=tc:IsLevelAbove(2) + local b2=tc:IsLevelAbove(3) + local lv=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,4)}, + {b2,aux.Stringid(id,5)}) + if not lv then return end + --Decrease its Level by up to 2 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(-lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c73496100.lua b/official/c73496100.lua new file mode 100644 index 0000000000..0fefdbca6e --- /dev/null +++ b/official/c73496100.lua @@ -0,0 +1,88 @@ +--ガガガイリュージョン +--Gagaga Illusion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 monster from your GY, then you can make its Level/Rank become equal to the Level/Rank of 1 "Gagaga" 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_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,1,nil) end) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Immediately after this effect resolves, Normal Summon 1 "Gagaga" monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.nstg) + e2:SetOperation(s.nsop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GAGAGA} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,0,1,nil,e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,0,1,1,nil,e,0,tp,false,false) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.lvfilter(c,lv_rank) + local c_haslevel,c_hasrank=c:HasLevel(),c:HasRank() + if not (c:IsSetCard(SET_GAGAGA) and (c_haslevel or c_hasrank) and c:IsFaceup()) then return false end + if c_haslevel then + return not c:IsLevel(lv_rank) + elseif c_hasrank then + return not c:IsRank(lv_rank) + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then + local tc_haslevel,tc_hasrank=tc:HasLevel(),tc:HasRank() + if not (tc_haslevel or tc_hasrank) then return end + local lv_rank=tc_haslevel and tc:GetLevel() or tc:GetRank() + if Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil,lv_rank) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local sc=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,lv_rank):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + local eff_code=tc_haslevel and EFFECT_CHANGE_LEVEL or EFFECT_CHANGE_RANK + local sc_lv_rank=sc:HasLevel() and sc:GetLevel() or sc:GetRank() + Duel.BreakEffect() + --Its Level/Rank become equal to the Level/Rank of 1 "Gagaga" monster you control + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(eff_code) + e1:SetValue(sc_lv_rank) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + end +end +function s.nsfilter(c) + return c:IsSetCard(SET_GAGAGA) and c:IsSummonable(true,nil) +end +function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.nsop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end +end \ No newline at end of file diff --git a/official/c7656689.lua b/official/c7656689.lua new file mode 100644 index 0000000000..70d8803911 --- /dev/null +++ b/official/c7656689.lua @@ -0,0 +1,71 @@ +--エンディミオンの侍女ジェニー +--Genni, the Maid of Endymion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,nil) end) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Banish 1 Spellcaster monster you control, and if you do, Special Summon 1 "Witchcrafter" monster from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.rmsptg) + e2:SetOperation(s.rmspop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_series={SET_WITCHCRAFTER} +s.listed_names={id} +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.rmfilter(c,tp) + return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemove() and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.deckspfilter(c,e,tp) + return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.rmsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.rmfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.rmspop(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 Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c8778267.lua b/official/c8778267.lua new file mode 100644 index 0000000000..283d61c849 --- /dev/null +++ b/official/c8778267.lua @@ -0,0 +1,69 @@ +--ペネトレーション・フュージョン +--Penetration Fusion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters from your hand or field, and if you do, it gains this effect: ● (Quick Effect): You can Tribute this card, then target 1 face-up monster you control; it gains 500 ATK. + local e1=Fusion.CreateSummonEff({handler=c,stage2=s.stage2}) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(function() return Duel.HasFlagEffect(0,id) end) + c:RegisterEffect(e1) + --Track if a monster is destroyed by battle + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_BATTLE_DESTROYED) + ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) + Duel.RegisterEffect(ge1,0) + end) +end +function s.stage2(e,fc,tp,sg,chk) + if chk==0 then + fc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + --Make 1 face-up monster you control gain 500 ATK + local e1=Effect.CreateEffect(fc) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.SelfTribute) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + e1:SetHintTiming(TIMING_DAMAGE_STEP) + fc:RegisterEffect(e1,true) + if not fc:IsType(TYPE_EFFECT) then + --It becomes an Effect Monster if it wasn't already + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_ADD_TYPE) + e2:SetValue(TYPE_EFFECT) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + fc:RegisterEffect(e2,true) + end + end +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,500) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --It gains 500 ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c91215724.lua b/official/c91215724.lua new file mode 100644 index 0000000000..4c00524a8e --- /dev/null +++ b/official/c91215724.lua @@ -0,0 +1,70 @@ +--ジャンク・アーマー +--Junk Armor +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Your opponent cannot target Synchro Monsters you control with "Warrior" or "Stardust" in their original names with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSynchroMonster() and c:IsOriginalSetCard({SET_WARRIOR,SET_STARDUST}) and c:IsFaceup() end) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --Special Summon it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function(e) return not e:GetHandler():IsReason(REASON_DRAW) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon 1 "Junk" or "Synchron" monster from your Deck in Defense Position, except "Junk Armor" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.SelfTribute) + e3:SetTarget(s.decksptg) + e3:SetOperation(s.deckspop) + c:RegisterEffect(e3) +end +s.listed_series={SET_WARRIOR,SET_STARDUST,SET_JUNK,SET_SYNCHRON} +s.listed_names={id} +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.deckspfilter(c,e,tp) + return c:IsSetCard({SET_JUNK,SET_SYNCHRON}) and not c:IsCode(id) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.deckspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c92517928.lua b/official/c92517928.lua new file mode 100644 index 0000000000..d47320b750 --- /dev/null +++ b/official/c92517928.lua @@ -0,0 +1,68 @@ +--ギャラクシーアイズ・アンチマター・ドラゴン +--Galaxy-Eyes Antimatter Dragon +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 9 monsters OR 1 Xyz Monster you control with 3 or more materials (transfer its materials) + Xyz.AddProcedure(c,nil,9,2,function(c) return c:IsXyzMonster() and c:GetOverlayCount()>=3 and c:IsFaceup() end,aux.Stringid(id,0),2,s.altprocop) + --Any battle damage this card with material inflicts to your opponent is halved + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e1:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) + c:RegisterEffect(e1) + --Make this card gain the ability this turn to make up to 2 attacks on monsters during each Battle Phase, then if the detached material was a monster, you can send 1 monster with its same Type from your Deck to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function() return Duel.IsAbleToEnterBP() end) + e2:SetCost(Cost.DetachFromSelf(1,1,function(e,og) local oc=og:GetFirst() e:SetLabel(oc:IsMonster() and oc:GetRace() or 0) end)) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.altprocop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not e:GetHandler():IsHasEffect(EFFECT_EXTRA_ATTACK_MONSTER) end + local detached_type=e:GetLabel() + e:SetLabel(0) + Duel.SetTargetParam(detached_type) + if detached_type>0 then + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + end +end +function s.tgfilter(c,detached_type) + return c:IsRace(detached_type) and c:IsAbleToGrave() +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK_MONSTER) then + --This card can make up to 2 attacks on monsters this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3202) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + local detached_type=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if detached_type>0 and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,detached_type) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,detached_type) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoGrave(g,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/official/c93023136.lua b/official/c93023136.lua new file mode 100644 index 0000000000..e975a5c441 --- /dev/null +++ b/official/c93023136.lua @@ -0,0 +1,50 @@ +--闇に堕ちた天使 +--Fallen Angel in Darkness +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Darklord" monster from your hand, Deck, or banishment, ignoring its Summoning conditions + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_DARKLORD} +function s.costfilter(c,e,tp) + return c:IsRace(RACE_FAIRY) and Duel.GetMZoneCount(tp,c)>0 and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DARKLORD) and c:IsMonster() and (c:IsLocation(LOCATION_HAND|LOCATION_DECK) or c:IsFaceup()) + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SendtoGrave(g,REASON_COST) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local mmz_chk=e:GetLabel()==-100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + e:SetLabel(0) + return mmz_chk and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED) +end +function s.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 g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c94384774.lua b/official/c94384774.lua new file mode 100644 index 0000000000..4f5b13ab73 --- /dev/null +++ b/official/c94384774.lua @@ -0,0 +1,128 @@ +--海老須神鮮まつり +--Ebisu Shinsen Matsuri +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SHINSEN=id+1 +local TOKEN_EBISU=id+2 +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Special Summon 1 "Shinsen Token" (Aqua/WATER/Level 3/ATK 0/DEF 0) to its controller's opponent's field in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_CUSTOM+id) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetTarget(s.shinsensptg) + e1:SetOperation(s.shinsenspop) + c:RegisterEffect(e1) + --Keep track of Special Summoned Effect Monsters + aux.GlobalCheck(s,function() + s.regspgroup=Group.CreateGroup() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_SPSUMMON_SUCCESS) + ge1:SetOperation(s.regop) + Duel.RegisterEffect(ge1,0) + end) + --Destroy both this card and as many Tokens on the field as possible, and if you do, Special Summon 1 "Ebisu Token" (Fairy/WATER/Level 7/ATK ?/DEF ?) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetRange(LOCATION_SZONE) + e2:SetCondition(function(e) return not e:GetHandler():HasFlagEffect(id+1) end) + e2:SetTarget(s.ebisusptg) + e2:SetOperation(s.ebisuspop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_SHINSEN,TOKEN_EBISU} +function s.efftgfilter(c,e) + return c:IsEffectMonster() and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and (not e or c:IsCanBeEffectTarget(e)) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.efftgfilter,nil) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + if Duel.GetCurrentChain()==0 then s.regspgroup:Clear() end + s.regspgroup:Merge(tg) + s.regspgroup:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + Duel.RaiseEvent(s.regspgroup,EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.sptgfilter(c,tp) + local target_player=1-c:GetControler() + return Duel.GetLocationCount(target_player,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SHINSEN,0,TYPES_TOKEN,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,target_player) +end +function s.shinsensptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=s.regspgroup:Filter(s.efftgfilter,nil,e):Match(s.sptgfilter,nil,tp) + if chkc then return g:IsContains(chkc) and s.efftgfilter(chkc,e) end + if chk==0 then return #g>0 end + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.shinsenspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + local target_player=1-tc:GetControler() + if Duel.GetLocationCount(target_player,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SHINSEN,0,TYPES_TOKEN,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,target_player) then + local token=Duel.CreateToken(tp,TOKEN_SHINSEN) + Duel.SpecialSummon(token,0,tp,target_player,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.ebisusptg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_TOKEN) + if chk==0 then return #g>0 and Duel.GetMZoneCount(tp,g)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_EBISU,0,TYPES_TOKEN,-2,-2,7,RACE_FAIRY,ATTRIBUTE_WATER) end + local c=e:GetHandler() + c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+c,#g+1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.ebisuspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_TOKEN) + if #g==0 then return end + local des_ct=Duel.Destroy(g+c,REASON_EFFECT) + local atk_def_val=(des_ct-1)*700 + if des_ct>=2 and Duel.GetOperatedGroup():IsContains(c) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_EBISU,0,TYPES_TOKEN,atk_def_val,atk_def_val,7,RACE_FAIRY,ATTRIBUTE_WATER) then + local token=Duel.CreateToken(tp,TOKEN_EBISU) + if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then + --This Token's ATK/DEF become the number of Tokens destroyed by this effect x 700 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK) + e1:SetValue(atk_def_val) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_SET_DEFENSE) + token:RegisterEffect(e2) + end + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/official/c95506252.lua b/official/c95506252.lua new file mode 100644 index 0000000000..91f28555b9 --- /dev/null +++ b/official/c95506252.lua @@ -0,0 +1,77 @@ +--影装騎士 ブラック・ジャク +--Black Jack the Shadow-Armored Knight +--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) + --Cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(1) + c:RegisterEffect(e1) + --Excavate cards from the top of your Deck until you excavate a monster, equip it to this card as an Equip Spell, also place the rest on the bottom of the Deck in any order + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_MOVE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(function(c) return c:IsControler(1-tp) and c:IsLocation(LOCATION_STZONE) end,1,nil) end) + e2:SetTarget(s.eqtg) + e2:SetOperation(s.eqop) + c:RegisterEffect(e2) + aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsControler(tp) and ec:IsMonster() end,Card.EquipByEffectAndLimitRegister,e2) + --Gains ATK/DEF equal to the total Levels of the monsters equipped to this card x 300 + local e3a=Effect.CreateEffect(c) + e3a:SetType(EFFECT_TYPE_SINGLE) + e3a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3a:SetCode(EFFECT_UPDATE_ATTACK) + e3a:SetRange(LOCATION_MZONE) + e3a:SetValue(function(e,c) return c:GetEquipGroup():Match(Card.HasLevel,nil):GetSum(Card.GetLevel)*300 end) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e3b) + --If the total Levels of the monsters equipped to this card is greater than 21, destroy this card + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetCode(EFFECT_SELF_DESTROY) + e4:SetRange(LOCATION_MZONE) + e4:SetCondition(function(e) return e:GetHandler():GetEquipGroup():Match(Card.HasLevel,nil):GetSum(Card.GetLevel)>21 end) + c:RegisterEffect(e4) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) + if deck_count==0 then return end + Duel.DisableShuffleCheck() + local g=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_DECK,0,nil) + if #g==0 then + Duel.ConfirmDecktop(tp,deck_count) + Duel.SortDeckbottom(tp,tp,deck_count) + return + end + local c=e:GetHandler() + local ec=g:GetMaxGroup(Card.GetSequence):GetFirst() + local ec_seq=ec:GetSequence() + Duel.ConfirmDecktop(tp,deck_count-ec_seq) + local top_g=Duel.GetDecktopGroup(tp,deck_count-ec_seq) + if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0 + and not ec:IsForbidden() and ec:CheckUniqueOnField(tp) then + c:EquipByEffectAndLimitRegister(e,tp,ec,nil,true) + else + Duel.SendtoGrave(ec,REASON_RULE) + end + top_g:RemoveCard(ec) + Duel.MoveToDeckBottom(top_g,tp) + Duel.SortDeckbottom(tp,tp,#top_g) +end \ No newline at end of file diff --git a/official/c95915457.lua b/official/c95915457.lua new file mode 100644 index 0000000000..29b7472624 --- /dev/null +++ b/official/c95915457.lua @@ -0,0 +1,104 @@ +--ミラーバリア +--Mirror Barrier +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Equip this card to 1 face-up monster you control as an Equip Card with this effect: ● Once per Battle Step, if the equipped monster battles an opponent's monster: You can destroy that opponent's monster. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(aux.RemainFieldCost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_PHASE|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Add 1 "Armament Reincarnation" 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_DESTROYED) + e2:SetCountLimit(1,id) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={53770666} --"Armament Reincarnation" +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 chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then + --● Once per Battle Step, if the equipped monster battles an opponent's monster: You can destroy that opponent's monster. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetCondition(s.descon) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + e1:SetHintTiming(TIMING_BATTLE_PHASE) + c:RegisterEffect(e1) + --Equip limit + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_EQUIP_LIMIT) + e2:SetValue(function(e,c) return c==tc end) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e2) + else + c:CancelToGrave(false) + end +end +function s.thfilter(c) + return c:IsCode(53770666) 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.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (Duel.IsBattleStep() and not c:HasFlagEffect(id)) then return false end + local ec=c:GetEquipTarget() + local bc=ec:GetBattleTarget() + return ec and ec:IsRelateToBattle() and bc and bc:IsControler(1-tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + local bc=c:GetEquipTarget():GetBattleTarget() + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + if bc:IsRelateToEffect(e) and bc:IsControler(1-tp) then + Duel.Destroy(bc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c9591819.lua b/official/c9591819.lua new file mode 100644 index 0000000000..6207bfc072 --- /dev/null +++ b/official/c9591819.lua @@ -0,0 +1,86 @@ +--ガガガの脱出劇 +--Gagaga Escape +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation, then you can discard 1 card, and if you do, Special Summon 1 "Gagaga" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Change as many "Gagaga" monsters you control as possible to Defense Position, and if you do, "Gagaga" monsters you control cannot be destroyed by battle or card effects this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_GAGAGA} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsChainNegatable(ev) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)>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 + end +end +function s.posfilter(c) + return c:IsSetCard(SET_GAGAGA) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEUP_DEFENSE) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) + if #g>0 and Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)>0 then + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --"Gagaga" monsters you control cannot be destroyed by battle or card effects this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_GAGAGA) end) + e1:SetValue(1) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + Duel.RegisterEffect(e2,tp) + end +end \ No newline at end of file diff --git a/official/c96228804.lua b/official/c96228804.lua new file mode 100644 index 0000000000..2948e505c7 --- /dev/null +++ b/official/c96228804.lua @@ -0,0 +1,66 @@ +--聖月の皇太子レグルス +--Regulus, the Prince of Endymion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --The first time this card would be destroyed by battle each turn, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetValue(function(e,re,r,rp) return (r&REASON_BATTLE)>0 end) + c:RegisterEffect(e1) + --Lose LP equal to the revealed Spellcaster monster's Level x 300, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.Reveal(function(c) return c:IsRace(RACE_SPELLCASTER) and c:HasLevel() end,true,1,1,function(e,tp,og) e:SetLabel(og:GetFirst():GetLevel()) end)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 Spell that mentions "Regulus, the Prince of Endymion" 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_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION} +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) + Duel.SetLP(tp,Duel.GetLP(tp)-e:GetLabel()*300) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSpell() and c:ListsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION) 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/c100296301.lua b/pre-release/c100296301.lua new file mode 100644 index 0000000000..7fd77eb923 --- /dev/null +++ b/pre-release/c100296301.lua @@ -0,0 +1,67 @@ +--エンディミオンの侍女ヴェール +--Verre, the Maid of Endymion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Gains 2300 ATK while you have "Regulus, the Prince of Endymion" in your field or GY + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_REGULUS_THE_PRINCE_OF_ENDYMION),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end) + e1:SetValue(2300) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Witchcrafter" Spell/Trap or "Magical Dimension" 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_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) +end +s.listed_series={SET_WITCHCRAFTER} +s.listed_names={CARD_REGULUS_THE_PRINCE_OF_ENDYMION,28553439} --"Magical Dimension" +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return ((c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpellTrap()) or c:IsCode(28553439)) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end diff --git a/pre-release/c100444301.lua b/pre-release/c100444301.lua new file mode 100644 index 0000000000..6b547b8c58 --- /dev/null +++ b/pre-release/c100444301.lua @@ -0,0 +1,98 @@ +--大輪の霊使い +--Charmers of the Grand Circle +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2+ "Charmer" and/or "Familiar-Possessed" monsters + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,{SET_CHARMER,SET_FAMILIAR_POSSESSED}),2,99) + --Keep track of the number of different original Attributes of the monsters used as its material + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():GetClassCount(Card.GetOriginalAttribute)) end) + c:RegisterEffect(e0) + --Repeat the process of applying 1 of these effects, up to the number of different original Attributes of the monsters used as its material (max. 4) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_SEARCH+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():IsFusionSummoned() end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetLabelObject(e0) + c:RegisterEffect(e1) +end +s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED,SET_POSSESSED} +s.material_setcode={SET_CHARMER,SET_FAMILIAR_POSSESSED} +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local material_check_eff=e:GetLabelObject() + local label=material_check_eff:GetLabel() + if chk==0 then return label>0 end + material_check_eff:SetLabel(0) + Duel.SetTargetParam(label) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,800) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:IsSetCard(SET_POSSESSED) and c:IsSpellTrap() and c:IsAbleToHand() +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local b1,b2,b3,b4,b5,op + local max_count=math.min(Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM),4) + local remaining_count=max_count + repeat + b1=c:IsRelateToEffect(e) and c:IsFaceup() + b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + b3=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + b4=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) + if not (b1 or b2 or b3 or b4) then return end + b5=remaining_count0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + elseif op==3 then + --Return 1 card on the field to the hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + elseif op==4 then + --Special Summon 1 Spellcaster monster from your GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(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 + elseif op==5 then + --Finish applying effects + return + end + until remaining_count==0 +end \ No newline at end of file diff --git a/pre-release/c100444302.lua b/pre-release/c100444302.lua new file mode 100644 index 0000000000..4f4780ef4d --- /dev/null +++ b/pre-release/c100444302.lua @@ -0,0 +1,72 @@ +--大輪の魔導書 +--Spellbook of the Grand Circle +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 4 "Charmer" monsters with different Attributes from your Deck, GY, and/or banishment to your hand, then shuffle 2 cards from your hand into the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Fusion Summon 1 Fusion Monster from your Extra Deck, using "Charmer" and/or "Familiar-Possessed" monsters from your hand or field, also your opponent cannot activate cards or effects when a monster is Fusion Summoned this way + local fusion_params={ + matfilter=function(c) return c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) end, + stage2=s.stage2 + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED} +function s.thfilter(c) + return c:IsSetCard(SET_CHARMER) and c:IsMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) + and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,nil) + return aux.SelectUnselectGroup(g,e,tp,4,4,aux.dpcheck(Card.GetAttribute),0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,nil) + if #g<4 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,4,4,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_ATOHAND) + if #sg==4 and Duel.SendtoHand(sg,nil,REASON_EFFECT)==4 then + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local tdg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,2,nil) + if #tdg==2 then + Duel.BreakEffect() + Duel.SendtoDeck(tdg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end +end +function s.stage2(e,fc,tp,sg,chk) + if chk==1 then + --Your opponent cannot activate cards or effects when a monster is Fusion Summoned this way + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_END) + e1:SetOperation(function(e) + Duel.SetChainLimitTillChainEnd(function(e,ep,tp) return tp==ep end) + e:Reset() + end) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100451001.lua b/pre-release/c100451001.lua new file mode 100644 index 0000000000..e6cbf31d14 --- /dev/null +++ b/pre-release/c100451001.lua @@ -0,0 +1,73 @@ +--王のしもべ-ブラック・マジシャン +--Dark Magician, the Pharaoh's Servant +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Change name + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e1:SetValue(CARD_DARK_MAGICIAN) + c:RegisterEffect(e1) + --special summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.Reveal(function(c) return c:IsSpell() end)) + e2:SetTarget(s.hsptg) + e2:SetOperation(s.hspop) + c:RegisterEffect(e2) + --destroy + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCost(Cost.Discard(function(c) return c:IsSpell() end)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) + c:RegisterEffect(e3) +end +s.listed_names={CARD_DARK_MAGICIAN} +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) +end +function s.setfilter(c) + return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and c:IsSSetable() +end +function s.hspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SSet(tp,sg) + end + end + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100451004.lua b/pre-release/c100451004.lua new file mode 100644 index 0000000000..94070de536 --- /dev/null +++ b/pre-release/c100451004.lua @@ -0,0 +1,74 @@ +--F・HERO シャイニング・フレア・ウィングマン +--Favorite HERO Shining Flare Wingman +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Fusion Monster + 1 face-up monster on the field + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),s.matfilter) + --to deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW|CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) + --Inflict damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCondition(aux.bdcon) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.matfilter(c) + return c:IsFaceup() and c:IsOnField() +end +function s.tdfilter(c) + return c:IsMonster() and c:IsAbleToDeck() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) + and Duel.IsPlayerCanDraw(tp,2) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(2) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) + if #g~=5 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 then + if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + Duel.BreakEffect() + if Duel.Draw(p,d,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then + c:UpdateAttack(1000) + end + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() + if dam<0 then dam=0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c100451007.lua b/pre-release/c100451007.lua new file mode 100644 index 0000000000..1f8566084b --- /dev/null +++ b/pre-release/c100451007.lua @@ -0,0 +1,89 @@ +--スターダスト・ドラゴン-ヴィクテム・サンクチュアリ +--Stardust Dragon - Victim Sanctuary +--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) + --When your opponent activates a card or effect in response to your card or effect activation (Quick Effect): You can Tribute this card; negate that opponent's effect, and if you do, destroy that card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.discon) + e1:SetCost(Cost.AND(aux.StardustCost,Cost.HardOncePerChain(id))) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --If a monster(s) in your possession was Tributed this turn (Quick Effect): You can banish this card from your GY; Special Summon 1 "Stardust" Synchro 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_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id+100) end) + e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.HardOncePerChain(id))) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) + --Keep track of monsters being Tributed + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_RELEASE) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_STARDUST} +function s.checkfilter(c) + return c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local g=eg:Filter(s.checkfilter,nil) + if g:IsExists(Card.IsPreviousControler,1,nil,0) then + Duel.RegisterFlagEffect(0,id+100,RESET_PHASE|PHASE_END,0,1) + end + if g:IsExists(Card.IsPreviousControler,1,nil,1) then + Duel.RegisterFlagEffect(1,id+100,RESET_PHASE|PHASE_END,0,1) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local ch=Duel.GetCurrentChain()-1 + return ch>0 and ep==1-tp and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER)==tp and Duel.IsChainDisablable(ev) +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 +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_STARDUST) and c:IsSynchroMonster() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.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 g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100451010.lua b/pre-release/c100451010.lua new file mode 100644 index 0000000000..7df68f2449 --- /dev/null +++ b/pre-release/c100451010.lua @@ -0,0 +1,104 @@ +--No.39 光の使者 希望皇ホープ +--Number 39: Utopia the Envoy of Light +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Cannot be destroyed by battle, except with a "Number" monster + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) + c:RegisterEffect(e1) + --(Quick Effect): You can detach 1 material from this card, then target 1 monster you control; the first time it would be destroyed by battle or card effect this turn, it is not destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.DetachFromSelf(1)) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) + --When the second attack of this turn is declared: You can make this card gain 2500 ATK, and if you do, it gains this effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function() return Duel.GetFlagEffect(0,id)==1 end) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) + --Keep track of attacks being declared + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_ATTACK_ANNOUNCE) + ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_NUMBER} +s.xyz_number=39 +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + --The first time it would be destroyed by battle or card effect this turn, it is not destroyed + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3001) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetCountLimit(1) + e1:SetValue(s.indesval) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.indesval(e,re,r,rp) + if r&(REASON_BATTLE|REASON_EFFECT)>0 then + e:Reset() + return true + end + return false +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 2500 ATK + c:UpdateAttack(2500) + --When this card destroys a monster by battle and sends it to the GY: You can Special Summon it to your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(aux.bdgcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetTargetCard(bc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,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/c100451013.lua b/pre-release/c100451013.lua new file mode 100644 index 0000000000..5aa26c910d --- /dev/null +++ b/pre-release/c100451013.lua @@ -0,0 +1,130 @@ +--四天の龍 オッドアイズ・ペンデュラム・ドラゴン +--Odd-Eyes Pendulum Dragon of the Four Heavenly Dragons +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --search and destroy + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY|CATEGORY_TOHAND|CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --atk up + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e2:SetValue(s.atkval) + c:RegisterEffect(e2) + --double damage + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e3:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) + c:RegisterEffect(e3) + --to hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.thcon2) + e4:SetTarget(s.thtg2) + e4:SetOperation(s.thop2) + c:RegisterEffect(e4) +end +function s.thfilter(c) + return c:IsPendulumMonster() and c:IsAttackBelow(1500) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 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 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.actlimit) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetLabelObject(e1) + e0:SetOperation(s.checkop) + e0:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e0,tp) +end +function s.actlimit(e,re) + local rc=re:GetHandler() + return rc and rc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() +end +function s.psfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local ef=e:GetLabelObject() + if ef and eg and eg:IsExists(s.psfilter,1,nil,tp) then + ef:Reset() + e:Reset() + end +end +function s.atkval(e,c) + local pg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_PZONE,0) + if #pg~=2 then return 0 end + local pc1,pc2=pg:GetFirst(),pg:GetNext() + return math.abs(pc1:GetScale()-pc2:GetScale())*300 +end +function s.thcon2(e,tp,eg,ep,ev,re,r,rp) + return r&(REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) +end +function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + if rp==1-tp then + e:SetLabel(1) + else + e:SetLabel(0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) + if e:GetLabel()==1 then + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) + end +end +function s.thop2(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 + and e:GetLabel()==1 and c:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(tp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100451016.lua b/pre-release/c100451016.lua new file mode 100644 index 0000000000..ceef53244d --- /dev/null +++ b/pre-release/c100451016.lua @@ -0,0 +1,74 @@ +--デコード・トーカー・インテグレーション +--Decode Talker Integration +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) + --atk up + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_EMZONE) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --cannot be target + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetRange(LOCATION_EMZONE) + e2:SetValue(aux.tgoval) + c:RegisterEffect(e2) + --to grave + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCost(s.cost) + e3:SetTarget(s.target) + e3:SetOperation(s.operation) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +function s.atkval(e,c) + return Duel.GetMatchingGroupCount(Card.IsLinkMonster,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,e:GetHandler())*500 +end +function s.cfilter(c,g) + return g:IsContains(c) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local lg=e:GetHandler():GetLinkedGroup() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,lg) end + local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,lg) + Duel.Release(g,REASON_COST) +end +function s.filter(c) + return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil) + if #g==0 then return end + Duel.SendtoGrave(g,REASON_EFFECT) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) + 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/c100451019.lua b/pre-release/c100451019.lua new file mode 100644 index 0000000000..d3ccd4dfdb --- /dev/null +++ b/pre-release/c100451019.lua @@ -0,0 +1,90 @@ +--黄泉天輪 +--Underworld Circle +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Allow each player to Special Summon 1 monster from their GY during the Standby Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,5,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_GRAVE,5,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spnormalfilter(c,e,tp) + return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local rg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToRemove,Card.IsMonster),tp,LOCATION_DECK,LOCATION_DECK,nil) + if #rg==0 then return end + Duel.BreakEffect() + if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.ignoresumconsp(e,p) + if Duel.GetLocationCount(p,LOCATION_MZONE)==0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,p,LOCATION_GRAVE,0,nil,e,p) + if #g==0 or not Duel.SelectYesNo(p,aux.Stringid(id,3)) then return end + Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) + local tc=g:Select(p,1,1,nil):GetFirst() + if tc and Duel.SpecialSummonStep(tc,0,p,p,true,false,POS_FACEUP) then + --Banish it if it leaves the field + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + tc:RegisterEffect(e1,true) + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local turn_p=Duel.GetTurnPlayer() + s.ignoresumconsp(e,turn_p) + s.ignoresumconsp(e,1-turn_p) + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100451025.lua b/pre-release/c100451025.lua new file mode 100644 index 0000000000..66b9443318 --- /dev/null +++ b/pre-release/c100451025.lua @@ -0,0 +1,112 @@ +--大精霊機巧軍-ペンデュラム・ルーラー +--Master Spirit Tech Force - Pendulum Ruler +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c,false) + --Fusion Materials: 1 Level 7 or higher Pendulum Monster + 1 Pendulum Monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) + --During your Main Phase: You can return this card to the Extra Deck, then you can add 1 Level 7 Pendulum Monster from your Deck or face-up Extra 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_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.textg) + e1:SetOperation(s.texop) + 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:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(1) + c:RegisterEffect(e2) + --Your opponent's monsters cannot attack, except Pendulum Monsters without a Level + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_CANNOT_ATTACK) + e3:SetRange(LOCATION_MZONE) + e3:SetTarget(function(e,c) return not (c:IsPendulumMonster() and not c:HasLevel()) end) + e3:SetTargetRange(0,LOCATION_MZONE) + c:RegisterEffect(e3) + --You can Tribute 1 monster, then target 1 card your opponent controls; destroy it, and if you do, inflict 1600 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(2,{id,1}) + e4:SetCost(s.descost) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) + --Once per turn: You can place this card in your Pendulum Zone + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,2)) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e5:SetOperation(s.plop) + c:RegisterEffect(e5) +end +function s.matfilter(c,fc,sumtype,tp) + return c:IsLevelAbove(7) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) +end +function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToExtra() end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.thfilter(c) + return c:IsLevel(7) and c:IsPendulumMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToHand() +end +function s.texop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.descostfilter(c,tp) + local exg=c:GetEquipGroup()+c + return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,exg) +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,1,false,nil,nil,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,1,1,false,nil,nil,tp) + Duel.Release(g,REASON_COST) +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) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,1600,REASON_EFFECT) + end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c100452001.lua b/pre-release/c100452001.lua new file mode 100644 index 0000000000..20708329b8 --- /dev/null +++ b/pre-release/c100452001.lua @@ -0,0 +1,94 @@ +--白き幻獣-青眼の白龍 +--Blue-Eyes White Dragon, the White Phantom Beast +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When a card or effect is activated that targets this card on the field (Quick Effect): You can discard 1 card; negate that effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(s.discon) + e1:SetCost(Cost.Discard()) + e1:SetTarget(s.distg) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) + c:RegisterEffect(e1) + --When this card is added from the Deck to your hand, or your monster is destroyed by battle: You can reveal this card in your hand; Special Summon it + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_TO_HAND) + e2a:SetCountLimit(1,{id,0}) + e2a:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_DECK) end) + e2a:SetCost(Cost.SelfReveal) + e2a:SetTarget(s.sptg) + e2a:SetOperation(s.spop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2b:SetCode(EVENT_BATTLE_DESTROYED) + e2b:SetRange(LOCATION_HAND) + e2b:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsPreviousControler,1,nil,tp) end) + c:RegisterEffect(e2b) + --If this card is Special Summoned from the hand or Deck: You can destroy all monsters your opponent controls, also you cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND|LOCATION_DECK) end) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLUE_EYES} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsContains(c) 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,0,0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) + --You cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_BLUE_EYES) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100452004.lua b/pre-release/c100452004.lua new file mode 100644 index 0000000000..d61e3dab89 --- /dev/null +++ b/pre-release/c100452004.lua @@ -0,0 +1,69 @@ +--終撃竜-サイバー・エンド・ドラゴン +--Cyber End Dragon the Decisive Strike Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Machine monsters with 2100 or more ATK + Fusion.AddProcMixN(c,true,true,s.matfilter,3) + c:AddMustBeFusionSummoned() + --material check + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --search + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e0:GetLabel()==1 end) + e1:SetCost(Cost.PayLP(4000)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --pierce + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_PIERCE) + c:RegisterEffect(e2) + --extra att + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_EXTRA_ATTACK) + e3:SetCondition(s.atcon) + e3:SetValue(2) + c:RegisterEffect(e3) +end +s.listed_names={23171610} +function s.matfilter(c,sc,st,tp) + return c:IsRace(RACE_MACHINE,sc,st,tp) and c:IsAttackAbove(2100) +end +function s.valcheck(e,c) + local mg=c:GetMaterial() + e:SetLabel(mg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)==#mg and 1 or 0) +end +function s.thfilter(c) + return c:IsCode(23171610) 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.atcon(e) + local c=e:GetHandler() + return c:GetAttack()>c:GetBaseAttack() +end \ No newline at end of file diff --git a/pre-release/c100452007.lua b/pre-release/c100452007.lua new file mode 100644 index 0000000000..75211ae5e5 --- /dev/null +++ b/pre-release/c100452007.lua @@ -0,0 +1,94 @@ +--赤き竜-ケッツァーコアトル +--Crimson Dragon Quetzacoatl +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --special summon + 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,0}) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --atk up + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(s.atkval) + c:RegisterEffect(e2) + --negate + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOEXTRA|CATEGORY_NEGATE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.negcon) + e3:SetTarget(s.negtg) + e3:SetOperation(s.negop) + c:RegisterEffect(e3) +end +function s.spfilter(c,e,tp) + return c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end + if ft>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,ft,ft,nil) + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon 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) + Duel.RegisterEffect(e1,tp) +end +function s.atkval(e,c) + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()):GetSum(Card.GetBaseAttack) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsChainNegatable(ev) and rp==1-tp and re:IsMonsterEffect() +end +function s.negfilter(c) + return c:IsFaceup() and c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.negfilter,tp,LOCATION_MZONE,0,1,1,exc) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + Duel.NegateActivation(ev) + end +end \ No newline at end of file diff --git a/pre-release/c100452010.lua b/pre-release/c100452010.lua new file mode 100644 index 0000000000..b39ef063a8 --- /dev/null +++ b/pre-release/c100452010.lua @@ -0,0 +1,97 @@ +--超銀河眼の光子龍-フォトン・ハウリング +--Neo Galaxy-Eyes Photon Dragon - Photon Howling +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 8 monsters OR 1 Rank 8 Xyz Monster + Xyz.AddProcedure(c,nil,8,3,s.altmatfilter,aux.Stringid(id,0),3,s.xyzop) + --Take 1 "Photon" monster from your Deck, and either Special Summon it in Defense Position or attach it to this card as material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + 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:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(s.spattachtg) + e1:SetOperation(s.spattachop) + c:RegisterEffect(e1) + --Tribute 1 other Xyz Monster, and if you do, negate the effects of all other face-up cards currently on the field until the end of this turn. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.DetachFromSelf(3)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_series={SET_PHOTON} +function s.altmatfilter(c,tp,xyzc) + return c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRank(8) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) + return true +end +function s.spcheck(c,e,tp,mmz_chk) + return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.attachcheck(c,e,tp) + return c:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) +end +function s.spattachfilter(c,e,tp,mmz_chk) + return c:IsSetCard(SET_PHOTON) and c:IsMonster() and (s.spcheck(c,e,tp,mmz_chk) or s.attachcheck(c,e,tp)) +end +function s.spattachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if chk==0 then return Duel.IsExistingMatchingCard(s.spattachfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_chk) end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spattachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,s.spattachfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not sc then return end + local b1=s.spcheck(sc,e,tp,mmz_chk) + local b2=s.attachcheck(sc,e,tp) and c:IsRelateToEffect(e) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,4)}, --"Special Summon it in Defense Position" + {b2,aux.Stringid(id,5)}) --"Attach it to this card as material" + if op==1 then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + elseif op==2 then + Duel.Overlay(c,sc,true) + end +end +function s.xyzfilter(c,self_exc) + return c:IsXyzMonster() and c:IsReleasableByEffect() + and Duel.IsExistingMatchingCard(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,self_exc)) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,c,c) end + local g=Duel.GetMatchingGroup(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,c) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g-1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,exc,exc) + if not sc then return end + Duel.HintSelection(sc) + if Duel.Release(sc,REASON_EFFECT)>0 then + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) + --Negate the effects of all other face-up cards currently on the field until the end of this turn + for tc in g:Iter() do + tc:NegateEffects(c,RESET_PHASE|PHASE_END) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452013.lua b/pre-release/c100452013.lua new file mode 100644 index 0000000000..8f7fb64afc --- /dev/null +++ b/pre-release/c100452013.lua @@ -0,0 +1,76 @@ +--四天の龍 スターヴ・ヴェノム・フュージョン・ドラゴン +--Starving Venom Fusion Dragon of the Four Heavenly Dragons +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 DARK monsters on the field + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + --atk to 0 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --fusion summon + local fusion_params={ + handler=c, + fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) end, + matfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsOnField() end, + extrafil=s.fextra, + gc=Fusion.ForcedHandler + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_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:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_PREDAPLANT} +s.material_location=LOCATION_ONFIELD +function s.matfilter(c,fc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsOnField() +end +function s.atkfilter(c) + return c:IsFaceup() and (c:HasNonZeroAttack() or c:IsNegatableMonster() or c:IsAttributeExcept(ATTRIBUTE_DARK)) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + tc:NegateEffects(c) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(ATTRIBUTE_DARK) + tc:RegisterEffect(e2) + end +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) +end \ No newline at end of file diff --git a/pre-release/c100452016.lua b/pre-release/c100452016.lua new file mode 100644 index 0000000000..1e6cd93973 --- /dev/null +++ b/pre-release/c100452016.lua @@ -0,0 +1,77 @@ +--ヴァレルロード・L・ドラゴン +--Borreload Liberator Dragon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 3+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) + --You can only Special Summon "Borreload Liberator Dragon(s)" once per turn + c:SetSPSummonOnce(id) + --Place 1 monster your opponent controls in a zone this card points to and take control of it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(s.controltg) + e1:SetOperation(s.controlop) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_PHASE|TIMING_BATTLE_END) + c:RegisterEffect(e1) + --Destroy 1 monster you control and Special Summon itself from the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) + c:RegisterEffect(e2) +end +function s.controlfilter(c,zones) + return c:IsControlerCanBeChanged(false,zones) +end +function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk) + local zones=e:GetHandler():GetLinkedZone()&ZONES_MMZ + if chk==0 then return Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil,zones) end + Duel.SetChainLimit(function(e,ep,tp) return tp==ep end) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) +end +function s.controlop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local zones=c:GetLinkedZone()&ZONES_MMZ + if not (c:IsRelateToEffect(e) and zones~=0) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil,zones) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp,0,0,zones) + end +end +function s.desfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100452024.lua b/pre-release/c100452024.lua new file mode 100644 index 0000000000..e41fcf7161 --- /dev/null +++ b/pre-release/c100452024.lua @@ -0,0 +1,76 @@ +--ガトリング・オーガ +--Gatling Ogre +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Inflict 800 damage to your damage for each facedow Spell/Trap Card sent to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(3,id) + e1:SetCost(s.damcost) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --When this card is targeted for an attack: Inflict 500 damage for each Attack Position monster they control, then end the Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.damendbptg) + e2:SetOperation(s.damendbpop) + c:RegisterEffect(e2) +end +function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,nil) + if chk==0 then return #g>0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,1,#g,nil) + e:SetLabel(#g) + Duel.SendtoGrave(g,REASON_COST) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetLabel()*800 + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) + --Your opponent takes no damage from non-Fiend monsters' effects for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CHANGE_DAMAGE) + e1:SetTargetRange(0,1) + e1:SetValue(s.damval) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damval(e,re,val,r,rp,rc) + if re and r&REASON_EFFECT>0 and re:IsMonsterEffect() and re:GetHandler():IsRaceExcept(RACE_FIEND) then + return 0 + else + return val + end +end +function s.damendbptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) + if chk==0 then return ct>0 end + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) +end +function s.damendbpop(e,tp,eg,ep,ev,re,r,rp) + local dam=500*Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) + if dam>0 and Duel.Damage(1-tp,dam,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + end +end \ No newline at end of file diff --git a/pre-release/c100452025.lua b/pre-release/c100452025.lua new file mode 100644 index 0000000000..c5bf946b79 --- /dev/null +++ b/pre-release/c100452025.lua @@ -0,0 +1,94 @@ +--インフェルニティ・デス・ガンマン +--Infernity Doom Slinger +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --During your Main Phase: You can Special Summon 1 Fiend monster 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_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If you have no cards in your hand (Quick Effect): You can banish this card from your GY; your opponent chooses 1 of these effects for you to apply + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,4000) end) + e2:SetOperation(s.effop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_FIEND) 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 +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local top_card=Duel.GetDecktopGroup(tp,1):GetFirst() + local b1=top_card + local b2=true + local op=Duel.SelectEffect(1-tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + local c=e:GetHandler() + if op==1 then + --Reveal the top card of your Deck, and if it is a monster, your opponent takes any effect damage you would have taken this turn instead. Otherwise, you take 4000 damage + Duel.ConfirmDecktop(tp,1) + if top_card:IsMonster() then + --Your opponent takes any effect damage you would have taken this turn instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_REFLECT_DAMAGE) + e1:SetTargetRange(1,0) + e1:SetValue(function(e,_,_,r) return (r&REASON_EFFECT)==REASON_EFFECT end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + else + Duel.Damage(tp,4000,REASON_EFFECT) + end + elseif op==2 then + --You take no effect damage this turn + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,5)) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e2a:SetCode(EFFECT_CHANGE_DAMAGE) + e2a:SetTargetRange(1,0) + e2a:SetValue(s.damval) + e2a:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2a,tp) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_NO_EFFECT_DAMAGE) + Duel.RegisterEffect(e2b,tp) + end +end +function s.damval(e,re,val,r,rp,rc) + if (r&REASON_EFFECT)>0 then + return 0 + else + return val + end +end \ No newline at end of file diff --git a/pre-release/c101304005.lua b/pre-release/c101304005.lua new file mode 100644 index 0000000000..ba8c58e3b7 --- /dev/null +++ b/pre-release/c101304005.lua @@ -0,0 +1,92 @@ +--バスターソニック・ウォリアー +--Assault Sonic Warrior +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If you control "Junk Warrior", "Assault Mode Activate", or a card that mentions either of them: You can 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,0}) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can add 1 "Synchron" monster or "Assault Mode Activate" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --If this card is sent to the GY as Synchro Material: You can activate this effect; this turn, monsters you control gain 500 ATK + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SYNCHRON} +s.listed_names={CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE} +function s.spconfilter(c) + return (c:IsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE)) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) +end +function s.thfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return ((c:IsSetCard(SET_SYNCHRON) and c:IsMonster()) or c:IsCode(CARD_ASSAULT_MODE)) 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.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --This turn, monsters you control gain 500 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetValue(500) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101304006.lua b/pre-release/c101304006.lua new file mode 100644 index 0000000000..78f1d5b09f --- /dev/null +++ b/pre-release/c101304006.lua @@ -0,0 +1,88 @@ +--重装騎士バベルデッカー +--Heavy Knight Babel Decker +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Normal Summon this card without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(s.ntcon) + c:RegisterEffect(e1) + --Special Summon 1 EARTH Machine monster from your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,0}) + e2a:SetTarget(s.handsptg) + e2a:SetOperation(s.handspop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Special Summon 1 Rank 10 EARTH Machine Xyz Monster from your Extra Deck using this card you control as material (this is treated as an Xyz Summon) + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) + e3:SetTarget(s.extrasptg) + e3:SetOperation(s.extraspop) + c:RegisterEffect(e3) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,aux.FALSE) +end +function s.ntcon(e,c,minc) + if c==nil then return true end + return minc==0 and c:IsLevelAbove(4) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 +end +function s.handspfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.handspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.handspfilter,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 +function s.extraspfilter(c,e,tp,mc) + return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(10) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) + and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.extrasptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) + and Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.extraspop(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.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c):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 + xc:CompleteProcedure() + end +end \ No newline at end of file diff --git a/pre-release/c101304007.lua b/pre-release/c101304007.lua new file mode 100644 index 0000000000..7552558ffa --- /dev/null +++ b/pre-release/c101304007.lua @@ -0,0 +1,78 @@ +--夜光列車ブルートラベラー +--Noctilucent Train Bleu Traveler +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Train Connection" or "Revolving Switchyard" 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_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon both 1 other EARTH Machine monster in your GY and this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={60879050,76136345} --"Train Connection", "Revolving Switchyard" +function s.thfilter(c) + return c:IsCode(60879050,76136345) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + Duel.SpecialSummon(Group.FromCards(c,tc),0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine 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_MACHINE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101304008.lua b/pre-release/c101304008.lua new file mode 100644 index 0000000000..c1dea0bda5 --- /dev/null +++ b/pre-release/c101304008.lua @@ -0,0 +1,97 @@ +--捕食植物テッポウリザード +--Predaplant Lilizard +--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_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --1 face-up monster becomes DARK until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.attg) + e2:SetOperation(s.atop) + c:RegisterEffect(e2) + --Draw 1 card if this card is Special Summoned from the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DRAW) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_GRAVE) end) + e3:SetTarget(s.drtg) + e3:SetOperation(s.drop) + c:RegisterEffect(e3) +end +s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} +s.listed_names={CARD_POLYMERIZATION} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_PREDAPLANT,SET_STARVING_VENOM}),tp,LOCATION_MZONE,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:Select(tp,1,1,nil) + if #sg==0 then return end + Duel.BreakEffect() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end +end +function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttributeExcept(ATTRIBUTE_DARK) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) +end +function s.atop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + --It becomes DARK until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e1:SetValue(ATTRIBUTE_DARK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end diff --git a/pre-release/c101304009.lua b/pre-release/c101304009.lua new file mode 100644 index 0000000000..5028a19f87 --- /dev/null +++ b/pre-release/c101304009.lua @@ -0,0 +1,98 @@ +--捕食植物ロンギネフィラ +--Predaplant Longinephila +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Predap" card from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Activate 1 of the following effects (Place Predator Counter, Set "Polymerization" from GY or banishment) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_PREDAP} +s.listed_names={CARD_POLYMERIZATION,id} +s.counter_place_list={COUNTER_PREDATOR} +function s.predapthfilter(c) + return c:IsSetCard(SET_PREDAP) 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.predapthfilter,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.predapthfilter,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.predctfilter(c) + return c:IsFaceup() and c:IsCanAddCounter(COUNTER_PREDATOR,1) +end +function s.polysetfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsFaceup() and c:IsSSetable() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b2=Duel.IsExistingMatchingCard(s.polysetfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_COUNTER) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_PREDATOR) + elseif op==2 then + Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Place 1 Predator Counter on 1 monster on the field and make it Level 1 so long as it has a Predator Counter if it is Level 2 or higher + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) + local tc=Duel.SelectMatchingCard(tp,s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if not tc then return end + Duel.HintSelection(tc) + if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then + --It becomes Level 1 as long as it has a Predator Counter + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + elseif op==2 then + --Set 1 "Polymerization" from your GY or banishment + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.polysetfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #sg>0 then + Duel.HintSelection(sg) + Duel.SSet(tp,sg) + end + end +end \ No newline at end of file diff --git a/pre-release/c101304016.lua b/pre-release/c101304016.lua new file mode 100644 index 0000000000..212144217c --- /dev/null +++ b/pre-release/c101304016.lua @@ -0,0 +1,107 @@ +--妖精伝姫-マチリル +--Fairy Tail - Matchlille +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand or GY, also you cannot Special Summon for the rest of this turn, except Spellcaster monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Fairy Tail" Spell/Trap from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Make the name of 1 Effect Monster your opponent controls become "Fairy Prince" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.PayLP(500)) + e3:SetTarget(s.namechangetg) + e3:SetOperation(s.namechangeop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" +function s.spconfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsBaseAttack(1850) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon for the rest of this turn, except Spellcaster monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsSpellTrap()) or c:IsCode(91957038)) 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.namechangefilter(c) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsCode(CARD_FAIRY_PRINCE) +end +function s.namechangetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.namechangefilter,tp,0,LOCATION_MZONE,1,nil) end +end +function s.namechangeop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + local sc=Duel.SelectMatchingCard(tp,s.namechangefilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --Its name becomes "Fairy Prince" + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101304017.lua b/pre-release/c101304017.lua new file mode 100644 index 0000000000..3f52755d71 --- /dev/null +++ b/pre-release/c101304017.lua @@ -0,0 +1,91 @@ +--ミミグル・フラワー +--Mimighoul Flower +local s,id=GetID() +function s.initial_effect(c) + --FLIP: Apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --During your Main Phase: You can Special Summon this card from your hand to your opponent's field in face-down Defense Position, or if a face-down monster is on the field, you can Special Summon this card face-up on your field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MIMIGHOUL} +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + if c:IsAbleToChangeControler() then + Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_DECK) +end +function s.thfilter(c) + return (c:IsType(TYPE_FLIP) or c:IsSetCard(SET_MIMIGHOUL)) and c:IsAbleToHand() +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + local break_chk=false + --Your opponent can add 1 Flip monster or "Mimighoul" card from their Deck to their hand + local opp=1-tp + if Duel.IsExistingMatchingCard(s.thfilter,opp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(opp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(opp,s.thfilter,opp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + break_chk=true + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(tp,g) + Duel.ShuffleHand(opp) + end + end + --Give control of this card to your opponent + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + if break_chk then Duel.BreakEffect() end + Duel.GetControl(c,opp) + end +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return (Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)) + or (Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local b1=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp) + local b2=Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + local op=nil + if b1 and b2 then + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + else + op=(b1 and 1) or (b2 and 2) or 1 + end + if op==1 then + if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)==0 then return end + Duel.ConfirmCards(tp,c) + elseif op==2 then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101304018.lua b/pre-release/c101304018.lua new file mode 100644 index 0000000000..9d88d0014c --- /dev/null +++ b/pre-release/c101304018.lua @@ -0,0 +1,65 @@ +--見えざる手マキブエル +--Hecahands Makibel +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --You can reveal this card in your hand; Fusion Summon 1 "Hecahands" Fusion Monster from your Extra Deck, using monsters from your hand or field, including this card in the hand + local fusion_params={ + handler=c, + fusfilter=function(c) return c:IsSetCard(SET_HECAHANDS) end, + gc=Fusion.ForcedHandler + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) + --If an Illusion Fusion Monster(s) is sent to your GY while this card is in your GY: You can add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECAHANDS} +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.thconfilter(c,tp) + return c:IsRace(RACE_ILLUSION) and c:IsFusionMonster() and c:IsControler(tp) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.thconfilter,1,nil,tp) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304022.lua b/pre-release/c101304022.lua new file mode 100644 index 0000000000..b6afd02f8d --- /dev/null +++ b/pre-release/c101304022.lua @@ -0,0 +1,107 @@ +--精霊術の使い魔 +--Familiars of the Spiritual Arts +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --search + 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:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --change type/attribute + 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.chngtg) + e3:SetOperation(s.chngop) + c:RegisterEffect(e3) + --special summon + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(s.spcon) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +s.listed_names={38057522} +s.listed_series={SET_FAMILIAR_POSSESSED,SET_POSSESSED } +function s.thfilter(c) + return c:IsAbleToHand() and (c:IsCode(38057522) or (c:IsSpellTrap() and c:IsSetCard(SET_POSSESSED))) +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.chngtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + local race=Duel.AnnounceRace(tp,1,RACE_ALL) + local attr=c:IsRaceExcept(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or c:AnnounceAnotherAttribute(tp) + e:SetLabel(race,attr) +end +function s.chngop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if (not c:IsFaceup() and c:IsRelateToEffect(e)) then return end + local race,attr=e:GetLabel() + if c:IsRaceExcept(race) then + --Change its Monster Type + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(race) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end + if c:IsAttributeExcept(attr) then + --Change its Attribute + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(attr) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e2) + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return r&(REASON_BATTLE|REASON_EFFECT)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) 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|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101304023.lua b/pre-release/c101304023.lua new file mode 100644 index 0000000000..83e8574428 --- /dev/null +++ b/pre-release/c101304023.lua @@ -0,0 +1,90 @@ +--仮初の幻臉師 +--Transient Masquerader of Illusion +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can send 1 Fiend, Illusion, or Spellcaster monster from your Deck to the GY, then you can change this card's Type to the sent monster's original Type + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOGRAVE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.tgtg) + e1a:SetOperation(s.tgop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --If this card battles a monster, neither can be destroyed by that battle + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetTarget(s.indestg) + e2:SetValue(1) + c:RegisterEffect(e2) + --If this card is in your GY: You can banish 1 Spell from your GY; Special Summon this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) + e3:SetCost(s.spcost) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.tgfilter(c) + return c:IsRace(RACE_FIEND|RACE_ILLUSION|RACE_SPELLCASTER) 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) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then + local original_type=sc:GetOriginalRace() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsRaceExcept(original_type) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + --Change this card's Type to the sent monster's original Type + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(original_type) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + end +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.spcostfilter(c) + return c:IsSpell() and c:IsAbleToRemoveAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101304024.lua b/pre-release/c101304024.lua new file mode 100644 index 0000000000..575e710188 --- /dev/null +++ b/pre-release/c101304024.lua @@ -0,0 +1,106 @@ +--調和ノ天救竜 +--Fidraulis Harmonia +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect on the field (Quick Effect): You can reveal this card in your hand and up to 5 Synchro Monsters in your Extra Deck; apply these effects in sequence based on the total number revealed, also you cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.effcon) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE +end +function s.revealfilter(c) + return c:IsSynchroMonster() and not c:IsPublic() +end +function s.rescon(sg,e,tp,mg) + local b1=#sg==1 + local b2=#sg==3 and sg:IsExists(Card.IsAbleToGrave,1,nil) + local b3=#sg==5 and sg:IsExists(Card.IsAbleToGrave,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 + return b1 or b2 or b3 +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(s.revealfilter,tp,LOCATION_EXTRA,0,nil) + if chk==0 then return not c:IsPublic() and #g>0 end + local max_reveal_count=math.min(#g,5) + local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,s.rescon,1,tp,HINTMSG_CONFIRM,s.rescon) + Duel.ConfirmCards(1-tp,c) + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleExtra(tp) + e:SetLabel(#sg+1) + e:SetLabelObject(sg) + for sc in sg:Iter() do + sc:CreateEffectRelation(e) + end +end +function s.efftg(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 + local reveal_count=e:GetLabel() + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + if reveal_count>=4 then + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) + end + if reveal_count==6 then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,0,LOCATION_MZONE),1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local break_chk=false + local reveal_count=e:GetLabel() + if reveal_count>=2 and c:IsRelateToEffect(e) then + --● 2+: Special Summon this card + break_chk=true + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + if reveal_count>=4 then + --● 4+: Send 1 of the revealed Synchro Monsters to the GY + local revealed_synchros=e:GetLabelObject():Match(Card.IsRelateToEffect,nil,e) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=revealed_synchros:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) + if #g>0 then + if break_chk then Duel.BreakEffect() end + break_chk=true + Duel.SendtoGrave(g,REASON_EFFECT) + end + end + if reveal_count==6 then + --● 6: Destroy 1 monster your opponent controls + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + if break_chk then Duel.BreakEffect() end + Duel.Destroy(g,REASON_EFFECT) + end + end + local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 + --You cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.aclimit) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) + Duel.RegisterEffect(e1,tp) +end +function s.aclimit(e,re,tp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_EXTRA) + and not rc:IsSynchroMonster() +end \ No newline at end of file diff --git a/pre-release/c101304025.lua b/pre-release/c101304025.lua new file mode 100644 index 0000000000..1f4cd2a08e --- /dev/null +++ b/pre-release/c101304025.lua @@ -0,0 +1,89 @@ +--妖光のディアーブロッケン +--Diabrocken of the Ghost Light +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --(Quick Effect): You can banish 1 FIRE monster from your face-up field or GY; Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If this card is Special Summoned: You can target 1 face-up card on the field; negate its effects until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --If this card is sent to the GY as Link Material: You can Set 1 Quick-Play Spell or Normal Trap from your GY that was sent there this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_LEAVE_GRAVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +function s.spcostfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsFaceup() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return 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,1,tp,tp,false,false,POS_FACEUP) + end +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsNegatable() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) + end +end +function s.setfilter(c,turn_count) + return (c:IsQuickPlaySpell() or c:IsNormalTrap()) and c:GetTurnID()==turn_count 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_GRAVE,0,1,nil,Duel.GetTurnCount()) end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,Duel.GetTurnCount()) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101304026.lua b/pre-release/c101304026.lua new file mode 100644 index 0000000000..4655f1ee50 --- /dev/null +++ b/pre-release/c101304026.lua @@ -0,0 +1,79 @@ +--コンベックス・ナイト +--Convex Knight +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If a Machine monster is on the field and this card is in your hand: You can Special Summon this card in Defense Position, then you can make its Level become equal to the Level/Rank of 1 Machine monster on the field + 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,0}) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During your Main Phase: You can send 1 EARTH Machine monster from your Deck to the GY, then this card gains ATK equal to the sent monster's Level x 100 until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) +end +function s.lvfilter(c,lv) + return ((c:HasLevel() and not c:IsLevel(lv)) or (c:HasRank() and not c:IsRank(lv))) + and c:IsRace(RACE_MACHINE) and c:IsFaceup() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local lv=c:GetLevel() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 + and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lv) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local sc=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + local lv_rnk=(sc:HasLevel() and sc:GetLevel()) + or (sc:HasRank() and sc:GetRank()) + Duel.BreakEffect() + --Make its Level become equal to the Level/Rank of 1 Machine monster on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv_rnk) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end +function s.tgfilter(c) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,0) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) + and c:IsRelateToEffect(e) and c:IsFaceup() then + Duel.BreakEffect() + --This card gains ATK equal to the sent monster's Level x 100 until the end of this turn + c:UpdateAttack(sc:GetLevel()*100,RESETS_STANDARD_DISABLE_PHASE_END) + end +end \ No newline at end of file diff --git a/pre-release/c101304027.lua b/pre-release/c101304027.lua new file mode 100644 index 0000000000..84d3b9607e --- /dev/null +++ b/pre-release/c101304027.lua @@ -0,0 +1,100 @@ +--血樹竜姫ドラセレア +--Draselea the Blood Tree Dragon Princess +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can send 1 Level 4 or lower Plant monster from your Deck to the GY, except "Draselea the Blood Tree Dragon Princess"; Special Summon this card from your hand, and if you do, its Level becomes the sent monster's + 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,0}) + e1:SetCost(Cost.AND(s.selfspcost,s.effcost)) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --You can banish this card and 1 Plant monster from your GY; Special Summon 1 Dragon monster from your hand or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(s.dragonspcost,s.effcost)) + e2:SetTarget(s.dragonsptg) + e2:SetOperation(s.dragonspop) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_DRAGON|RACE_PLANT) end) +end +s.listed_names={id} +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon the turn you activate either of this card's effects, except Dragon or Plant monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_DRAGON|RACE_PLANT) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.selfspcostfilter(c) + return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and not c:IsCode(id) and c:IsAbleToGraveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + Duel.SendtoGrave(sc,REASON_COST) + e:SetLabel(sc:GetLevel()) +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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then + --Its Level becomes the sent monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(e:GetLabel()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() +end +function s.dragonspcostfilter(c,e,tp,handler) + return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.dragonspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,Group.FromCards(c,handler),e,tp) +end +function s.dragonspfilter(c,e,tp) + return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.dragonspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp,c) + Duel.Remove(g+c,POS_FACEUP,REASON_COST) +end +function s.dragonsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.dragonspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) +end +function s.dragonspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dragonspfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101304030.lua b/pre-release/c101304030.lua new file mode 100644 index 0000000000..12fad1219d --- /dev/null +++ b/pre-release/c101304030.lua @@ -0,0 +1,79 @@ +--デス・レジーナ・デーモン +--Doom Regina Archfiend +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c) + c:AddMustBeRitualSummoned() + --You can target 1 "Archfiend" Spell/Trap in your GY or banishment; destroy this card, and if you do, add the targeted card to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card is Ritual Summoned: You can destroy as many Spells/Traps your opponent controls as possible, then if this card is in the Extra Monster Zone, you can banish all Spells and Traps from your opponent's GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Unaffected by other monsters' effects while in the Extra Monster Zone + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_IMMUNE_EFFECT) + e3:SetRange(LOCATION_EMZONE) + e3:SetValue(function(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end) + c:RegisterEffect(e3) +end +s.listed_series={SET_ARCHFIEND} +s.listed_names={63679166} --"Throne of Archfiends" +function s.thfilter(c) + return c:IsSetCard(SET_ARCHFIEND) and c:IsSpellTrap() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_REMOVED) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsInExtraMZone() + and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local rg=Duel.GetMatchingGroup(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,nil) + if #rg>0 then + Duel.BreakEffect() + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101304031.lua b/pre-release/c101304031.lua new file mode 100644 index 0000000000..d51da63c4d --- /dev/null +++ b/pre-release/c101304031.lua @@ -0,0 +1,118 @@ +--覇王暴竜スターヴ・ヴェノム・ウィング・ドラゴン +--Starving Venom Wing Dragon +--Scripted By The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c,false) + --Fusion Materials: 1 Fusion Monster + 1 "Clear Wing" monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CLEAR_WING)) + --Place Predator Counters on monsters Special Summoned to your opponent's field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_PZONE) + e1:SetOperation(s.counterplaceop) + c:RegisterEffect(e1) + --If your opponent Special Summons a monster(s): You can target 1 of them; this card gains ATK equal to its ATK, and its effects are negated. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.atknegeffcon) + e2:SetTarget(s.atknegefftg) + e2:SetOperation(s.atknegeffop) + c:RegisterEffect(e2) + --When another card or effect is activated on the field: You can destroy 1 card on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_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 re:GetHandler()~=e:GetHandler() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD>0 end) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) + --Place itself into Pendulum Zone if it is destroyed + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end local c=e:GetHandler() if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) end end) + e4:SetOperation(s.penop) + c:RegisterEffect(e4) +end +s.listed_series={SET_CLEAR_WING} +s.material_setcode={SET_CLEAR_WING} +s.counter_place_list={COUNTER_PREDATOR} +function s.counterplaceop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=eg:Filter(Card.IsControler,nil,1-tp) + for tc in g:Iter() do + if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then + --It becomes Level 1 as long as it has a Predator Counter + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + end +end +function s.atknegefffilter(c,e,tp) + return c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) and c:HasNonZeroAttack() +end +function s.atknegeffcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.atknegefffilter,1,nil,e,tp) +end +function s.atknegefftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return eg:IsContains(chkc) and s.atknegefffilter(chkc,e,tp) end + if chk==0 then return eg:IsExists(s.atknegefffilter,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local tc=nil + if #eg==1 then + tc=eg:GetFirst() + Duel.SetTargetCard(tc) + else + tc=eg:FilterSelect(tp,s.atknegefffilter,1,1,nil,e,tp) + Duel.SetTargetCard(tc) + end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) +end +function s.atknegeffop(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() + and c:UpdateAttack(tc:GetAttack(),RESETS_STANDARD_DISABLE_PHASE_END) and tc:IsNegatableMonster() then + tc:NegateEffects(c,RESETS_STANDARD_PHASE_END) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD),1,tp,LOCATION_ONFIELD) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101304033.lua b/pre-release/c101304033.lua new file mode 100644 index 0000000000..775975c06f --- /dev/null +++ b/pre-release/c101304033.lua @@ -0,0 +1,95 @@ +--妖精伝姫を紡ぐ者 +--Weaver of Fairy Tail Tales +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Fairy Tail" monster + 1 Spellcaster monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FAIRY_TAIL),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) + --Special Summon 1 "Fairy Tail" monster from your Deck 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_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_DISABLE) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2a:SetCondition(s.discon) + e2a:SetTarget(s.distg) + e2a:SetOperation(s.disop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Every "Fairy Prince" on the field becomes Spellcaster + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_CHANGE_RACE) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e3:SetTarget(function(e,c) return c:IsCode(CARD_FAIRY_PRINCE) end) + e3:SetValue(RACE_SPELLCASTER) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={CARD_FAIRY_PRINCE} +s.material_setcode={SET_FAIRY_TAIL} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_REMOVED) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.disconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsAttributeExcept(ATTRIBUTE_EARTH) and c:IsSetCard(SET_FAIRY_TAIL) and c:IsFaceup() +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.disconfilter,1,nil,tp) +end +function s.disfilter(c) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + --Negate its effects + tc:NegateEffects(c) + --Its name becomes "Fairy Prince" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end diff --git a/pre-release/c101304034.lua b/pre-release/c101304034.lua new file mode 100644 index 0000000000..98440fdf4e --- /dev/null +++ b/pre-release/c101304034.lua @@ -0,0 +1,92 @@ +--妖精伝姫を語る者 +--Chronicler of Fairy Tail Tales +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 LIGHT "Fairy Tail" monster + 1 Spellcaster monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) + --Your "Fairy Tail" monsters cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Destroy as many cards your opponent controls as possible, and if you do, inflict 500 damage to your opponent for each card destroyed + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SPSUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,0}) + e2a:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()==1 end) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_SINGLE) + e2b:SetCode(EFFECT_MATERIAL_CHECK) + e2b:SetValue(function(e,c) e2a:SetLabel(c:GetMaterial():IsExists(Card.IsCode,1,nil,CARD_FAIRY_PRINCE) and 1 or 0) end) + c:RegisterEffect(e2b) + --Negate the activation of an opponent's card or effect, and if you do, destroy that card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e3:SetCost(s.negcost) + e3:SetTarget(s.negtg) + e3:SetOperation(s.negop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={CARD_FAIRY_PRINCE} +s.material_setcode={SET_FAIRY_TAIL} +function s.matfilter(c,fc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT,fc,sumtype,tp) and c:IsSetCard(SET_FAIRY_TAIL,fc,sumtype,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if #g>0 then + local dam=Duel.Destroy(g,REASON_EFFECT)*500 + if dam>0 then + Duel.Damage(1-tp,dam,REASON_EFFECT) + end + end +end +function s.negcostfilter(c) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToRemoveAsCost() +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + 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/c101304035.lua b/pre-release/c101304035.lua new file mode 100644 index 0000000000..9a2cdd0aac --- /dev/null +++ b/pre-release/c101304035.lua @@ -0,0 +1,54 @@ +--見えざる手ダンダロス +--Hecahands Dandalos +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 "Hecahands" monsters + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECAHANDS),2) + --You can target 1 monster your opponent controls; take control of it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.ctrltg) + e1:SetOperation(s.ctrlop) + c:RegisterEffect(e1) + --Your "Hecahands" Fusion Monsters and your monsters that are owned by your opponent can attack directly + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return (c:IsSetCard(SET_HECAHANDS) and c:IsFusionMonster()) or c:IsOwner(1-e:GetHandlerPlayer()) end) + c:RegisterEffect(e2) + --If this card battles a monster, neither can be destroyed by that battle + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e3:SetTarget(s.indestg) + e3:SetValue(1) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECAHANDS} +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControlerCanBeChanged() end + if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.GetControl(tc,tp) + end +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end \ No newline at end of file diff --git a/pre-release/c101304038.lua b/pre-release/c101304038.lua new file mode 100644 index 0000000000..0b2593706a --- /dev/null +++ b/pre-release/c101304038.lua @@ -0,0 +1,96 @@ +--スカーレッド・ハイパーノヴァ・ドラゴン +--Red Hypernova Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 4 Tuners + 1+ non-Tuner Synchro Monsters + Synchro.AddProcedure(c,nil,4,4,Synchro.NonTunerEx(Card.IsType,TYPE_SYNCHRO),1,99) + --Multiple Tuners + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_MULTIPLE_TUNERS) + c:RegisterEffect(e0) + --Must first be Synchro Summoned with the above materials + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_CONDITION) + e1:SetValue(s.splimit) + c:RegisterEffect(e1) + --atk up + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(s.atkval) + c:RegisterEffect(e2) + --cannot target + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetRange(LOCATION_MZONE) + e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e3:SetValue(aux.tgoval) + c:RegisterEffect(e3) + --indes + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetRange(LOCATION_MZONE) + e4:SetValue(aux.indoval) + c:RegisterEffect(e4) + --banish + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,0)) + e5:SetCategory(CATEGORY_REMOVE|CATEGORY_SPECIAL_SUMMON) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetCode(EVENT_FREE_CHAIN) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetTarget(s.rmtg) + e5:SetOperation(s.rmop) + e5:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e5) +end +s.listed_names={97489701} +s.synchro_nt_required=1 +function s.splimit(e,se,sp,st) + return not e:GetHandler():IsLocation(LOCATION_EXTRA) or ((st&SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO and not se) +end +function s.atkval(e,c) + return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_TUNER)*500 +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemove() end + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + g:AddCard(c) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spfilter(c,e,tp) + return c:IsCode(97489701) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + if c:IsRelateToEffect(e) and c:IsAbleToRemove() then g:AddCard(c) end + if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) + if #sg>=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=sg:Select(tp,1,1,nil):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + Duel.BreakEffect() + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end + end + end +end \ No newline at end of file diff --git a/pre-release/c101304039.lua b/pre-release/c101304039.lua new file mode 100644 index 0000000000..5b05d48756 --- /dev/null +++ b/pre-release/c101304039.lua @@ -0,0 +1,67 @@ +--捕食植物バアル・テア +--Predaplant Baalthea +--Scripted by The Razgriz +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 "Predaplant" or "Starving Venom" monster from your face-up Extra Deck or GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Fusion Summon 1 Fusion Monster, using monsters from your hand or field as material + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) + e2:SetCost(s.fuscost) + e2:SetTarget(Fusion.SummonEffTG()) + e2:SetOperation(Fusion.SummonEffOP()) + c:RegisterEffect(e2) +end +s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} +s.listed_names={CARD_POLYMERIZATION} +function s.spfilter(c,e,tp) + if not (c:IsSetCard({SET_PREDAPLANT,SET_STARVING_VENOM}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_GRAVE) then + return Duel.GetMZoneCount(tp)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.fuscostfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToRemoveAsCost() +end +function s.fuscost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.fuscostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.fuscostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + g:AddCard(c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end diff --git a/pre-release/c101304043.lua b/pre-release/c101304043.lua new file mode 100644 index 0000000000..40446fbcdc --- /dev/null +++ b/pre-release/c101304043.lua @@ -0,0 +1,88 @@ +--超弩級砲塔列車グスタフ・ロケット +--Superdreadnought Rail Cannon Gustav Rocket +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 10 monsters, OR by discarding 1 card and using "Superdreadnought Rail Cannon Gustav Max" you control + Xyz.AddProcedure(c,nil,10,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) + --Negate that effect, and if you do, destroy that monster, then inflict 1000 damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.discon) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --Detach 1 material from this card or destroy it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.detachtg) + e2:SetOperation(s.detachop) + c:RegisterEffect(e2) +end +s.listed_names={id,56910167} --"Superdreadnought Rail Cannon Gustav Max" +function s.ovfilter(c,tp,xyzc) + return c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,56910167) and c:IsFaceup() +end +function s.xyzop(e,tp,chk,mc) + if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local sc=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) + if sc and Duel.SendtoGrave(sc,REASON_DISCARD|REASON_COST)>0 then + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) + else + return false + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and e:GetHandler():GetOverlayCount()>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) + local rc=re:GetHandler() + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,1000,REASON_EFFECT) + end +end +function s.detachtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + if c:GetOverlayCount()==0 then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) +end +function s.detachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local b1=c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) + local b2=true + --Detach 1 material from this card or destroy it + local op=b1 and Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) or 2 + if op==1 then + c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) + elseif op==2 then + Duel.Destroy(c,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304044.lua b/pre-release/c101304044.lua new file mode 100644 index 0000000000..526d42f3a1 --- /dev/null +++ b/pre-release/c101304044.lua @@ -0,0 +1,72 @@ +--超弩級砲塔列車フライング・ランチャー +--Superdreadnought Rail Cannon Flying Launcher +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 10 monsters + Xyz.AddProcedure(c,nil,10,2) + --You can Normal Summon 1 Machine monster during your Main Phase each turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsRace(RACE_MACHINE) end) + c:RegisterEffect(e1) + --Add 1 EARTH Machine monster or "Barrage Blast" from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Destroy Spells/Traps on the field equal to the number of materials detached + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetTargetCount(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) end,function(e,og) e:SetLabel(#og) end)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_names={51369889} --"Barrage Blast" +function s.thfilter(c) + return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)) or c:IsCode(51369889)) 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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + local ct=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304047.lua b/pre-release/c101304047.lua new file mode 100644 index 0000000000..06ff71ea9f --- /dev/null +++ b/pre-release/c101304047.lua @@ -0,0 +1,83 @@ +--妖精伝姫-ウィキャット +--Fairy Tail - Wickat +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 Spellcaster monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,2) + --"Fairy Tail" monsters you control whose original Attribute is LIGHT are unaffected by your opponent's activated effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) end) + e1:SetValue(function(e,te) return te:GetOwnerPlayer()==1-e:GetHandlerPlayer() and te:IsActivated() end) + c:RegisterEffect(e1) + --Send that many "Fairy Tail" cards from your Deck to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.DetachFromSelf(1,s.tgmaxcost,function(e,og) e:SetLabel(#og) end)) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) + --Special Summon this card, and if you do, send that monster to the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +function s.tgfilter(c) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToGrave() +end +function s.tgmaxcost(e,tp) + return math.min(2,Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil)) +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,e:GetLabel(),tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local ct=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,ct,ct,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.sptgfilter(c) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave() and c:IsFaceup() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.sptgfilter(chkc,tp) end + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.sptgfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectTarget(tp,s.sptgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and tc:IsRelateToEffect(e) then + Duel.SendtoGrave(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304048.lua b/pre-release/c101304048.lua new file mode 100644 index 0000000000..9b1d9b83b8 --- /dev/null +++ b/pre-release/c101304048.lua @@ -0,0 +1,71 @@ +--黒智天至イリスフィール +--Cherubidamn Irisfiel +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 8 monsters, OR 1 Xyz Monster you control that has not activated its effect in the Monster Zone this turn + Xyz.AddProcedure(c,nil,8,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop) + --Keep track of Xyz Monsters that have activated their effect in the Monster Zone each turn + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_CHAIN_SOLVED) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) + --If this card is Xyz Summoned: You can activate this effect; this turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --If this card would be destroyed by battle or card effect, you can detach 1 material from a monster you control instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.reptg) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.ovfilter(c,tp,xyzc) + return c:IsXyzMonster() and not c:HasFlagEffect(id) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if re:IsMonsterEffect() and rc:IsXyzMonster() and rc:IsRelateToEffect(re) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE then + rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + end +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --This turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTarget(function(e,c) return c:IsXyzMonster() end) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetValue(function(e,c) return c:GetRank()*100 end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end + return Duel.SelectEffectYesNo(tp,c,96) and Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)>0 +end \ No newline at end of file diff --git a/pre-release/c101304049.lua b/pre-release/c101304049.lua new file mode 100644 index 0000000000..c4b6304fb3 --- /dev/null +++ b/pre-release/c101304049.lua @@ -0,0 +1,89 @@ +--ブリーチヴァレル・ドラゴン +--Breechborrel Dragon +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 DARK Dragon monsters, including a "Rokket" monster + Link.AddProcedure(c,s.matfilter,2,nil,s.matcheck) + --If this card is Link Summoned: You can add 1 "Borrel" Spell/Trap from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --(Quick Effect): You can target 1 DARK monster you control; it gains 500 ATK, or if that monster is no longer on the field, you can Special Summon 1 "Rokket" monster from your Deck in Defense Position instead + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_BORREL,SET_ROKKET} +function s.matfilter(c,linkc,st,tp) + return c:IsAttribute(ATTRIBUTE_DARK,linkc,st,tp) and c:IsRace(RACE_DRAGON,linkc,st,tp) +end +function s.matcheck(g,linkc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_ROKKET,linkc,sumtype,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_BORREL) 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 +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttribute(ATTRIBUTE_DARK) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + if tc:IsFacedown() then return end + --It gains 500 ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + elseif Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) 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_DEFENSE) + end + end +end \ No newline at end of file diff --git a/pre-release/c101304050.lua b/pre-release/c101304050.lua new file mode 100644 index 0000000000..a095808a80 --- /dev/null +++ b/pre-release/c101304050.lua @@ -0,0 +1,69 @@ +--四花繚乱の霊使い +--Four Charmers in Profusion +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters + Link.AddProcedure(c,nil,2) + --atk up + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return 300*Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil):GetBinClassCount(Card.GetAttribute) end) + c:RegisterEffect(e1) + --special summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET|EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spchk(sg,e,tp) + local t=sg:GetClassCount(Card.GetRace) + local a=sg:GetClassCount(Card.GetAttribute) + return (t==1 and a==#sg) or (a==1 and t==#sg) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,0) end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,1,tp,HINTMSG_SPSUMMON) + Duel.SetTargetCard(sg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,#sg,0,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + if #tg==2 and Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)>0 then + local g=Duel.GetOperatedGroup() + if c:IsRelateToEffect(e) then g=g+c end + for tc in g:Iter() do + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_BE_MATERIAL) + e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + tc:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/pre-release/c101304051.lua b/pre-release/c101304051.lua new file mode 100644 index 0000000000..f2b9af54e3 --- /dev/null +++ b/pre-release/c101304051.lua @@ -0,0 +1,88 @@ +--神書の使いラハムゥ +--Lahamu the Messenger of Sacred Scripture +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) + --Once while this Link Summoned card is face-up on the field, you can Normal Summon 1 Level 5 or higher monster without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_HAND,0) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.ntcon) + e1:SetTarget(aux.FieldSummonProcTg(function(e,c) return c:IsLevelAbove(5) end)) + c:RegisterEffect(e1) + --During the Main Phase, you can (Quick Effect): Immediately after this effect resolves, Normal Summon 1 Level 5 or higher DARK monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.nstg) + e2:SetOperation(s.nsop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) + --During your End Phase: You can reveal any number of monsters in your hand and place them on the bottom of the Deck in any order, then draw the same number of cards + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e3:SetTarget(s.drtg) + e3:SetOperation(s.drop) + c:RegisterEffect(e3) +end +function s.ntcon(e,c,minc) + if c==nil then return true end + return e:GetHandler():IsLinkSummoned() and minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 +end +function s.nsfilter(c) + return c:IsSummonable(true,nil) and c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) +end +function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.nsop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_HAND,0,1,nil) + and Duel.IsPlayerCanDraw(tp) end + Duel.SetTargetPlayer(tp) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local target_player=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + local max_count=Duel.GetMatchingGroupCount(aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,nil) + if max_count==0 then return end + Duel.Hint(HINT_SELECTMSG,target_player,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(target_player,aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,1,max_count,nil) + if #g>0 then + Duel.ConfirmCards(1-target_player,g) + local draw_count=Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + if draw_count>0 then + if draw_count>1 then Duel.SortDeckbottom(target_player,target_player,draw_count) end + Duel.BreakEffect() + Duel.Draw(target_player,draw_count,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101304053.lua b/pre-release/c101304053.lua new file mode 100644 index 0000000000..c9b2b3f27d --- /dev/null +++ b/pre-release/c101304053.lua @@ -0,0 +1,88 @@ +--ジャンク・シグナル +--Junk Signal +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_names={CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON} +function s.spcostfilter(c,e,tp) + return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) +end +function s.spfilter(c,e,tp) + return (c:IsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON)) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) + local ex,_,event_player,event_value,event_reff=Duel.CheckEvent(EVENT_CHAINING,true) + local trig_player,trig_type=nil + if ex then + trig_player,trig_type=Duel.GetChainInfo(event_value-1,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE) + end + local b2=ex and event_player==1-tp and Duel.IsChainDisablable(event_value) and trig_player==tp and trig_type&TYPE_SYNCHRO>0 + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst() + Duel.Release(sc,REASON_COST) + e:SetLabelObject(sc) + sc:CreateEffectRelation(e) + elseif op==2 then + e:SetLabel(op,event_value) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local op=e:GetLabel() + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + elseif op==2 then + e:SetCategory(CATEGORY_DISABLE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op,event_value=e:GetLabel() + if op==1 then + --Tribute 1 monster; Special Summon 1 "Junk Warrior", 1 "Stardust Dragon", or 1 monster that mentions either of them from your hand, Deck, or GY, except the Tributed monster + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local sc=e:GetLabelObject() + local exc=sc:IsRelateToEffect(e) and sc or nil + 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,exc,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --When your opponent activates a card or effect in response to the activation of your Synchro Monster's effect: Negate that opponent's effect + Duel.NegateEffect(event_value) + end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end \ No newline at end of file diff --git a/pre-release/c101304054.lua b/pre-release/c101304054.lua new file mode 100644 index 0000000000..76a2b1f12e --- /dev/null +++ b/pre-release/c101304054.lua @@ -0,0 +1,79 @@ +--特別ダイヤ +--Exceptional Schedule +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SCHEDULE=id+100 +function s.initial_effect(c) + --Add 1 "Special Schedule" or "Urgent Schedule" from your Deck to your hand, then you can Special Summon 1 "Schedule Token" (Machine/EARTH/Level 10/ATK 3000/DEF 3000) to your opponent's field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Send 1 card you control to the GY, and if you do, Special Summon that Level 10 Machine monster in your GY or banishment + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={97520701,25274141,TOKEN_SCHEDULE} --"Special Schedule, "Urgent Schedule" +function s.thfilter(c) + return c:IsCode(97520701,25274141) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local 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.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCHEDULE,0,TYPES_TOKEN,3000,3000,10,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local token=Duel.CreateToken(tp,TOKEN_SCHEDULE) + Duel.BreakEffect() + Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP) + end + end +end +function s.tgfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGrave() +end +function s.spfilter(c,e,tp) + return c:IsLevel(10) and c:IsRace(RACE_MACHINE) 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_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + 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_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) + 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() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and 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/c101304055.lua b/pre-release/c101304055.lua new file mode 100644 index 0000000000..46e767e7b1 --- /dev/null +++ b/pre-release/c101304055.lua @@ -0,0 +1,86 @@ +--捕食原生 +--Predaprimitive +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Send 1 "Predap" card from your Deck to the GY; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.thcost) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --You can banish this card from your GY, then target 1 Fusion monster you control; destroy it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(s.descon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_FUSION,SET_PREDAP} +s.listed_names={id} +function s.tgfilter(c,tp) + return c:IsSetCard(SET_PREDAP) and c:IsAbleToGraveAsCost() and not c:IsCode(id) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,c) +end +function s.thfilter(c) + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp) + Duel.SendtoGrave(g,REASON_COST) +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 + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon monsters for the rest of the this turn after this card resolves, except Plant and Dragon monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_PLANT|RACE_DRAGON) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(Card.IsControler,1,nil,1-tp) +end +function s.desfilter(c) + return c:IsFaceup() and c:IsFusionMonster() +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil) end + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304062.lua b/pre-release/c101304062.lua new file mode 100644 index 0000000000..0c37494807 --- /dev/null +++ b/pre-release/c101304062.lua @@ -0,0 +1,92 @@ +--妖精伝姫のはじまりはじまり +--Fairy Tail Long Long Ago +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon up to 1 LIGHT "Fairy Tail" monster each from your hand, GY, and banishment, with different names, also you cannot Special Summon for the rest of this turn, except Spellcaster monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Set this card, but it cannot be activated unless you control a "Fairy Tail" monster + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_REMOVE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.settg) + e2a:SetOperation(s.setop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_TO_GRAVE) + e2b:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + c:RegisterEffect(e2b) +end +s.listed_series={SET_FAIRY_TAIL} +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) +end +function s.spcheck(sg,e,tp,mg) + local ct1=sg:GetClassCount(Card.GetCode) + local ct2=sg:GetClassCount(Card.GetLocation) + local ct3=#sg + return ct1==ct3 and ct2==ct3,ct1~=ct3 or ct2~=ct3 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft>0 then + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) + if #g>0 then + ft=math.min(ft,3) + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.spcheck,1,tp,HINTMSG_SPSUMMON) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end + --You cannot Special Summon for the rest of this turn, except Spellcaster monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SSet(tp,c)>0 then + --It cannot be activated unless you control a "Fairy Tail" monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetCondition(function() return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101304063.lua b/pre-release/c101304063.lua new file mode 100644 index 0000000000..c8481f8a3d --- /dev/null +++ b/pre-release/c101304063.lua @@ -0,0 +1,80 @@ +--妖精伝姫の舞踏会 +--Fairy Tail Ball +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can add 1 "Fairy Tail" monster or "Fairy Tail Tales" from your Deck or banishment 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) + --Your "Fairy Tail" monsters can attack directly + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetRange(LOCATION_FZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FAIRY_TAIL)) + c:RegisterEffect(e2) + --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" +function s.thfilter(c) + return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsMonster()) or c:IsCode(91957038)) and c:IsAbleToHand() + and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,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|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.disfilter(c) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + --Negate its effects + tc:NegateEffects(c) + --Its name becomes "Fairy Prince" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101304064.lua b/pre-release/c101304064.lua new file mode 100644 index 0000000000..87d24d4647 --- /dev/null +++ b/pre-release/c101304064.lua @@ -0,0 +1,66 @@ +--テールズオブ妖精伝姫 +--Tales of Fairy Tail +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + aux.AddEquipProcedure(c) + --The equipped monster gains 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1000) + c:RegisterEffect(e1) + --Fusion Summon 1 Spellcaster Fusion Monster from your Extra Deck, using monsters from your hand or field, when you do, you can also use any "Fairy Prince" your opponent controls + local fusion_params={ + handler=c, + fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER), + extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FaceupFilter(Card.IsCode,CARD_FAIRY_PRINCE)),tp,0,LOCATION_ONFIELD,nil) end + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) + --Equip this card to a "Fairy Tail" monster on the field, then immediately after this effect resolves, you can Normal Summon 1 Spellcaster monster with 1850 ATK + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,id) + e3:SetTarget(s.eqtg) + e3:SetOperation(s.eqop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={CARD_FAIRY_PRINCE} +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.nsfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsAttack(1850) and c:IsSummonable(true,nil) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.Equip(tp,c,sc) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local nsc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if nsc then + Duel.Summon(tp,nsc,true,nil) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c101304066.lua b/pre-release/c101304066.lua new file mode 100644 index 0000000000..dd4177cdd1 --- /dev/null +++ b/pre-release/c101304066.lua @@ -0,0 +1,70 @@ +--憑依共鳴 +--Possessed Resonance +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --special summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED} +function s.filter(c,e,tp) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetAttribute()) +end +function s.spfilter(c,e,tp,att) + return c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) and c:IsAttribute(att) + and c:IsCanBeSpecialSummoned(e,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetAttribute()) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 + and tc:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end + end +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCanChangePosition() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end +end \ No newline at end of file diff --git a/pre-release/c101304067.lua b/pre-release/c101304067.lua new file mode 100644 index 0000000000..a33bef0108 --- /dev/null +++ b/pre-release/c101304067.lua @@ -0,0 +1,71 @@ +--デーモンの簒奪 +--Archfiend Usurpation +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_ARCHFIEND} +function s.setfilter(c) + return c:IsSetCard(SET_ARCHFIEND) and c:IsTrap() and c:IsSSetable(true) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + local b1=((e:GetHandler():IsLocation(LOCATION_SZONE) and ft>0) or ft>1) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + local ritual_params={ + lvtype=RITPROC_GREATER, + filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), + location=LOCATION_HAND|LOCATION_EXTRA + } + local b2=Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,0) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(0) + elseif op==2 then + e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,1) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Set 1 "Archfiend" Trap from your Deck or GY, it can be activated this turn + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + elseif op==2 then + --Ritual Summon 1 "Archfiend" Ritual Monster from your hand or face-up Extra Deck, by Tributing monsters from your hand or field whose total Levels equal or exceed its Level + local ritual_params={ + lvtype=RITPROC_GREATER, + filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), + location=LOCATION_HAND|LOCATION_EXTRA + } + Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) + end +end \ No newline at end of file diff --git a/pre-release/c101304069.lua b/pre-release/c101304069.lua new file mode 100644 index 0000000000..88a54c49fa --- /dev/null +++ b/pre-release/c101304069.lua @@ -0,0 +1,71 @@ +--超逸融合 +--Apex Polymerization +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_FUSION_SUMMON|CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(Cost.PayLP(2000)) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.filter(c,e,tp) + return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,tc) + return c:IsRace(tc:GetRace()) and c:IsAttribute(tc:GetAttribute()) + and c:HasLevel() and not c:IsLevel(tc:GetLevel()) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + if e:IsHasType(EFFECT_TYPE_ACTIVATE) then + Duel.SetChainLimit(aux.FALSE) + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + sc:NegateEffects(e:GetHandler()) + Duel.BreakEffect() + local fusion_params={matfilter=Fusion.OnFieldMat,extrafil=s.fextra(tc,sc)} + local b1=Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) + local b2=sc:IsAbleToGrave() + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + if op==1 then + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + elseif op==2 then + Duel.SendtoGrave(sc,REASON_EFFECT) + end + end +end +function s.fextra(tc,sc) + return function(e,tp,mg) + return Group.FromCards(tc),s.fcheck(tc,sc) + end +end +function s.fcheck(tc,sc) + return function(tp,sg,fc) + return #sg==2 and sg:IsContains(tc) and sg:IsContains(sc) + end +end diff --git a/pre-release/c101304075.lua b/pre-release/c101304075.lua new file mode 100644 index 0000000000..b546a2048c --- /dev/null +++ b/pre-release/c101304075.lua @@ -0,0 +1,70 @@ +--見えざる導き手 +--Bayt'al-Hecahands +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) + --You can Tribute 1 monster you control that is a "Hecahands" monster or a monster owned by your opponent; take control of 1 monster your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.ctrlcost) + e1:SetTarget(s.ctrltg) + e1:SetOperation(s.ctrlop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Once per turn, during your End Phase: Send 1 card you control to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_HECAHANDS} +function s.ctrlcostfilter(c,tp,opp) + return (c:IsSetCard(SET_HECAHANDS) or c:IsOwner(opp)) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 + and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,c) +end +function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk) + local opp=1-tp + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.ctrlcostfilter,1,false,nil,nil,tp,opp) end + local g=Duel.SelectReleaseGroupCost(tp,s.ctrlcostfilter,1,1,false,nil,nil,tp,opp) + Duel.Release(g,REASON_COST) +end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp) + end +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304076.lua b/pre-release/c101304076.lua new file mode 100644 index 0000000000..8cff5ab402 --- /dev/null +++ b/pre-release/c101304076.lua @@ -0,0 +1,78 @@ +--ノーザンクロスファイア +--Northern Cross Fire +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If the total Levels of monsters you control are 10 or higher: Take 1 Level 10 monster from your hand or Deck, and either add it to your hand or Special Summon it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>=10 end) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If the total Levels of monsters your opponent controls are 10 or higher: You can banish this card and 1 Level 10 monster from your GY, then target 1 card your opponent controls; banish it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(Card.GetLevel)>=10 end) + e2:SetCost(s.bancost) + e2:SetTarget(s.bantg) + e2:SetOperation(s.banop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +function s.thspfilter(c,e,tp,sp_chk) + return c:IsLevel(10) and (c:IsAbleToHand() or (sp_chk 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 + local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,sp_chk) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,sp_chk):GetFirst() + if not sc then return end + aux.ToHandOrElse(sc,tp, + function() return sp_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function() Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,3) + ) +end +function s.bancostfilter(c) + return c:IsLevel(10) and c:IsAbleToRemoveAsCost() +end +function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.bancostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.bancostfilter,tp,LOCATION_GRAVE,0,1,1,c) + Duel.Remove(g+c,POS_FACEUP,REASON_COST) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.banop(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/c101304101.lua b/pre-release/c101304101.lua new file mode 100644 index 0000000000..84294b58b0 --- /dev/null +++ b/pre-release/c101304101.lua @@ -0,0 +1,103 @@ +--ダークネス・リゾネーター +--Darkness Resonator +--Scripted by Eerie Code +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,0}) + e1:SetCost(Cost.Reveal(function(c) return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) end,nil,1,1,nil,LOCATION_EXTRA)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Apply a "during your Main Phase this turn, you can Normal Summon 1 "Resonator" monster in addition to your Normal Summon/Set (you can only gain this effect once per turn)" effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsPlayerCanAdditionalSummon(tp) end) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSummon(tp) end end) + e2:SetOperation(s.extransop) + c:RegisterEffect(e2) + --Change the Levels of any number of Tuners you control to 1 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +s.listed_series={SET_RESONATOR} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end +function s.extransop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,4)) + --During your Main Phase this turn, you can Normal Summon 1 "Resonator" monster in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,5)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_RESONATOR) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.lvfilter(c) + return c:IsType(TYPE_TUNER) and not c:IsLevel(1) and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end + local max_ct=Duel.GetTargetCount(s.lvfilter,tp,LOCATION_MZONE,0,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,max_ct,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + for tc in tg:Iter() do + --Their Levels become 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCategory(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101304102.lua b/pre-release/c101304102.lua new file mode 100644 index 0000000000..85f371a4e2 --- /dev/null +++ b/pre-release/c101304102.lua @@ -0,0 +1,97 @@ +--パワー・バイス・ドラゴン +--Power Vice Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --A "Red Dragon Archfiend" that was Synchro Summoned using this card as material cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EVENT_BE_MATERIAL) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsCode(CARD_RED_DRAGON_ARCHFIEND) end) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Resonator" 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_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +s.listed_series={SET_RESONATOR} +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local rc=c:GetReasonCard() + --Cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetDescription(3000) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + rc:RegisterEffect(e1) +end +function s.spconfilter(c) + return not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsFaceup()) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_RESONATOR) 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 + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK Synchro monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster()) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not (c:IsOriginalAttribute(ATTRIBUTE_DARK) and c:IsOriginalType(TYPE_SYNCHRO)) end) +end \ No newline at end of file diff --git a/pre-release/c101304103.lua b/pre-release/c101304103.lua new file mode 100644 index 0000000000..e092ccd86d --- /dev/null +++ b/pre-release/c101304103.lua @@ -0,0 +1,93 @@ +--デモン・ピース・ゴーレム +--Fiend Piece Golem +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Decrease this card's Level by up to 2 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) + 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(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLevelAbove(2) end end) + e2:SetOperation(s.lvchangeop) + c:RegisterEffect(e2) + --Special Summon 1 Level 4 or lower Fiend monster from your GY + 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+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.gyspcon) + e3:SetTarget(s.gysptg) + e3:SetOperation(s.gyspop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.selfspconfilter(c) + return c:IsRace(RACE_FIEND) and c:IsType(TYPE_TUNER) and c:IsFaceup() +end +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.lvchangeop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsLevelAbove(2) then + local b1=c:IsLevelAbove(2) + local b2=c:IsLevelAbove(3) + local lv=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + --Decrease its Level by up to 2 + c:UpdateLevel(-lv,RESET_EVENT|RESETS_STANDARD_DISABLE) + end +end +function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local sync=c:GetReasonCard() + return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and (sync:IsCode(CARD_RED_DRAGON_ARCHFIEND) or sync:ListsCode(CARD_RED_DRAGON_ARCHFIEND)) +end +function s.gyspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.gyspfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file diff --git a/pre-release/c101304104.lua b/pre-release/c101304104.lua new file mode 100644 index 0000000000..4135357721 --- /dev/null +++ b/pre-release/c101304104.lua @@ -0,0 +1,86 @@ +--スカーレッド・ノヴァ・ドラゴン/バスター +--Red Nova Dragon/Assault Mode +--Scripted by The Razgriz +local s,id=GetID() +local CARD_RED_NOVA_DRAGON=97489701 +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Banish cards your opponent controls, up to the number of Tuners in your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e1:SetCost(s.tempbanishcost) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) + c:RegisterEffect(e1) + --Negate the attack and end Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_ATTACK_ANNOUNCE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + e2:SetCost(s.tempbanishcost) + e2:SetOperation(s.negbpop) + c:RegisterEffect(e2) + --Special Summon 1 "Red Nova Dragon" from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_ASSAULT_MODE,CARD_RED_NOVA_DRAGON} +s.assault_mode=CARD_RED_NOVA_DRAGON +function s.tempbanishcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() end + --Banish this card until the End Phase + aux.RemoveUntil(c,nil,REASON_COST,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_TUNER) + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) + local max_ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_TUNER) + if max_ct==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,max_ct,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end +function s.negbpop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateAttack() then + Duel.BreakEffect() + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + end +end +function s.spfilter(c,e,tp) + return c:IsCode(CARD_RED_NOVA_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local 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 \ No newline at end of file diff --git a/pre-release/c101304105.lua b/pre-release/c101304105.lua new file mode 100644 index 0000000000..126c39b0b5 --- /dev/null +++ b/pre-release/c101304105.lua @@ -0,0 +1,83 @@ +--紅蓮の王者 +--The Crimson King +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner DARK monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),1,99) + --Add 1 card that mentions "Red Dragon Archfiend" from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon 1 "Red Dragon Archfiend" from your Extra Deck (this is treated as a Synchro Summon) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_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 and re:IsMonsterEffect() end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.thfilter(c) + return c:ListsCode(CARD_RED_DRAGON_ARCHFIEND) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp,mc) + if not c:IsCode(CARD_RED_DRAGON_ARCHFIEND) then return false end + local forcedg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) + return #forcedg==0 and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) 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 not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then + sc:CompleteProcedure() + --Its ATK becomes doubled + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK) + e1:SetValue(sc:GetAttack()*2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + --Also it cannot be destroyed by your opponent's card effects + local e2=e1:Clone() + e2:SetDescription(3060) + e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetValue(aux.indoval) + sc:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/pre-release/c101304106.lua b/pre-release/c101304106.lua new file mode 100644 index 0000000000..01294eea9a --- /dev/null +++ b/pre-release/c101304106.lua @@ -0,0 +1,70 @@ +-- クリムゾン・ブレード・ドラゴン +--Crimson Blade Dragon +local s,id=GetID() +local CARD_CRIMSON_BLADER=80321197 +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 "Resonator" Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RESONATOR),1,1,Synchro.NonTuner(nil),1,99) + --Take 1 Level 8 or higher monster from your Deck or GY that cannot be Normal Summoned/Set, and either Special Summon it (but negate its effects) or add it to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.thsptg) + e1:SetOperation(s.thspop) + c:RegisterEffect(e1) + --Destroy that monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_START) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_CRIMSON_BLADER} +s.listed_series={SET_RESONATOR} +function s.thspfilter(c,e,tp,mmz_chk) + return c:IsLevelAbove(8) and not c:IsSummonableCard() and (c:IsAbleToHand() + or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not sc then return end + aux.ToHandOrElse(sc,tp, + function() + return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() + end, + aux.Stringid(id,3) + ) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return bc and bc:IsFaceup() and bc:IsLevelAbove(5) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + if bc:IsRelateToBattle() then + Duel.Destroy(bc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304107.lua b/pre-release/c101304107.lua new file mode 100644 index 0000000000..39d7bcedae --- /dev/null +++ b/pre-release/c101304107.lua @@ -0,0 +1,52 @@ +--クリムゾン・ヘルコール +--Crimson Call +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Add 1 Level 4 or lower Fiend monster from your GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Allow your "/Assault Mode" monster or "Red Dragon Archfiend" to make a second attack in a row + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_DAMAGE_STEP_END) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(s.atkcon) + e2:SetCost(Cost.SelfBanish) + e2:SetOperation(function() Duel.ChainAttack() end) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +s.listed_series={SET_ASSAULT_MODE} +function s.thfilter(c) + return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsAbleToHand() +end +function s.rdafilter(c) + return (c:IsCode(CARD_RED_DRAGON_ARCHFIEND) or (c:IsSynchroMonster() and c:ListsCode(CARD_RED_DRAGON_ARCHFIEND))) and c:IsFaceup() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,locations,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,locations) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,locations,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local ac=Duel.GetAttacker() + return ac:IsControler(tp) and ac:CanChainAttack() and (ac:IsCode(CARD_RED_DRAGON_ARCHFIEND) or ac:IsSetCard(SET_ASSAULT_MODE)) +end diff --git a/pre-release/c101304108.lua b/pre-release/c101304108.lua new file mode 100644 index 0000000000..b2587ece8b --- /dev/null +++ b/pre-release/c101304108.lua @@ -0,0 +1,95 @@ +--覇者の鳴動 +--The Ruler's Rumbling +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Apply these effects, in sequence, based on the number of monsters your opponent Special Summoned this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + 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) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Keep track of how many monsters each player has Special Summoned in a given turn + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_SPSUMMON_SUCCESS) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local g0,g1=eg:Split(Card.IsSummonPlayer,nil,0) + for sc0 in g0:Iter() do + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + end + for sc1 in g1:Iter() do + Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) + end +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and c:IsFaceup() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetFlagEffect(1-tp,id) + if chk==0 then + local b1=ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) + local b2=ct>=3 + local b3=ct>=5 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) + return b1 or b2 or b3 + end + if ct>=1 then + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + end + if ct>=5 then + Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE) + if e:IsHasType(EFFECT_TYPE_ACTIVATE) and ct>=10 then + Duel.SetChainLimit(aux.FALSE) + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local ct=Duel.GetFlagEffect(1-tp,id) + local breakeff=false + if ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + breakeff=true + end + if ct>=3 then + if breakeff then Duel.BreakEffect() end + local c=e:GetHandler() + local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) + --"Red Dragon Archfiend" in your Monster Zone is unaffected by your opponent's activated effects until the end of your next turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_RED_DRAGON_ARCHFIEND)) + e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) + Duel.RegisterEffect(e1,tp) + breakeff=true + end + if ct>=5 then + if breakeff then Duel.BreakEffect() end + local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) + end + end +end \ No newline at end of file From 87fde3fc42892e4ec0ca7828d52b52406d56318a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 3 Jan 2026 14:47:47 +0200 Subject: [PATCH 3/3] Add files via upload --- archetype_setcode_constants.lua | 2 +- card_counter_constants.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index d31b80a8fe..21f28daa1f 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -601,8 +601,8 @@ SET_HECAHANDS = 0x1cc SET_ENNEACRAFT = 0x1cd SET_KEWL_TUNE = 0x1ce SET_ECCLESIA = 0x1cf +SET_END_OF_THE_WORLD = 0x1d1 --Released but the official English name is unconfirmed SET_ELVENNOTES = 0x1d0 --Pre-release archetypes -SET_END_OF_THE_WORLD = 0x1d1 SET_FAIRY_TAIL = 0x1d2 diff --git a/card_counter_constants.lua b/card_counter_constants.lua index e64b663099..3f986f48ec 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -86,7 +86,7 @@ CARD_R_ACE_HYDRANT = 37617348 CARD_RA = 10000010 CARD_RED_DRAGON_ARCHFIEND = 70902743 CARD_REDEYES_B_DRAGON = 74677422 -CARD_REGULUS_THE_PRINCE_OF_ENDYMION = 100200282 +CARD_REGULUS_THE_PRINCE_OF_ENDYMION = 96228804 CARD_REVEALER_ICEBARRIER = 18319762 CARD_REVERSAL_OF_FATE = 36690018 CARD_RIKKA_KONKON = 76869711