From 95130c0150c8e693ff6a56dd864709507d36a96e Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 22 Nov 2025 13:19:04 +0200 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c100295111.lua | 85 ------------------------ pre-release/c100296301.lua | 67 ------------------- pre-release/c100444301.lua | 98 ---------------------------- pre-release/c100444302.lua | 72 --------------------- pre-release/c100447005.lua | 79 ----------------------- pre-release/c100447018.lua | 87 ------------------------- pre-release/c100447019.lua | 78 ---------------------- pre-release/c100447020.lua | 79 ----------------------- pre-release/c100447021.lua | 78 ---------------------- pre-release/c100447022.lua | 97 ---------------------------- pre-release/c100447044.lua | 77 ---------------------- pre-release/c100447062.lua | 125 ------------------------------------ pre-release/c100447063.lua | 89 -------------------------- pre-release/c100447064.lua | 81 ----------------------- pre-release/c100447065.lua | 96 ---------------------------- pre-release/c100447066.lua | 67 ------------------- pre-release/c100447101.lua | 85 ------------------------ pre-release/c100447102.lua | 84 ------------------------ pre-release/c100447103.lua | 68 -------------------- pre-release/c100447104.lua | 89 -------------------------- pre-release/c100447106.lua | 90 -------------------------- pre-release/c100447107.lua | 101 ----------------------------- pre-release/c100447108.lua | 113 -------------------------------- pre-release/c100447109.lua | 104 ------------------------------ 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 | 86 ------------------------- 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/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 --------------------------- 61 files changed, 5120 deletions(-) delete mode 100644 pre-release/c100295111.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/c100447005.lua delete mode 100644 pre-release/c100447018.lua delete mode 100644 pre-release/c100447019.lua delete mode 100644 pre-release/c100447020.lua delete mode 100644 pre-release/c100447021.lua delete mode 100644 pre-release/c100447022.lua delete mode 100644 pre-release/c100447044.lua delete mode 100644 pre-release/c100447062.lua delete mode 100644 pre-release/c100447063.lua delete mode 100644 pre-release/c100447064.lua delete mode 100644 pre-release/c100447065.lua delete mode 100644 pre-release/c100447066.lua delete mode 100644 pre-release/c100447101.lua delete mode 100644 pre-release/c100447102.lua delete mode 100644 pre-release/c100447103.lua delete mode 100644 pre-release/c100447104.lua delete mode 100644 pre-release/c100447106.lua delete mode 100644 pre-release/c100447107.lua delete mode 100644 pre-release/c100447108.lua delete mode 100644 pre-release/c100447109.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/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/c100295111.lua b/pre-release/c100295111.lua deleted file mode 100644 index 02734e55ef..0000000000 --- a/pre-release/c100295111.lua +++ /dev/null @@ -1,85 +0,0 @@ ---魔弾の悪魔 カスパール ---Magical Musket Mastermind Caspar ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 monsters, including a LIGHT Fiend monster - Link.AddProcedure(c,nil,2,2,s.matcheck) - --Take 2 "Magical Musket" cards from your hand and/or Deck, including a monster, Special Summon 1 of those monsters, and Set the other card to your opponent's field - 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.spsettg) - e1:SetOperation(s.spsetop) - c:RegisterEffect(e1) - --During either player's turn, you can activate "Magical Musket" Spell/Trap Cards from your hand. - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetCode(EFFECT_QP_ACT_IN_NTPHAND) - e2a:SetRange(LOCATION_MZONE) - e2a:SetTargetRange(LOCATION_HAND,0) - e2a:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MAGICAL_MUSKET)) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_TRAP_ACT_IN_HAND) - c:RegisterEffect(e2b) -end -s.listed_series={SET_MAGICAL_MUSKET} -function s.matfilter(c,lc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT,lc,sumtype,tp) and c:IsRace(RACE_FIEND,lc,sumtype,tp) -end -function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(s.matfilter,1,nil,lc,sumtype,tp) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(s.spfilter,1,nil,e,tp,sg) -end -function s.spfilter(c,e,tp,sg) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and sg:IsExists(s.setfilter,1,c,e,tp,1-tp) -end -function s.setfilter(c,e,tp,opp) - return (Duel.GetMZoneCount(opp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,opp)) or c:IsSSetable(false,opp) -end -function s.spsettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetMZoneCount(tp)<=0 then return false end - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND|LOCATION_DECK,0,nil,SET_MAGICAL_MUSKET) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.spsetop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetMZoneCount(tp)<=0 then return end - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND|LOCATION_DECK,0,nil,SET_MAGICAL_MUSKET) - if #g<2 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,1)) - if #sg~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local spg=sg:FilterSelect(tp,s.spfilter,1,1,nil,e,tp,sg) - if #spg>0 and Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)>0 then - local opp=1-tp - local setc=(sg-spg):GetFirst() - local b1=Duel.GetMZoneCount(opp)>0 and setc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,opp) - local b2=setc:IsSSetable(false,opp) - local op=nil - if b1 and b2 then - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - else - op=b1 and 1 or 2 - end - if op==1 then - Duel.SpecialSummon(setc,0,tp,opp,false,false,POS_FACEDOWN_DEFENSE) - Duel.ConfirmCards(tp,setc) - elseif op==2 then - Duel.SSet(tp,setc,opp) - end - 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 a057f40d39..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,100200282),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={100200282,28553439} --"Regulus, the Prince of Endymion", "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 \ No newline at end of file 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/c100447005.lua b/pre-release/c100447005.lua deleted file mode 100644 index cd3a106974..0000000000 --- a/pre-release/c100447005.lua +++ /dev/null @@ -1,79 +0,0 @@ ---セイバー・コンビネーション ---Saber Combination ---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) - --While you have 10 or more "X-Saber" monsters in your field, GY, and/or banishment, "X-Saber" monsters you control gain ATK equal to their own original DEF - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(s.atkcon) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_X_SABER) end) - e1:SetValue(function(e,c) return c:GetBaseDefense() end) - c:RegisterEffect(e1) - --Special Summon 1 "X-Saber" monster from your hand or Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(s.handdeckspcon) - e2:SetTarget(s.sptg(LOCATION_HAND|LOCATION_DECK)) - e2:SetOperation(s.spop(LOCATION_HAND|LOCATION_DECK)) - c:RegisterEffect(e2) - --Special Summon 1 "X-Saber" monster from your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e3:SetTarget(s.sptg(LOCATION_HAND)) - e3:SetOperation(s.spop(LOCATION_HAND)) - c:RegisterEffect(e3) -end -s.listed_series={SET_X_SABER} -function s.atkfilter(c) - return c:IsSetCard(SET_X_SABER) and c:IsMonster() and c:IsFaceup() -end -function s.atkcon(e) - return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED,0,10,nil) -end -function s.handdeckspconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSetCard(SET_X_SABER) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.handdeckspcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.handdeckspconfilter,1,nil,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_X_SABER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(location) - return function(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,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,location) - end -end -function s.spop(location) - return function(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,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/c100447018.lua b/pre-release/c100447018.lua deleted file mode 100644 index b220ef59ec..0000000000 --- a/pre-release/c100447018.lua +++ /dev/null @@ -1,87 +0,0 @@ ---ドラグニティ-クイリヌス ---Dragunity Quirinus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Your "Dragunity" monsters cannot be destroyed by battle while this card is equipped with an Equip Card - 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:SetCondition(function(e) return e:GetHandler():HasEquipCard() end) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_DRAGUNITY) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Add 1 "Dragunity" Spell/Trap from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - 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) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Return 1 "Dragunity" Monster Card you control to the hand/Extra Deck, then you can Special Summon 1 "Dragunity" monster from your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thsptg) - e3:SetOperation(s.thspop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DRAGUNITY} -function s.thfilter(c) - return c:IsSetCard(SET_DRAGUNITY) 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.thorextfilter(c) - return c:IsSetCard(SET_DRAGUNITY) and c:IsMonsterCard() and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra()) -end -function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thorextfilter(chkc) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.thorextfilter,tp,LOCATION_ONFIELD,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thorextfilter,tp,LOCATION_ONFIELD,0,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) then - if tc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end - if 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,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100447019.lua b/pre-release/c100447019.lua deleted file mode 100644 index 39602b3ee3..0000000000 --- a/pre-release/c100447019.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ドラグニティ-ファルシオン ---Dragunity Falchion ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Equip 1 Dragon "Dragunity" monster from your Deck or GY to 1 "Dragunity" monster you control as an Equip Spell - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfBanish) - e1:SetTarget(s.eqtg) - e1:SetOperation(s.eqop) - c:RegisterEffect(e1) - --Banish 1 face-up card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.rmcon) - e2:SetCost(Cost.SelfToGrave) - e2:SetTarget(s.rmtg) - e2:SetOperation(s.rmop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGUNITY} -function s.eqfilter(c,tp) - return c:IsRace(RACE_DRAGON) and c:IsSetCard(SET_DRAGUNITY) and c:CheckUniqueOnField(tp) and not c:IsForbidden() -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_DRAGUNITY) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() - if ec and Duel.Equip(tp,ec,tc) then - --Equip limit - local e1=Effect.CreateEffect(ec) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetValue(function(e,c) return c==tc end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - ec:RegisterEffect(e1) - end -end -function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and ec:IsSetCard(SET_DRAGUNITY) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100447020.lua b/pre-release/c100447020.lua deleted file mode 100644 index 20fd810c77..0000000000 --- a/pre-release/c100447020.lua +++ /dev/null @@ -1,79 +0,0 @@ ---ドラグニティナイト-アーレウス ---Dragunity Knight - Areus -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Synchro Monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsType,TYPE_SYNCHRO),1,99) - --Negate the effects of face-up cards your opponent controls, up to the number of face-up Monster Cards in your Spell & Trap Zone, until the end of this turn - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_DISABLE) - e1a:SetType(EFFECT_TYPE_IGNITION) - e1a:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCountLimit(1,id) - e1a:SetCondition(function(e) return not e:GetHandler():HasEquipCard() end) - e1a:SetTarget(s.distg) - e1a:SetOperation(s.disop) - c:RegisterEffect(e1a) - --This is a Quick Effect if this card is equipped with an Equip Card - local e1b=e1a:Clone() - e1b:SetType(EFFECT_TYPE_QUICK_O) - e1b:SetCode(EVENT_FREE_CHAIN) - e1b:SetCondition(function(e) return e:GetHandler():HasEquipCard() end) - e1b:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1b) - --Special Summon this card, then you can Special Summon 1 "Dragunity" Tuner from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGUNITY} -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsNegatable() end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsMonsterCard),tp,LOCATION_STZONE,0,nil) - if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e) - for tc in tg:Iter() do - --Negate their effects until the end of this turn - tc:NegateEffects(c,RESETS_STANDARD_PHASE_END,true) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DRAGUNITY) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100447021.lua b/pre-release/c100447021.lua deleted file mode 100644 index eae2f39b0f..0000000000 --- a/pre-release/c100447021.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ドラグニティロード-ゲオルギアス ---Dragunity Lord - Georgius -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters, including a Tuner - Link.AddProcedure(c,nil,2,4,s.tunermatcheck) - --Your opponent cannot activate the effects of monsters in the GY while this card is equipped with a "Dragunity" card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetCondition(function(e) return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_DRAGUNITY) end) - e1:SetValue(function(e,re,tp) return re:IsMonsterEffect() and re:GetHandler():IsLocation(LOCATION_GRAVE) end) - c:RegisterEffect(e1) - --Special Summon 1 Level 5 or higher "Dragunity" monster from your Extra Deck or GY - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SPSUMMON_SUCCESS) - e2a:SetCountLimit(1,id) - e2a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - 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:SetRange(LOCATION_MZONE) - e2b:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - c:RegisterEffect(e2b) - --Negate an opponent's activated Spell/Trap Card or effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - 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 ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end) - e3:SetCost(s.discost) - e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) end) - e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e3) - aux.DoubleSnareValidity(c,LOCATION_MZONE) -end -s.listed_series={SET_DRAGUNITY} -function s.tunermatcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsType,1,nil,TYPE_TUNER,lc,sumtype,tp) -end -function s.spfilter(c,e,tp,mmz_chk) - if not (c:IsLevelAbove(5) and c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - else - return mmz_chk - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) 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,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsEquipCard,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEquipCard,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end \ No newline at end of file diff --git a/pre-release/c100447022.lua b/pre-release/c100447022.lua deleted file mode 100644 index 610af9062f..0000000000 --- a/pre-release/c100447022.lua +++ /dev/null @@ -1,97 +0,0 @@ ---神風のドラグニティ ---Dragunity Divine Wind ---scripted by pyrQ -local s,id=GetID() -local CARD_DRAGON_RAVINE=62265044 -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Apply 1 of these effects, or if "Dragon Ravine" is in your GY, you can apply any of them, in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_names={CARD_DRAGON_RAVINE} -s.listed_series={SET_DRAGUNITY} -function s.thfilter(c) - return c:IsRace(RACE_DRAGON|RACE_WINGEDBEAST) and c:IsAbleToHand() -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) - local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - return b1 or b2 - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function s.eqfilter(c,tp) - return c:IsRace(RACE_DRAGON) and c:IsSetCard(SET_DRAGUNITY) and c:CheckUniqueOnField(tp) and not c:IsForbidden() -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local b1=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) - local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - local ravine_chk=Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_DRAGON_RAVINE) - local op=nil - if not ravine_chk then - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - end - local breakeffect=false - if (op and op==1) or (ravine_chk and b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(id,3)))) then - --Add 1 Dragon or Winged Beast monster from your GY to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - end - breakeffect=true - end - if (op and op==2) or (ravine_chk and b2 and (not breakeffect or Duel.SelectYesNo(tp,aux.Stringid(id,4)))) then - --Special Summon 1 "Dragunity" monster from your hand, then you can equip 1 Dragon "Dragunity" monster from your Deck to it as an Equip Spell - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() - if sc then - if breakeffect then Duel.BreakEffect() end - if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,5)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if not ec then return end - Duel.BreakEffect() - if Duel.Equip(tp,ec,sc) then - --Equip limit - local e0=Effect.CreateEffect(e:GetHandler()) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) - e0:SetValue(function(e,c) return c==sc end) - e0:SetReset(RESET_EVENT|RESETS_STANDARD) - ec:RegisterEffect(e0) - end - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100447044.lua b/pre-release/c100447044.lua deleted file mode 100644 index 656ec831d0..0000000000 --- a/pre-release/c100447044.lua +++ /dev/null @@ -1,77 +0,0 @@ ---神星なる繋束 ---Stellarnova Bonds ---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) - c:RegisterEffect(e1) -end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} -function s.spfilter(c,e,tp) - return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,c:GetRace()),tp,LOCATION_MZONE,0,1,nil) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,{SET_TELLARKNIGHT,SET_CONSTELLAR}),tp,LOCATION_MZONE,0,nil) - local b2=ct>0 and Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_DISABLE) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,tp,0) - 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 - --Discard 1 card, and if you do, Special Summon 1 "tellarknight" or "Constellar" monster from your Deck with a different Type from the monsters you control - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - elseif op==2 then - --Negate the effects of face-up monsters your opponent controls, up to the number of "tellarknight" and "Constellar" monsters you control - local tg=Duel.GetTargetCards(e):Match(Card.IsMonster,nil) - if #tg>0 then - for tc in tg:Iter() do - --Negate their effects until the end of this turn - tc:NegateEffects(c,RESET_PHASE|PHASE_END) - end - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,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:IsXyzMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100447062.lua b/pre-release/c100447062.lua deleted file mode 100644 index 754a393fa1..0000000000 --- a/pre-release/c100447062.lua +++ /dev/null @@ -1,125 +0,0 @@ ---影雄の烬 エグリスタ ---Tohushaddoll Grysta ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Apply the effect of 1 non-Rock "Shaddoll" monster in your GY that activates when it is flipped face-up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,id) - e1:SetTarget(s.applytg) - e1:SetOperation(s.applyop) - c:RegisterEffect(e1) - --Fusion Summon 1 "Shaddoll" Fusion Monster from your Extra Deck, by banishing its materials from your hand, field, and/or GY - local fusion_params={ - fusfilter=function(c) return c:IsSetCard(SET_SHADDOLL) end, - matfilter=Card.IsAbleToRemove, - extrafil=s.fextra, - extraop=Fusion.BanishMaterial, - extratg=s.extratg} - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) and not Duel.IsPhase(PHASE_DAMAGE) end) - e2:SetCost(s.fusioncost) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_SHADDOLL) end) -end -s.listed_series={SET_SHADDOLL} -function s.applyfilter(c,e,tp) - if c:IsCode(id) then return false end - if not (not c:IsRace(RACE_ROCK) and c:IsSetCard(SET_SHADDOLL) and c:IsMonster()) then return false end - local effs={c:GetOwnEffects()} - for _,eff in ipairs(effs) do - if eff:GetType()&EFFECT_TYPE_FLIP>0 or eff:GetCode()==EVENT_FLIP then - local tg=eff:GetTarget() - if tg==nil or tg(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0) then - return true - end - end - end - return false -end -function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - local available_effs={} - local effs={tc:GetOwnEffects()} - for _,eff in ipairs(effs) do - if eff:GetType()&EFFECT_TYPE_FLIP>0 or eff:GetCode()==EVENT_FLIP then - local tg=eff:GetTarget() - if tg==nil or tg(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0) then - table.insert(available_effs,eff) - end - end - end - local eff=nil - if #available_effs>1 then - local available_effs_desc={} - for _,eff in ipairs(available_effs) do - table.insert(available_effs_desc,eff:GetDescription()) - end - local op=Duel.SelectOption(tp,table.unpack(available_effs_desc)) - eff=available_effs[op+1] - else - eff=available_effs[1] - end - Duel.Hint(HINT_OPSELECTED,1-tp,eff:GetDescription()) - Duel.ClearTargetCard() - tc:CreateEffectRelation(e) - e:SetLabel(eff:GetLabel()) - e:SetLabelObject(eff:GetLabelObject()) - local tg=eff:GetTarget() - if tg then - tg(e,tp,eg,ep,ev,re,r,rp,1) - eff:SetLabel(e:GetLabel()) - eff:SetLabelObject(e:GetLabelObject()) - end - e:SetLabelObject(eff) - Duel.ClearOperationInfo(0) -end -function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local eff=e:GetLabelObject() - if not (eff and eff:GetHandler():IsRelateToEffect(e)) then return end - e:SetLabel(eff:GetLabel()) - e:SetLabelObject(eff:GetLabelObject()) - local op=eff:GetOperation() - if op then - op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) - end - e:SetLabel(0) - e:SetLabelObject(nil) -end -function s.fusioncost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon from the Extra Deck the turn you activate this effect, except "Shaddoll" monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_SHADDOLL) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) -end diff --git a/pre-release/c100447063.lua b/pre-release/c100447063.lua deleted file mode 100644 index 57752dcadd..0000000000 --- a/pre-release/c100447063.lua +++ /dev/null @@ -1,89 +0,0 @@ ---エルシャドール・メシャフレール ---El Shaddoll Meshahrail ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Shaddoll" monster + 1 DARK monster + 1 EARTH monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter(ATTRIBUTE_DARK),s.matfilter(ATTRIBUTE_EARTH)) - c:AddMustBeFusionSummoned() - --Unaffected by your opponent's activated Spell/Trap effects and by activated effects from opponent's monsters whose original Level/Rank is lower than this card's current Level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(s.immval) - c:RegisterEffect(e1) - --Add 1 "Shaddoll" card or "Void" Spell/Trap from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(Cost.PayLP(800)) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Special Summon 1 "Shaddoll" monster from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SHADDOLL,SET_VOID} -s.material_setcode=SET_SHADDOLL -function s.matfilter(attribute) - return function(c,fc,sumtype,tp) - return c:IsAttribute(attribute,fc,sumtype,tp) or c:IsHasEffect(4904633) - end -end -function s.immval(e,te) - if not (te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated()) then return false end - if te:IsSpellTrapEffect() then return true end - local tc=te:GetHandler() - local lv=e:GetHandler():GetLevel() - if tc:HasLevel() then - return tc:GetOriginalLevel()0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SHADDOLL) 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/c100447064.lua b/pre-release/c100447064.lua deleted file mode 100644 index c0944ae733..0000000000 --- a/pre-release/c100447064.lua +++ /dev/null @@ -1,81 +0,0 @@ ---影霊翼騎 ウェンディクルフ ---Reeshaddoll Wendicluhu ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustFirstBeFusionSummoned() - --Fusion Materials: 1 "Shaddoll" monster + 1 WIND monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) - --Change any number of face-down monsters on the field to face-up Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Add 1 "Shaddoll" card from your GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SHADDOLL} -s.material_setcode=SET_SHADDOLL -function s.matfilter(c,lc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_WIND,lc,sumtype,tp) or c:IsHasEffect(4904633) -end -function s.posfilter(c) - return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition() -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp,chk) - local facedown_ct=Duel.GetMatchingGroupCount(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if facedown_ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,facedown_ct,nil) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)==0 then return end - local og=Duel.GetOperatedGroup() - local flip_count=og:FilterCount(Card.IsType,nil,TYPE_FLIP) - if flip_count>0 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,og) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local pos_g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,flip_count,og) - if #pos_g>0 then - Duel.HintSelection(pos_g) - Duel.BreakEffect() - Duel.ChangePosition(pos_g,POS_FACEDOWN_DEFENSE) - end - end -end -function s.thfilter(c) - return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100447065.lua b/pre-release/c100447065.lua deleted file mode 100644 index 4a3bde80bb..0000000000 --- a/pre-release/c100447065.lua +++ /dev/null @@ -1,96 +0,0 @@ ---凍てし心が映す神影 ---Lev Shaddoll Fusion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: Send 1 Fusion Monster from your Extra Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.effcost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Special Summon 1 "Shaddoll" Fusion Monster with a different Attribute from your Extra Deck (this is treated as a Fusion Summon), but change its ATK to 0 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(s.spcost,s.effcost)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_SHADDOLL) end) -end -s.listed_series={SET_SHADDOLL} -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 from the Extra Deck the turn you activate either of this card's effects, except "Shaddoll" monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_SHADDOLL) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.tgfilter(c) - return c:IsFusionMonster() and c:IsAbleToGrave() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.spcostfilter(c,e,tp) - return c:IsFusionMonster() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetAttribute(),c) -end -function s.spfilter(c,e,tp,attr,cost_c) - return c:IsSetCard(SET_SHADDOLL) and c:IsFusionMonster() and c:IsAttributeExcept(attr) - and c:CheckFusionMaterial() and Duel.GetLocationCountFromEx(tp,tp,cost_c,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) end - local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst() - e:SetLabel(sc:GetAttribute()) - Duel.Release(sc,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local attr=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,attr):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummonStep(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) then - --Change its ATK to 0 - local e1=Effect.CreateEffect(e:GetHandler()) - 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) - sc:RegisterEffect(e1) - end - if Duel.SpecialSummonComplete()>0 then - sc:CompleteProcedure() - end -end \ No newline at end of file diff --git a/pre-release/c100447066.lua b/pre-release/c100447066.lua deleted file mode 100644 index 9687b03bb8..0000000000 --- a/pre-release/c100447066.lua +++ /dev/null @@ -1,67 +0,0 @@ ---煉獄の乖放 ---Void Liberation ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Add 2 "Shaddoll" cards from your Deck to your hand of different types (Monster, Spell, or Trap) from the revealed card and each other, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.Reveal(s.revealfilter,true,1,1,function(e,tp,g) e:SetLabel(g:GetFirst():GetMainCardType()) end)) - e1:SetTarget(s.shaddollthtg) - e1:SetOperation(s.shaddollthop) - c:RegisterEffect(e1) - --Add 1 "Infernoid" monster from your Deck or GY your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.infernoidthtg) - e2:SetOperation(s.infernoidthop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SHADDOLL,SET_INFERNOID} -function s.revealfilter(c,e,tp) - return c:IsSetCard(SET_SHADDOLL) and not c:IsPublic() - and Duel.GetMatchingGroup(s.shaddollthfilter,tp,LOCATION_DECK,0,nil,c:GetMainCardType()):GetClassCount(Card.GetMainCardType)==2 -end -function s.shaddollthfilter(c,main_type) - return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToHand() and not c:IsType(main_type) -end -function s.shaddollthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.shaddollthop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.shaddollthfilter,tp,LOCATION_DECK,0,nil,e:GetLabel()) - if #g<2 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetMainCardType),1,tp,HINTMSG_ATOHAND) - if #sg==2 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.infernoidthfilter(c) - return c:IsSetCard(SET_INFERNOID) and c:IsMonster() and c:IsAbleToHand() -end -function s.infernoidthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.infernoidthfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.infernoidthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.infernoidthfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100447101.lua b/pre-release/c100447101.lua deleted file mode 100644 index 11fcdc6d91..0000000000 --- a/pre-release/c100447101.lua +++ /dev/null @@ -1,85 +0,0 @@ ---セイクリッド・カストル ---Constellar Castor ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Constellar" monster from your Deck - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.sptg) - e1a:SetOperation(s.spop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1c) - --A "Constellar" Xyz Monster that has this card as material gains this effect: Negate a Spell or effect activated by the opponent, and if you do, destroy that card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.discon) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CONSTELLAR} -s.listed_names={id} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - --Excluding itself for a proper interaction with "Tellarknight Constellar Caduceus" [58858807] - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK 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|ATTRIBUTE_LIGHT) 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|ATTRIBUTE_LIGHT) end) - --Special Summon 1 "Constellar" monster from your Deck - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSetCard(SET_CONSTELLAR) and rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) 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.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT)==2 and Duel.NegateEffect(ev) - and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100447102.lua b/pre-release/c100447102.lua deleted file mode 100644 index dfec98f201..0000000000 --- a/pre-release/c100447102.lua +++ /dev/null @@ -1,84 +0,0 @@ ---星騎士 キュグニ ---Tellarknight Cygnian ---Scripted by ahtelel -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "tellarknight" or "Constellar" monster from your Deck to your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.thtg) - e1a:SetOperation(s.thop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1c) - --Increase this card and another LIGHT monster's Level by 1 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LVCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.lvtg) - e2:SetOperation(s.lvop) - c:RegisterEffect(e2) - --Can be treated as 2 Materials for the Xyz Summon of a "tellarknight" Xyz monster that requires 3 or more materials - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DOUBLE_XYZ_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetValue(1) - e3:SetOperation(function(e,c) return c.minxyzct and c.minxyzct>=3 and c:IsSetCard(SET_TELLARKNIGHT) end) - c:RegisterEffect(e3) -end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} -function s.thfilter(c) - return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.lvfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:HasLevel() and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc~=c and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,c) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() then - --Increase both their Level by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - local e2=e1:Clone() - tc:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/pre-release/c100447103.lua b/pre-release/c100447103.lua deleted file mode 100644 index 17783f1598..0000000000 --- a/pre-release/c100447103.lua +++ /dev/null @@ -1,68 +0,0 @@ ---超神星輝士 セイクリッド・トレミスΩ7 ---Exstellarknight Constellar Ptolemy Ω7 ---Scripted by ahtelel -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 7 monsters OR 1 "tellarknight" or "Constellar" Xyz Monster you control - Xyz.AddProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) - --While you have 7 or more "tellarknight" monsters with different names in your GY and/or banishment, this card gains 2700 ATK/DEF, also it is unaffected by your opponent's activated effects - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE) - e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1a:SetCode(EFFECT_UPDATE_ATTACK) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCondition(s.atkdefimmcon) - e1a:SetValue(2700) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EFFECT_IMMUNE_EFFECT) - e1c:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) - c:RegisterEffect(e1c) - --Shuffle opponent's monsters into the deck based on the number of materials you detach from this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetTargetCount(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil) end,function(e,og) e:SetLabel(#og) end)) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} -s.listed_names={id} -function s.ovfilter(c,tp,xyzc) - return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR},xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return Duel.IsMainPhase2(tp) and not Duel.HasFlagEffect(tp,id) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.atkdefimmfilter(c) - return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and c:IsFaceup() -end -function s.atkdefimmcon(e,c) - return Duel.GetMatchingGroup(s.atkdefimmfilter,e:GetHandlerPlayer(),LOCATION_GRAVE|LOCATION_REMOVED,0,nil):GetClassCount(Card.GetCode)>=7 -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100447104.lua b/pre-release/c100447104.lua deleted file mode 100644 index 2bbe0f4f10..0000000000 --- a/pre-release/c100447104.lua +++ /dev/null @@ -1,89 +0,0 @@ ---星騎士 セイクリッド・デルタテロス ---Tellarknight Constellar Delteros ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3+ Level 4 monsters - Xyz.AddProcedure(c,nil,4,3,nil,nil,Xyz.InfiniteMats) - --Your opponent cannot target Rank 5 or higher "tellarknight" or "Constellar" Xyz Monsters you control with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.tellarkR5filter) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --Add 1 "tellarknight" or "Constellar" monster from your Deck to your hand, then immediately after this effect resolves, you can Normal Summon 1 LIGHT monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(Cost.DetachFromSelf(1)) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Special Summon 1 "tellarknight" or "Constellar" monster from your hand or banishment - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} -function s.tellarkR5filter(e,c) - return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsRankAbove(5) and c:IsFaceup() -end -function s.thfilter(c) - return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.nsfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSummonable(true,nil) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local 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.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.BreakEffect() - Duel.Summon(tp,sc,true,nil) - end - end - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_REMOVED) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100447106.lua b/pre-release/c100447106.lua deleted file mode 100644 index b5277b550f..0000000000 --- a/pre-release/c100447106.lua +++ /dev/null @@ -1,90 +0,0 @@ ---X-セイバー ペリナ ---X-Saber Perina ---Scripted by the Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 2 "X-Saber" monsters from your Deck, except "X-Saber Perina", but destroy them during the End Phase - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetCost(Cost.SelfToGrave) - e1a:SetTarget(s.sptg) - e1a:SetOperation(s.spop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --Apply an effect to the "X-Saber" Synchro Monster that used this card as material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.effcon) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_X_SABER} -s.listed_names={id} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_X_SABER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.GetMZoneCount(tp,e:GetHandler())>=2 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,2,tp,LOCATION_MZONE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,2,2,nil,e,tp) - if #g==2 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then - --Destroy them during the End Phase - aux.DelayedOperation(g,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2)) - end -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - if not (r==REASON_SYNCHRO and (Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and not Duel.IsEndStep()))) then return false end - local c=e:GetHandler() - local sync=c:GetReasonCard() - if not (c:IsLocation(LOCATION_GRAVE) and sync:IsSetCard(SET_X_SABER)) then return false end - e:SetLabelObject(sync) - sync:RegisterFlagEffect(id,RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET),0,1) - return true -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local sync=e:GetLabelObject() - if chk==0 then - return sync:HasFlagEffect(id) and not (sync:IsHasEffect(EFFECT_EXTRA_ATTACK) and sync:IsHasEffect(EFFECT_DIRECT_ATTACK)) - end - sync:CreateEffectRelation(e) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local sync=e:GetLabelObject() - if not sync:IsRelateToEffect(e) then return end - local b1=not sync:IsHasEffect(EFFECT_EXTRA_ATTACK) - local b2=not sync:IsHasEffect(EFFECT_DIRECT_ATTACK) - if not (b1 or b2) then return end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - local desc=op==1 and 3201 or 3205 - local eff_code=op==1 and EFFECT_EXTRA_ATTACK or EFFECT_DIRECT_ATTACK - --It can make a second attack during each Battle Phase OR it can attack directly - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(desc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(eff_code) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sync:RegisterEffect(e1) -end \ No newline at end of file diff --git a/pre-release/c100447107.lua b/pre-release/c100447107.lua deleted file mode 100644 index 591e2bd607..0000000000 --- a/pre-release/c100447107.lua +++ /dev/null @@ -1,101 +0,0 @@ ---X-セイバー ブルノ ---X-Saber Bruno ---Scripted by the Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Synchro Summon using only EARTH monsters, including this card - 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_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) or Duel.IsBattlePhase(1-tp) end) - e1:SetTarget(s.synchtg) - e1:SetOperation(s.synchop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) - --Banish 1 other EARTH monster to Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Saber" Spell/Trap Card from your Deck to your hand - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,2)) - e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_SUMMON_SUCCESS) - e3a:SetCountLimit(1,{id,1}) - e3a:SetTarget(s.thtg) - e3a:SetOperation(s.thop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3b) -end -s.listed_series={SET_X_SABER,SET_SABER} -s.listed_names={id} -function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),tp,LOCATION_MZONE,0,nil) - return c:IsAttribute(ATTRIBUTE_EARTH) and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.synchop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)) then return end - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,c,mg):GetFirst() - if sc then - Duel.SynchroSummon(tp,sc,c,mg) - end -end -function s.spcostfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) - and Duel.GetMZoneCount(tp,c)>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c,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,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_SABER) 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|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100447108.lua b/pre-release/c100447108.lua deleted file mode 100644 index 930bef545f..0000000000 --- a/pre-release/c100447108.lua +++ /dev/null @@ -1,113 +0,0 @@ ---総剣司令 ソウザ ---Commander Souza, Swordmaster ---Scripted by the Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ EARTH monsters - Synchro.AddProcedure(c,nil,1,1,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),1,99) - --Multiple Tuner check - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(s.valcheck) - c:RegisterEffect(e0) - --Gains 200 ATK for each banished monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return 200*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsMonster),0,LOCATION_REMOVED,LOCATION_REMOVED,nil) end) - c:RegisterEffect(e1) - --Draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdocon) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) - --Destroy 1 card your opponent controls - 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 ep==1-tp end) - e3:SetCost(s.descost) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) - --If this card would be destroyed by battle or card effect, you can banish 1 "Saber" card from your GY instead - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_MZONE) - e4:SetTarget(s.desreptg) - c:RegisterEffect(e4) -end -s.listed_series={SET_X_SABER,SET_SABER} -s.listed_names={id} -function s.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_MULTIPLE_TUNERS) - e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD)|RESET_PHASE|PHASE_END) - c: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 -function s.descostfilter(c,tp) - return c:IsSetCard(SET_X_SABER) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,c) -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) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -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,0,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end -function s.desrepfilter(c) - return c:IsSetCard(SET_SABER) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) -end -function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(s.desrepfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c) end - if Duel.SelectEffectYesNo(tp,c) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,s.desrepfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c) - return Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 - end - return false -end \ No newline at end of file diff --git a/pre-release/c100447109.lua b/pre-release/c100447109.lua deleted file mode 100644 index c5c1980f37..0000000000 --- a/pre-release/c100447109.lua +++ /dev/null @@ -1,104 +0,0 @@ ---X-セイバー ガトムズ ---X-Saber Gottoms ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ EARTH monsters - Synchro.AddProcedure(c,nil,1,1,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),1,99) - --Multiple Tuner check - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(s.valcheck) - c:RegisterEffect(e0) - --Add 1 "Saber" or "Gottoms" 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) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Discard 1 random card from your opponent's hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) - e2:SetTarget(s.discardtg) - e2:SetOperation(s.discardop) - c:RegisterEffect(e2) - --Special Summon this card, then change the attack target to it - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp) local bc=Duel.GetAttackTarget() return bc and bc:IsSetCard(SET_X_SABER) and bc:IsControler(tp) and bc:IsFaceup() end) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SABER,SET_GOTTOMS,SET_X_SABER} -function s.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_MULTIPLE_TUNERS) - e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD)|RESET_PHASE|PHASE_END) - c:RegisterEffect(e1) - end -end -function s.thfilter(c) - return c:IsSetCard({SET_SABER,SET_GOTTOMS}) 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.discardtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function s.discardop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if #g>0 then - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local ac=Duel.GetAttacker() - if ac:CanAttack() and not ac:IsImmuneToEffect(e) then - Duel.BreakEffect() - Duel.ChangeAttackTarget(c) - end - 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 2e678cdf22..0000000000 --- a/pre-release/c100449004.lua +++ /dev/null @@ -1,86 +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} -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/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 c6ab2718343dcfcdadb2864147acd8ba07696400 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 22 Nov 2025 13:20:19 +0200 Subject: [PATCH 2/2] Add files via upload --- official/c32289031.lua | 89 ++++++++++++++++++++++++++ official/c32467459.lua | 89 ++++++++++++++++++++++++++ official/c33302589.lua | 85 ++++++++++++++++++++++++ official/c34528176.lua | 79 +++++++++++++++++++++++ official/c34950192.lua | 96 ++++++++++++++++++++++++++++ official/c35240714.lua | 79 +++++++++++++++++++++++ official/c45462306.lua | 101 +++++++++++++++++++++++++++++ official/c60700283.lua | 84 ++++++++++++++++++++++++ official/c61345801.lua | 67 +++++++++++++++++++ official/c6195332.lua | 68 ++++++++++++++++++++ official/c69678646.lua | 77 ++++++++++++++++++++++ official/c70522875.lua | 78 ++++++++++++++++++++++ official/c71645463.lua | 87 +++++++++++++++++++++++++ official/c72867001.lua | 113 ++++++++++++++++++++++++++++++++ official/c7917970.lua | 97 ++++++++++++++++++++++++++++ official/c8039562.lua | 78 ++++++++++++++++++++++ official/c8252010.lua | 104 ++++++++++++++++++++++++++++++ official/c8852158.lua | 81 +++++++++++++++++++++++ official/c95072744.lua | 125 ++++++++++++++++++++++++++++++++++++ official/c9978697.lua | 90 ++++++++++++++++++++++++++ pre-release/c100295111.lua | 85 ++++++++++++++++++++++++ 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 | 86 +++++++++++++++++++++++++ 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/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 +++++++++++++++++++++++++++ 61 files changed, 5120 insertions(+) create mode 100644 official/c32289031.lua create mode 100644 official/c32467459.lua create mode 100644 official/c33302589.lua create mode 100644 official/c34528176.lua create mode 100644 official/c34950192.lua create mode 100644 official/c35240714.lua create mode 100644 official/c45462306.lua create mode 100644 official/c60700283.lua create mode 100644 official/c61345801.lua create mode 100644 official/c6195332.lua create mode 100644 official/c69678646.lua create mode 100644 official/c70522875.lua create mode 100644 official/c71645463.lua create mode 100644 official/c72867001.lua create mode 100644 official/c7917970.lua create mode 100644 official/c8039562.lua create mode 100644 official/c8252010.lua create mode 100644 official/c8852158.lua create mode 100644 official/c95072744.lua create mode 100644 official/c9978697.lua create mode 100644 pre-release/c100295111.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/c100448001.lua create mode 100644 pre-release/c100448002.lua create mode 100644 pre-release/c100448003.lua create mode 100644 pre-release/c100448004.lua create mode 100644 pre-release/c100448005.lua create mode 100644 pre-release/c100448006.lua create mode 100644 pre-release/c100449001.lua create mode 100644 pre-release/c100449002.lua create mode 100644 pre-release/c100449003.lua create mode 100644 pre-release/c100449004.lua create mode 100644 pre-release/c100449005.lua create mode 100644 pre-release/c100449101.lua create mode 100644 pre-release/c100450001.lua create mode 100644 pre-release/c100450002.lua create mode 100644 pre-release/c100450003.lua create mode 100644 pre-release/c100450004.lua create mode 100644 pre-release/c100450005.lua create mode 100644 pre-release/c100450006.lua create mode 100644 pre-release/c100450007.lua create mode 100644 pre-release/c100450008.lua create mode 100644 pre-release/c100450009.lua create mode 100644 pre-release/c100450010.lua create mode 100644 pre-release/c100450011.lua create mode 100644 pre-release/c100450012.lua create mode 100644 pre-release/c100450013.lua create mode 100644 pre-release/c100450014.lua create mode 100644 pre-release/c100450015.lua create mode 100644 pre-release/c100450016.lua create mode 100644 pre-release/c100450017.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/c32289031.lua b/official/c32289031.lua new file mode 100644 index 0000000000..2bbe0f4f10 --- /dev/null +++ b/official/c32289031.lua @@ -0,0 +1,89 @@ +--星騎士 セイクリッド・デルタテロス +--Tellarknight Constellar Delteros +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3+ Level 4 monsters + Xyz.AddProcedure(c,nil,4,3,nil,nil,Xyz.InfiniteMats) + --Your opponent cannot target Rank 5 or higher "tellarknight" or "Constellar" Xyz Monsters you control with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(s.tellarkR5filter) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --Add 1 "tellarknight" or "Constellar" monster from your Deck to your hand, then immediately after this effect resolves, you can Normal Summon 1 LIGHT monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(Cost.DetachFromSelf(1)) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Special Summon 1 "tellarknight" or "Constellar" monster from your hand or banishment + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +function s.tellarkR5filter(e,c) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsRankAbove(5) and c:IsFaceup() +end +function s.thfilter(c) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.nsfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSummonable(true,nil) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local 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.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.BreakEffect() + Duel.Summon(tp,sc,true,nil) + end + end + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_REMOVED) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c32467459.lua b/official/c32467459.lua new file mode 100644 index 0000000000..57752dcadd --- /dev/null +++ b/official/c32467459.lua @@ -0,0 +1,89 @@ +--エルシャドール・メシャフレール +--El Shaddoll Meshahrail +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Shaddoll" monster + 1 DARK monster + 1 EARTH monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter(ATTRIBUTE_DARK),s.matfilter(ATTRIBUTE_EARTH)) + c:AddMustBeFusionSummoned() + --Unaffected by your opponent's activated Spell/Trap effects and by activated effects from opponent's monsters whose original Level/Rank is lower than this card's current Level + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(s.immval) + c:RegisterEffect(e1) + --Add 1 "Shaddoll" card or "Void" Spell/Trap from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(Cost.PayLP(800)) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Special Summon 1 "Shaddoll" monster from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SHADDOLL,SET_VOID} +s.material_setcode=SET_SHADDOLL +function s.matfilter(attribute) + return function(c,fc,sumtype,tp) + return c:IsAttribute(attribute,fc,sumtype,tp) or c:IsHasEffect(4904633) + end +end +function s.immval(e,te) + if not (te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated()) then return false end + if te:IsSpellTrapEffect() then return true end + local tc=te:GetHandler() + local lv=e:GetHandler():GetLevel() + if tc:HasLevel() then + return tc:GetOriginalLevel()0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SHADDOLL) 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/official/c33302589.lua b/official/c33302589.lua new file mode 100644 index 0000000000..11fcdc6d91 --- /dev/null +++ b/official/c33302589.lua @@ -0,0 +1,85 @@ +--セイクリッド・カストル +--Constellar Castor +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Constellar" monster from your Deck + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.sptg) + e1a:SetOperation(s.spop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1c) + --A "Constellar" Xyz Monster that has this card as material gains this effect: Negate a Spell or effect activated by the opponent, and if you do, destroy that card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.discon) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CONSTELLAR} +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + --Excluding itself for a proper interaction with "Tellarknight Constellar Caduceus" [58858807] + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK 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|ATTRIBUTE_LIGHT) 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|ATTRIBUTE_LIGHT) end) + --Special Summon 1 "Constellar" monster from your Deck + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsSetCard(SET_CONSTELLAR) and rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) 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.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT)==2 and Duel.NegateEffect(ev) + and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c34528176.lua b/official/c34528176.lua new file mode 100644 index 0000000000..20fd810c77 --- /dev/null +++ b/official/c34528176.lua @@ -0,0 +1,79 @@ +--ドラグニティナイト-アーレウス +--Dragunity Knight - Areus +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Synchro Monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsType,TYPE_SYNCHRO),1,99) + --Negate the effects of face-up cards your opponent controls, up to the number of face-up Monster Cards in your Spell & Trap Zone, until the end of this turn + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DISABLE) + e1a:SetType(EFFECT_TYPE_IGNITION) + e1a:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCountLimit(1,id) + e1a:SetCondition(function(e) return not e:GetHandler():HasEquipCard() end) + e1a:SetTarget(s.distg) + e1a:SetOperation(s.disop) + c:RegisterEffect(e1a) + --This is a Quick Effect if this card is equipped with an Equip Card + local e1b=e1a:Clone() + e1b:SetType(EFFECT_TYPE_QUICK_O) + e1b:SetCode(EVENT_FREE_CHAIN) + e1b:SetCondition(function(e) return e:GetHandler():HasEquipCard() end) + e1b:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1b) + --Special Summon this card, then you can Special Summon 1 "Dragunity" Tuner from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGUNITY} +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsNegatable() end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsMonsterCard),tp,LOCATION_STZONE,0,nil) + if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + for tc in tg:Iter() do + --Negate their effects until the end of this turn + tc:NegateEffects(c,RESETS_STANDARD_PHASE_END,true) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DRAGUNITY) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c34950192.lua b/official/c34950192.lua new file mode 100644 index 0000000000..4a3bde80bb --- /dev/null +++ b/official/c34950192.lua @@ -0,0 +1,96 @@ +--凍てし心が映す神影 +--Lev Shaddoll Fusion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: Send 1 Fusion Monster from your Extra Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.effcost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Special Summon 1 "Shaddoll" Fusion Monster with a different Attribute from your Extra Deck (this is treated as a Fusion Summon), but change its ATK to 0 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(s.spcost,s.effcost)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_SHADDOLL) end) +end +s.listed_series={SET_SHADDOLL} +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 from the Extra Deck the turn you activate either of this card's effects, except "Shaddoll" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_SHADDOLL) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.tgfilter(c) + return c:IsFusionMonster() and c:IsAbleToGrave() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.spcostfilter(c,e,tp) + return c:IsFusionMonster() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetAttribute(),c) +end +function s.spfilter(c,e,tp,attr,cost_c) + return c:IsSetCard(SET_SHADDOLL) and c:IsFusionMonster() and c:IsAttributeExcept(attr) + and c:CheckFusionMaterial() and Duel.GetLocationCountFromEx(tp,tp,cost_c,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) end + local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst() + e:SetLabel(sc:GetAttribute()) + Duel.Release(sc,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetParam(e:GetLabel()) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local attr=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,attr):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummonStep(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) then + --Change its ATK to 0 + local e1=Effect.CreateEffect(e:GetHandler()) + 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) + sc:RegisterEffect(e1) + end + if Duel.SpecialSummonComplete()>0 then + sc:CompleteProcedure() + end +end \ No newline at end of file diff --git a/official/c35240714.lua b/official/c35240714.lua new file mode 100644 index 0000000000..cd3a106974 --- /dev/null +++ b/official/c35240714.lua @@ -0,0 +1,79 @@ +--セイバー・コンビネーション +--Saber Combination +--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) + --While you have 10 or more "X-Saber" monsters in your field, GY, and/or banishment, "X-Saber" monsters you control gain ATK equal to their own original DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetCondition(s.atkcon) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_X_SABER) end) + e1:SetValue(function(e,c) return c:GetBaseDefense() end) + c:RegisterEffect(e1) + --Special Summon 1 "X-Saber" monster from your hand or Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(s.handdeckspcon) + e2:SetTarget(s.sptg(LOCATION_HAND|LOCATION_DECK)) + e2:SetOperation(s.spop(LOCATION_HAND|LOCATION_DECK)) + c:RegisterEffect(e2) + --Special Summon 1 "X-Saber" monster from your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetRange(LOCATION_SZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + e3:SetTarget(s.sptg(LOCATION_HAND)) + e3:SetOperation(s.spop(LOCATION_HAND)) + c:RegisterEffect(e3) +end +s.listed_series={SET_X_SABER} +function s.atkfilter(c) + return c:IsSetCard(SET_X_SABER) and c:IsMonster() and c:IsFaceup() +end +function s.atkcon(e) + return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED,0,10,nil) +end +function s.handdeckspconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsSetCard(SET_X_SABER) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.handdeckspcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.handdeckspconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_X_SABER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(location) + return function(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,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,location) + end +end +function s.spop(location) + return function(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,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/c45462306.lua b/official/c45462306.lua new file mode 100644 index 0000000000..591e2bd607 --- /dev/null +++ b/official/c45462306.lua @@ -0,0 +1,101 @@ +--X-セイバー ブルノ +--X-Saber Bruno +--Scripted by the Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Synchro Summon using only EARTH monsters, including this card + 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_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) or Duel.IsBattlePhase(1-tp) end) + e1:SetTarget(s.synchtg) + e1:SetOperation(s.synchop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) + --Banish 1 other EARTH monster to Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Saber" Spell/Trap Card from your Deck to your hand + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,2)) + e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetCountLimit(1,{id,1}) + e3a:SetTarget(s.thtg) + e3a:SetOperation(s.thop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) +end +s.listed_series={SET_X_SABER,SET_SABER} +s.listed_names={id} +function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),tp,LOCATION_MZONE,0,nil) + return c:IsAttribute(ATTRIBUTE_EARTH) and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c,mg) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.synchop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)) then return end + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),tp,LOCATION_MZONE,0,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,c,mg):GetFirst() + if sc then + Duel.SynchroSummon(tp,sc,c,mg) + end +end +function s.spcostfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + and Duel.GetMZoneCount(tp,c)>0 +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c,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,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_SABER) 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|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c60700283.lua b/official/c60700283.lua new file mode 100644 index 0000000000..dfec98f201 --- /dev/null +++ b/official/c60700283.lua @@ -0,0 +1,84 @@ +--星騎士 キュグニ +--Tellarknight Cygnian +--Scripted by ahtelel +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "tellarknight" or "Constellar" monster from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1c) + --Increase this card and another LIGHT monster's Level by 1 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) + --Can be treated as 2 Materials for the Xyz Summon of a "tellarknight" Xyz monster that requires 3 or more materials + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_DOUBLE_XYZ_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetValue(1) + e3:SetOperation(function(e,c) return c.minxyzct and c.minxyzct>=3 and c:IsSetCard(SET_TELLARKNIGHT) end) + c:RegisterEffect(e3) +end +s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +function s.thfilter(c) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.lvfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc~=c and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,c) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() then + --Increase both their Level by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + local e2=e1:Clone() + tc:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/official/c61345801.lua b/official/c61345801.lua new file mode 100644 index 0000000000..9687b03bb8 --- /dev/null +++ b/official/c61345801.lua @@ -0,0 +1,67 @@ +--煉獄の乖放 +--Void Liberation +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 2 "Shaddoll" cards from your Deck to your hand of different types (Monster, Spell, or Trap) from the revealed card and each other, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.Reveal(s.revealfilter,true,1,1,function(e,tp,g) e:SetLabel(g:GetFirst():GetMainCardType()) end)) + e1:SetTarget(s.shaddollthtg) + e1:SetOperation(s.shaddollthop) + c:RegisterEffect(e1) + --Add 1 "Infernoid" monster from your Deck or GY your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.infernoidthtg) + e2:SetOperation(s.infernoidthop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SHADDOLL,SET_INFERNOID} +function s.revealfilter(c,e,tp) + return c:IsSetCard(SET_SHADDOLL) and not c:IsPublic() + and Duel.GetMatchingGroup(s.shaddollthfilter,tp,LOCATION_DECK,0,nil,c:GetMainCardType()):GetClassCount(Card.GetMainCardType)==2 +end +function s.shaddollthfilter(c,main_type) + return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToHand() and not c:IsType(main_type) +end +function s.shaddollthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.shaddollthop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.shaddollthfilter,tp,LOCATION_DECK,0,nil,e:GetLabel()) + if #g<2 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetMainCardType),1,tp,HINTMSG_ATOHAND) + if #sg==2 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.infernoidthfilter(c) + return c:IsSetCard(SET_INFERNOID) and c:IsMonster() and c:IsAbleToHand() +end +function s.infernoidthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.infernoidthfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.infernoidthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.infernoidthfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c6195332.lua b/official/c6195332.lua new file mode 100644 index 0000000000..17783f1598 --- /dev/null +++ b/official/c6195332.lua @@ -0,0 +1,68 @@ +--超神星輝士 セイクリッド・トレミスΩ7 +--Exstellarknight Constellar Ptolemy Ω7 +--Scripted by ahtelel +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 7 monsters OR 1 "tellarknight" or "Constellar" Xyz Monster you control + Xyz.AddProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) + --While you have 7 or more "tellarknight" monsters with different names in your GY and/or banishment, this card gains 2700 ATK/DEF, also it is unaffected by your opponent's activated effects + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCondition(s.atkdefimmcon) + e1a:SetValue(2700) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EFFECT_IMMUNE_EFFECT) + e1c:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) + c:RegisterEffect(e1c) + --Shuffle opponent's monsters into the deck based on the number of materials you detach from this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetTargetCount(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil) end,function(e,og) e:SetLabel(#og) end)) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +s.listed_names={id} +function s.ovfilter(c,tp,xyzc) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR},xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return Duel.IsMainPhase2(tp) and not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.atkdefimmfilter(c) + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and c:IsFaceup() +end +function s.atkdefimmcon(e,c) + return Duel.GetMatchingGroup(s.atkdefimmfilter,e:GetHandlerPlayer(),LOCATION_GRAVE|LOCATION_REMOVED,0,nil):GetClassCount(Card.GetCode)>=7 +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end + local ct=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,ct,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c69678646.lua b/official/c69678646.lua new file mode 100644 index 0000000000..656ec831d0 --- /dev/null +++ b/official/c69678646.lua @@ -0,0 +1,77 @@ +--神星なる繋束 +--Stellarnova Bonds +--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) + c:RegisterEffect(e1) +end +s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +function s.spfilter(c,e,tp) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,c:GetRace()),tp,LOCATION_MZONE,0,1,nil) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,{SET_TELLARKNIGHT,SET_CONSTELLAR}),tp,LOCATION_MZONE,0,nil) + local b2=ct>0 and Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) + e:SetProperty(0) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_DISABLE) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,tp,0) + 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 + --Discard 1 card, and if you do, Special Summon 1 "tellarknight" or "Constellar" monster from your Deck with a different Type from the monsters you control + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + elseif op==2 then + --Negate the effects of face-up monsters your opponent controls, up to the number of "tellarknight" and "Constellar" monsters you control + local tg=Duel.GetTargetCards(e):Match(Card.IsMonster,nil) + if #tg>0 then + for tc in tg:Iter() do + --Negate their effects until the end of this turn + tc:NegateEffects(c,RESET_PHASE|PHASE_END) + end + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,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:IsXyzMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c70522875.lua b/official/c70522875.lua new file mode 100644 index 0000000000..eae2f39b0f --- /dev/null +++ b/official/c70522875.lua @@ -0,0 +1,78 @@ +--ドラグニティロード-ゲオルギアス +--Dragunity Lord - Georgius +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters, including a Tuner + Link.AddProcedure(c,nil,2,4,s.tunermatcheck) + --Your opponent cannot activate the effects of monsters in the GY while this card is equipped with a "Dragunity" card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,1) + e1:SetCondition(function(e) return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_DRAGUNITY) end) + e1:SetValue(function(e,re,tp) return re:IsMonsterEffect() and re:GetHandler():IsLocation(LOCATION_GRAVE) end) + c:RegisterEffect(e1) + --Special Summon 1 Level 5 or higher "Dragunity" monster from your Extra Deck or GY + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SPSUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + 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:SetRange(LOCATION_MZONE) + e2b:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + c:RegisterEffect(e2b) + --Negate an opponent's activated Spell/Trap Card or effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_QUICK_O) + 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 ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end) + e3:SetCost(s.discost) + e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) end) + e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) + c:RegisterEffect(e3) + aux.DoubleSnareValidity(c,LOCATION_MZONE) +end +s.listed_series={SET_DRAGUNITY} +function s.tunermatcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsType,1,nil,TYPE_TUNER,lc,sumtype,tp) +end +function s.spfilter(c,e,tp,mmz_chk) + if not (c:IsLevelAbove(5) and c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + else + return mmz_chk + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) 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,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsEquipCard,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEquipCard,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end \ No newline at end of file diff --git a/official/c71645463.lua b/official/c71645463.lua new file mode 100644 index 0000000000..b220ef59ec --- /dev/null +++ b/official/c71645463.lua @@ -0,0 +1,87 @@ +--ドラグニティ-クイリヌス +--Dragunity Quirinus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Your "Dragunity" monsters cannot be destroyed by battle while this card is equipped with an Equip Card + 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:SetCondition(function(e) return e:GetHandler():HasEquipCard() end) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_DRAGUNITY) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Add 1 "Dragunity" Spell/Trap from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + 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) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Return 1 "Dragunity" Monster Card you control to the hand/Extra Deck, then you can Special Summon 1 "Dragunity" monster from your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thsptg) + e3:SetOperation(s.thspop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DRAGUNITY} +function s.thfilter(c) + return c:IsSetCard(SET_DRAGUNITY) 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.thorextfilter(c) + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonsterCard() and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra()) +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thorextfilter(chkc) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.thorextfilter,tp,LOCATION_ONFIELD,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.thorextfilter,tp,LOCATION_ONFIELD,0,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) then + if tc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end + if 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,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end \ No newline at end of file diff --git a/official/c72867001.lua b/official/c72867001.lua new file mode 100644 index 0000000000..930bef545f --- /dev/null +++ b/official/c72867001.lua @@ -0,0 +1,113 @@ +--総剣司令 ソウザ +--Commander Souza, Swordmaster +--Scripted by the Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ EARTH monsters + Synchro.AddProcedure(c,nil,1,1,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),1,99) + --Multiple Tuner check + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --Gains 200 ATK for each banished monster + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return 200*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsMonster),0,LOCATION_REMOVED,LOCATION_REMOVED,nil) end) + c:RegisterEffect(e1) + --Draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCondition(aux.bdocon) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) + --Destroy 1 card your opponent controls + 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 ep==1-tp end) + e3:SetCost(s.descost) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) + --If this card would be destroyed by battle or card effect, you can banish 1 "Saber" card from your GY instead + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetCode(EFFECT_DESTROY_REPLACE) + e4:SetRange(LOCATION_MZONE) + e4:SetTarget(s.desreptg) + c:RegisterEffect(e4) +end +s.listed_series={SET_X_SABER,SET_SABER} +s.listed_names={id} +function s.valcheck(e,c) + local g=c:GetMaterial() + if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_MULTIPLE_TUNERS) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD)|RESET_PHASE|PHASE_END) + c: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 +function s.descostfilter(c,tp) + return c:IsSetCard(SET_X_SABER) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,c) +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) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +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,0,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end +end +function s.desrepfilter(c) + return c:IsSetCard(SET_SABER) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) +end +function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsReason(REASON_REPLACE) + and Duel.IsExistingMatchingCard(s.desrepfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c) end + if Duel.SelectEffectYesNo(tp,c) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) + local g=Duel.SelectMatchingCard(tp,s.desrepfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c) + return Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 + end + return false +end \ No newline at end of file diff --git a/official/c7917970.lua b/official/c7917970.lua new file mode 100644 index 0000000000..610af9062f --- /dev/null +++ b/official/c7917970.lua @@ -0,0 +1,97 @@ +--神風のドラグニティ +--Dragunity Divine Wind +--scripted by pyrQ +local s,id=GetID() +local CARD_DRAGON_RAVINE=62265044 +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Apply 1 of these effects, or if "Dragon Ravine" is in your GY, you can apply any of them, in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_DRAGON_RAVINE} +s.listed_series={SET_DRAGUNITY} +function s.thfilter(c) + return c:IsRace(RACE_DRAGON|RACE_WINGEDBEAST) and c:IsAbleToHand() +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) + local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + return b1 or b2 + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) +end +function s.eqfilter(c,tp) + return c:IsRace(RACE_DRAGON) and c:IsSetCard(SET_DRAGUNITY) and c:CheckUniqueOnField(tp) and not c:IsForbidden() +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local b1=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) + local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + local ravine_chk=Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_DRAGON_RAVINE) + local op=nil + if not ravine_chk then + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + end + local breakeffect=false + if (op and op==1) or (ravine_chk and b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(id,3)))) then + --Add 1 Dragon or Winged Beast monster from your GY to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ShuffleHand(tp) + b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + end + breakeffect=true + end + if (op and op==2) or (ravine_chk and b2 and (not breakeffect or Duel.SelectYesNo(tp,aux.Stringid(id,4)))) then + --Special Summon 1 "Dragunity" monster from your hand, then you can equip 1 Dragon "Dragunity" monster from your Deck to it as an Equip Spell + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + if sc then + if breakeffect then Duel.BreakEffect() end + if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,5)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if not ec then return end + Duel.BreakEffect() + if Duel.Equip(tp,ec,sc) then + --Equip limit + local e0=Effect.CreateEffect(e:GetHandler()) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(function(e,c) return c==sc end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) + ec:RegisterEffect(e0) + end + end + end + end +end \ No newline at end of file diff --git a/official/c8039562.lua b/official/c8039562.lua new file mode 100644 index 0000000000..39602b3ee3 --- /dev/null +++ b/official/c8039562.lua @@ -0,0 +1,78 @@ +--ドラグニティ-ファルシオン +--Dragunity Falchion +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Equip 1 Dragon "Dragunity" monster from your Deck or GY to 1 "Dragunity" monster you control as an Equip Spell + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfBanish) + e1:SetTarget(s.eqtg) + e1:SetOperation(s.eqop) + c:RegisterEffect(e1) + --Banish 1 face-up card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.rmcon) + e2:SetCost(Cost.SelfToGrave) + e2:SetTarget(s.rmtg) + e2:SetOperation(s.rmop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGUNITY} +function s.eqfilter(c,tp) + return c:IsRace(RACE_DRAGON) and c:IsSetCard(SET_DRAGUNITY) and c:CheckUniqueOnField(tp) and not c:IsForbidden() +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_DRAGUNITY) and chkc:IsFaceup() end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + local tc=Duel.GetFirstTarget() + if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + if ec and Duel.Equip(tp,ec,tc) then + --Equip limit + local e1=Effect.CreateEffect(ec) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + ec:RegisterEffect(e1) + end +end +function s.rmcon(e,tp,eg,ep,ev,re,r,rp) + local ec=e:GetHandler():GetEquipTarget() + return ec and ec:IsSetCard(SET_DRAGUNITY) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c8252010.lua b/official/c8252010.lua new file mode 100644 index 0000000000..c5c1980f37 --- /dev/null +++ b/official/c8252010.lua @@ -0,0 +1,104 @@ +--X-セイバー ガトムズ +--X-Saber Gottoms +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ EARTH monsters + Synchro.AddProcedure(c,nil,1,1,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),1,99) + --Multiple Tuner check + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --Add 1 "Saber" or "Gottoms" 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) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Discard 1 random card from your opponent's hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_HANDES) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e2:SetTarget(s.discardtg) + e2:SetOperation(s.discardop) + c:RegisterEffect(e2) + --Special Summon this card, then change the attack target to it + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp) local bc=Duel.GetAttackTarget() return bc and bc:IsSetCard(SET_X_SABER) and bc:IsControler(tp) and bc:IsFaceup() end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SABER,SET_GOTTOMS,SET_X_SABER} +function s.valcheck(e,c) + local g=c:GetMaterial() + if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_MULTIPLE_TUNERS) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD)|RESET_PHASE|PHASE_END) + c:RegisterEffect(e1) + end +end +function s.thfilter(c) + return c:IsSetCard({SET_SABER,SET_GOTTOMS}) 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.discardtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) +end +function s.discardop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) + if #g>0 then + local sg=g:RandomSelect(1-tp,1) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local ac=Duel.GetAttacker() + if ac:CanAttack() and not ac:IsImmuneToEffect(e) then + Duel.BreakEffect() + Duel.ChangeAttackTarget(c) + end + end +end \ No newline at end of file diff --git a/official/c8852158.lua b/official/c8852158.lua new file mode 100644 index 0000000000..287a6e3973 --- /dev/null +++ b/official/c8852158.lua @@ -0,0 +1,81 @@ +--影霊翼騎 ウェンディクルフ +--Reeshaddoll Wendikurhu +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustFirstBeFusionSummoned() + --Fusion Materials: 1 "Shaddoll" monster + 1 WIND monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) + --Change any number of face-down monsters on the field to face-up Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Add 1 "Shaddoll" card from your GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SHADDOLL} +s.material_setcode=SET_SHADDOLL +function s.matfilter(c,lc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_WIND,lc,sumtype,tp) or c:IsHasEffect(4904633) +end +function s.posfilter(c) + return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition() +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp,chk) + local facedown_ct=Duel.GetMatchingGroupCount(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if facedown_ct==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,facedown_ct,nil) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)==0 then return end + local og=Duel.GetOperatedGroup() + local flip_count=og:FilterCount(Card.IsType,nil,TYPE_FLIP) + if flip_count>0 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,og) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local pos_g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,flip_count,og) + if #pos_g>0 then + Duel.HintSelection(pos_g) + Duel.BreakEffect() + Duel.ChangePosition(pos_g,POS_FACEDOWN_DEFENSE) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c95072744.lua b/official/c95072744.lua new file mode 100644 index 0000000000..754a393fa1 --- /dev/null +++ b/official/c95072744.lua @@ -0,0 +1,125 @@ +--影雄の烬 エグリスタ +--Tohushaddoll Grysta +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Apply the effect of 1 non-Rock "Shaddoll" monster in your GY that activates when it is flipped face-up + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCountLimit(1,id) + e1:SetTarget(s.applytg) + e1:SetOperation(s.applyop) + c:RegisterEffect(e1) + --Fusion Summon 1 "Shaddoll" Fusion Monster from your Extra Deck, by banishing its materials from your hand, field, and/or GY + local fusion_params={ + fusfilter=function(c) return c:IsSetCard(SET_SHADDOLL) end, + matfilter=Card.IsAbleToRemove, + extrafil=s.fextra, + extraop=Fusion.BanishMaterial, + extratg=s.extratg} + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) and not Duel.IsPhase(PHASE_DAMAGE) end) + e2:SetCost(s.fusioncost) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_SHADDOLL) end) +end +s.listed_series={SET_SHADDOLL} +function s.applyfilter(c,e,tp) + if c:IsCode(id) then return false end + if not (not c:IsRace(RACE_ROCK) and c:IsSetCard(SET_SHADDOLL) and c:IsMonster()) then return false end + local effs={c:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetType()&EFFECT_TYPE_FLIP>0 or eff:GetCode()==EVENT_FLIP then + local tg=eff:GetTarget() + if tg==nil or tg(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0) then + return true + end + end + end + return false +end +function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local available_effs={} + local effs={tc:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetType()&EFFECT_TYPE_FLIP>0 or eff:GetCode()==EVENT_FLIP then + local tg=eff:GetTarget() + if tg==nil or tg(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0) then + table.insert(available_effs,eff) + end + end + end + local eff=nil + if #available_effs>1 then + local available_effs_desc={} + for _,eff in ipairs(available_effs) do + table.insert(available_effs_desc,eff:GetDescription()) + end + local op=Duel.SelectOption(tp,table.unpack(available_effs_desc)) + eff=available_effs[op+1] + else + eff=available_effs[1] + end + Duel.Hint(HINT_OPSELECTED,1-tp,eff:GetDescription()) + Duel.ClearTargetCard() + tc:CreateEffectRelation(e) + e:SetLabel(eff:GetLabel()) + e:SetLabelObject(eff:GetLabelObject()) + local tg=eff:GetTarget() + if tg then + tg(e,tp,eg,ep,ev,re,r,rp,1) + eff:SetLabel(e:GetLabel()) + eff:SetLabelObject(e:GetLabelObject()) + end + e:SetLabelObject(eff) + Duel.ClearOperationInfo(0) +end +function s.applyop(e,tp,eg,ep,ev,re,r,rp) + local eff=e:GetLabelObject() + if not (eff and eff:GetHandler():IsRelateToEffect(e)) then return end + e:SetLabel(eff:GetLabel()) + e:SetLabelObject(eff:GetLabelObject()) + local op=eff:GetOperation() + if op then + op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) + end + e:SetLabel(0) + e:SetLabelObject(nil) +end +function s.fusioncost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon from the Extra Deck the turn you activate this effect, except "Shaddoll" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_SHADDOLL) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.fextra(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) +end diff --git a/official/c9978697.lua b/official/c9978697.lua new file mode 100644 index 0000000000..b5277b550f --- /dev/null +++ b/official/c9978697.lua @@ -0,0 +1,90 @@ +--X-セイバー ペリナ +--X-Saber Perina +--Scripted by the Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 2 "X-Saber" monsters from your Deck, except "X-Saber Perina", but destroy them during the End Phase + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetCost(Cost.SelfToGrave) + e1a:SetTarget(s.sptg) + e1a:SetOperation(s.spop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Apply an effect to the "X-Saber" Synchro Monster that used this card as material + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_BE_MATERIAL) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.effcon) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_X_SABER} +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_X_SABER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetMZoneCount(tp,e:GetHandler())>=2 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,2,tp,LOCATION_MZONE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,2,2,nil,e,tp) + if #g==2 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then + --Destroy them during the End Phase + aux.DelayedOperation(g,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2)) + end +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + if not (r==REASON_SYNCHRO and (Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and not Duel.IsEndStep()))) then return false end + local c=e:GetHandler() + local sync=c:GetReasonCard() + if not (c:IsLocation(LOCATION_GRAVE) and sync:IsSetCard(SET_X_SABER)) then return false end + e:SetLabelObject(sync) + sync:RegisterFlagEffect(id,RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET),0,1) + return true +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local sync=e:GetLabelObject() + if chk==0 then + return sync:HasFlagEffect(id) and not (sync:IsHasEffect(EFFECT_EXTRA_ATTACK) and sync:IsHasEffect(EFFECT_DIRECT_ATTACK)) + end + sync:CreateEffectRelation(e) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local sync=e:GetLabelObject() + if not sync:IsRelateToEffect(e) then return end + local b1=not sync:IsHasEffect(EFFECT_EXTRA_ATTACK) + local b2=not sync:IsHasEffect(EFFECT_DIRECT_ATTACK) + if not (b1 or b2) then return end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + local desc=op==1 and 3201 or 3205 + local eff_code=op==1 and EFFECT_EXTRA_ATTACK or EFFECT_DIRECT_ATTACK + --It can make a second attack during each Battle Phase OR it can attack directly + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(desc) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(eff_code) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sync:RegisterEffect(e1) +end \ No newline at end of file diff --git a/pre-release/c100295111.lua b/pre-release/c100295111.lua new file mode 100644 index 0000000000..02734e55ef --- /dev/null +++ b/pre-release/c100295111.lua @@ -0,0 +1,85 @@ +--魔弾の悪魔 カスパール +--Magical Musket Mastermind Caspar +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters, including a LIGHT Fiend monster + Link.AddProcedure(c,nil,2,2,s.matcheck) + --Take 2 "Magical Musket" cards from your hand and/or Deck, including a monster, Special Summon 1 of those monsters, and Set the other card to your opponent's field + 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.spsettg) + e1:SetOperation(s.spsetop) + c:RegisterEffect(e1) + --During either player's turn, you can activate "Magical Musket" Spell/Trap Cards from your hand. + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetCode(EFFECT_QP_ACT_IN_NTPHAND) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTargetRange(LOCATION_HAND,0) + e2a:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MAGICAL_MUSKET)) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_TRAP_ACT_IN_HAND) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MAGICAL_MUSKET} +function s.matfilter(c,lc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT,lc,sumtype,tp) and c:IsRace(RACE_FIEND,lc,sumtype,tp) +end +function s.matcheck(g,lc,sumtype,tp) + return g:IsExists(s.matfilter,1,nil,lc,sumtype,tp) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(s.spfilter,1,nil,e,tp,sg) +end +function s.spfilter(c,e,tp,sg) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and sg:IsExists(s.setfilter,1,c,e,tp,1-tp) +end +function s.setfilter(c,e,tp,opp) + return (Duel.GetMZoneCount(opp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,opp)) or c:IsSSetable(false,opp) +end +function s.spsettg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + if Duel.GetMZoneCount(tp)<=0 then return false end + local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND|LOCATION_DECK,0,nil,SET_MAGICAL_MUSKET) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spsetop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetMZoneCount(tp)<=0 then return end + local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND|LOCATION_DECK,0,nil,SET_MAGICAL_MUSKET) + if #g<2 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,1)) + if #sg~=2 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local spg=sg:FilterSelect(tp,s.spfilter,1,1,nil,e,tp,sg) + if #spg>0 and Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)>0 then + local opp=1-tp + local setc=(sg-spg):GetFirst() + local b1=Duel.GetMZoneCount(opp)>0 and setc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,opp) + local b2=setc:IsSSetable(false,opp) + local op=nil + if b1 and b2 then + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + else + op=b1 and 1 or 2 + end + if op==1 then + Duel.SpecialSummon(setc,0,tp,opp,false,false,POS_FACEDOWN_DEFENSE) + Duel.ConfirmCards(tp,setc) + elseif op==2 then + Duel.SSet(tp,setc,opp) + end + 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..a057f40d39 --- /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,100200282),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={100200282,28553439} --"Regulus, the Prince of Endymion", "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 \ No newline at end of file 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/c100448001.lua b/pre-release/c100448001.lua new file mode 100644 index 0000000000..8cd12d7eb3 --- /dev/null +++ b/pre-release/c100448001.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/pre-release/c100448002.lua b/pre-release/c100448002.lua new file mode 100644 index 0000000000..66c84ec3e3 --- /dev/null +++ b/pre-release/c100448002.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/pre-release/c100448003.lua b/pre-release/c100448003.lua new file mode 100644 index 0000000000..d21bf1bbaa --- /dev/null +++ b/pre-release/c100448003.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/pre-release/c100448004.lua b/pre-release/c100448004.lua new file mode 100644 index 0000000000..d47320b750 --- /dev/null +++ b/pre-release/c100448004.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/pre-release/c100448005.lua b/pre-release/c100448005.lua new file mode 100644 index 0000000000..7da9bc3437 --- /dev/null +++ b/pre-release/c100448005.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/pre-release/c100448006.lua b/pre-release/c100448006.lua new file mode 100644 index 0000000000..c2a6f5e7cd --- /dev/null +++ b/pre-release/c100448006.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/pre-release/c100449001.lua b/pre-release/c100449001.lua new file mode 100644 index 0000000000..5215734582 --- /dev/null +++ b/pre-release/c100449001.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+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 new file mode 100644 index 0000000000..91f28555b9 --- /dev/null +++ b/pre-release/c100449002.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/pre-release/c100449003.lua b/pre-release/c100449003.lua new file mode 100644 index 0000000000..588e63d43d --- /dev/null +++ b/pre-release/c100449003.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/pre-release/c100449004.lua b/pre-release/c100449004.lua new file mode 100644 index 0000000000..2e678cdf22 --- /dev/null +++ b/pre-release/c100449004.lua @@ -0,0 +1,86 @@ +--先手必掌 +--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} +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 new file mode 100644 index 0000000000..22a5d6fce4 --- /dev/null +++ b/pre-release/c100449005.lua @@ -0,0 +1,128 @@ +--海老須神鮮まつり +--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 new file mode 100644 index 0000000000..7a3f5f5d39 --- /dev/null +++ b/pre-release/c100449101.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/pre-release/c100450001.lua b/pre-release/c100450001.lua new file mode 100644 index 0000000000..b1e32162de --- /dev/null +++ b/pre-release/c100450001.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/pre-release/c100450002.lua b/pre-release/c100450002.lua new file mode 100644 index 0000000000..cb85936edf --- /dev/null +++ b/pre-release/c100450002.lua @@ -0,0 +1,87 @@ +--武装転生 +--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 new file mode 100644 index 0000000000..2ddfb09739 --- /dev/null +++ b/pre-release/c100450003.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={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 new file mode 100644 index 0000000000..af7230eb11 --- /dev/null +++ b/pre-release/c100450004.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/pre-release/c100450005.lua b/pre-release/c100450005.lua new file mode 100644 index 0000000000..62f560e8d4 --- /dev/null +++ b/pre-release/c100450005.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/pre-release/c100450006.lua b/pre-release/c100450006.lua new file mode 100644 index 0000000000..e975a5c441 --- /dev/null +++ b/pre-release/c100450006.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/pre-release/c100450007.lua b/pre-release/c100450007.lua new file mode 100644 index 0000000000..4c00524a8e --- /dev/null +++ b/pre-release/c100450007.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/pre-release/c100450008.lua b/pre-release/c100450008.lua new file mode 100644 index 0000000000..1cf0b70279 --- /dev/null +++ b/pre-release/c100450008.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/pre-release/c100450009.lua b/pre-release/c100450009.lua new file mode 100644 index 0000000000..f456fab3a5 --- /dev/null +++ b/pre-release/c100450009.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/pre-release/c100450010.lua b/pre-release/c100450010.lua new file mode 100644 index 0000000000..12edde4e96 --- /dev/null +++ b/pre-release/c100450010.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/pre-release/c100450011.lua b/pre-release/c100450011.lua new file mode 100644 index 0000000000..0fefdbca6e --- /dev/null +++ b/pre-release/c100450011.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/pre-release/c100450012.lua b/pre-release/c100450012.lua new file mode 100644 index 0000000000..6207bfc072 --- /dev/null +++ b/pre-release/c100450012.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/pre-release/c100450013.lua b/pre-release/c100450013.lua new file mode 100644 index 0000000000..ba390b3b18 --- /dev/null +++ b/pre-release/c100450013.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/pre-release/c100450014.lua b/pre-release/c100450014.lua new file mode 100644 index 0000000000..07cd32b42a --- /dev/null +++ b/pre-release/c100450014.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/pre-release/c100450015.lua b/pre-release/c100450015.lua new file mode 100644 index 0000000000..283d61c849 --- /dev/null +++ b/pre-release/c100450015.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/pre-release/c100450016.lua b/pre-release/c100450016.lua new file mode 100644 index 0000000000..da85699c15 --- /dev/null +++ b/pre-release/c100450016.lua @@ -0,0 +1,98 @@ +--サプライズ・フュージョン +--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 new file mode 100644 index 0000000000..375d1776dc --- /dev/null +++ b/pre-release/c100450017.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/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