From d9b32efc0f059651d81d109502965f0622cc427b Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 6 Sep 2026 04:50:20 -0300 Subject: [PATCH 1/3] batch1 --- official/c11637481.lua | 43 ++++++++++-------------- official/c2563463.lua | 12 +++---- official/c25857977.lua | 75 ++++++++++++++++++++---------------------- official/c57043986.lua | 23 ++++++------- official/c91349449.lua | 24 +++++++------- official/c91712985.lua | 32 ++++++++---------- 6 files changed, 96 insertions(+), 113 deletions(-) diff --git a/official/c11637481.lua b/official/c11637481.lua index 6a2e0ad714..7422d1deee 100644 --- a/official/c11637481.lua +++ b/official/c11637481.lua @@ -3,7 +3,7 @@ --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Special Summon itself from the hand + --You can Special Summon this card (from your hand) by returning 1 "U.A." monster you control to the hand, except "U.A. Libero Spiker" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD) @@ -15,39 +15,36 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Shuffle monster into the Deck and then Special Summon 1 "U.A." monster from deck + --During your opponent's Main Phase (Quick Effect): You can shuffle 1 Level 5 or higher "U.A." monster from your hand into the Deck, and if you do, Special Summon 1 "U.A." monster from your Deck with a different name, then return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon2) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end s.listed_names={id} s.listed_series={SET_UA} -function s.spfilter(c,ft) +function s.spfilter(c) return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() - and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,ft) - return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,ft) - local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_RTOHAND,nil,nil,true) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_RTOHAND,nil,nil,true) if #g>0 then g:KeepAlive() e:SetLabelObject(g) @@ -61,9 +58,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.SendtoHand(g,nil,REASON_COST) g:DeleteGroup() end -function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() -end function s.tdfilter(c,e,tp) return c:IsSetCard(SET_UA) and c:IsLevelAbove(5) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) @@ -79,18 +73,17 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_ONFIELD) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local tc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() - if tc then - Duel.ConfirmCards(1-tp,tc) - if Duel.SendtoDeck(tc,tp,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.SendtoHand(c,nil,REASON_EFFECT) - end + if not tc then return end + Duel.ConfirmCards(1-tp,tc) + if Duel.SendtoDeck(tc,tp,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) + local c=e:GetHandler() + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then + Duel.BreakEffect() + Duel.SendtoHand(c,nil,REASON_EFFECT) end end end \ No newline at end of file diff --git a/official/c2563463.lua b/official/c2563463.lua index d981e7801a..140c88c8ae 100644 --- a/official/c2563463.lua +++ b/official/c2563463.lua @@ -3,7 +3,7 @@ --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - --Special Summon itself from the hand + --During the Main Phase, if you control no monsters, or control an "Adventurer Token" (Quick Effect): You can Special Summon this card from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Negate the activation of a card or effect + -- When a card or effect is activated while you control an "Adventurer Token" (Quick Effect): You can shuffle this card into the Deck, and if you do, negate that activation, and if you do that, destroy that card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_NEGATE+CATEGORY_DESTROY) @@ -51,15 +51,15 @@ end function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsAbleToDeck() and Duel.IsChainNegatable(ev) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) end end function s.ngop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end diff --git a/official/c25857977.lua b/official/c25857977.lua index 3533307ab2..0c17f39454 100644 --- a/official/c25857977.lua +++ b/official/c25857977.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - --Special summon from the pendulum zone + --You can target any number of "Dark Contract" cards you control; destroy them, and if you do, Special Summon this card from your Pendulum Zone, then you can increase or decrease its Level by the number destroyed local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Cannot special summon + --You cannot Special Summon monsters, except "D/D/D" monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -24,11 +24,11 @@ function s.initial_effect(c) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) c:RegisterEffect(e2) - --Provide effect when used as material + --A "D/D/D" monster that was Fusion, Synchro, Xyz, or Link Summoned using this card on the field as material gains this effect local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER) + e3:SetCode(EVENT_BE_MATERIAL) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.efcon) e3:SetOperation(s.efop) @@ -46,46 +46,45 @@ function s.desfilter2(c,e) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetMatchingGroup(s.desfilter2,tp,LOCATION_ONFIELD,0,nil,e) - if chk==0 then return ft>-1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) + local c=e:GetHandler() + if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.SelectUnselectGroup(g,e,tp,1,#g,aux.ChkfMMZ(1),0) end local sg=aux.SelectUnselectGroup(g,e,tp,1,#g,aux.ChkfMMZ(1),1,tp,HINTMSG_DESTROY) Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local g=Duel.GetTargetCards(e) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - local ct=Duel.GetOperatedGroup():GetCount() - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - if c:GetLevel()==1 then - Duel.SelectOption(tp,aux.Stringid(id,2)) - else - sel=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) - end - if sel==1 then ct=-ct end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(ct) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) + if #g==0 then return end + local ct=Duel.Destroy(g,REASON_EFFECT) + if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + if c:GetLevel()==1 then + Duel.SelectOption(tp,aux.Stringid(id,2)) + else + sel=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) end + if sel==1 then ct=-ct end + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(ct) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) end end function s.efcon(e,tp,eg,ep,ev,re,r,rp) local p=e:GetHandler() - return (r&REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK)~=0 and p:IsPreviousLocation(LOCATION_ONFIELD) + return r&(REASON_FUSION|REASON_SYNCHRO|REASON_XYZ|REASON_LINK)>0 and p:IsPreviousLocation(LOCATION_ONFIELD) and p:GetReasonCard():IsSetCard(SET_DDD) end function s.efop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() - --register the effect + --Provide the effect to the summoned monster local e1=Effect.CreateEffect(rc) e1:SetDescription(aux.Stringid(id,4)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER+CATEGORY_DESTROY) @@ -97,14 +96,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.tdop) e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) - --register the hint + --Register a client hint local e2=Effect.CreateEffect(rc) e2:SetDescription(aux.Stringid(id,5)) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) - --in case the monster did not have an effect + --If the monster was not an effect monster already, it becomes one if not rc:IsType(TYPE_EFFECT) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -115,27 +114,25 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeck() + return c:IsFaceup() and c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,1000) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,1,1,nil) - if Duel.SendtoDeck(td,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then - if tc and tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Recover(tp,1000,REASON_EFFECT) - end - end + local sc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,1,1,nil):GetFirst() + if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and tc:IsRelateToEffect(e) then + and Duel.Destroy(tc,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.Recover(tp,1000,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c57043986.lua b/official/c57043986.lua index 7417b7c8ea..7a495f3b65 100644 --- a/official/c57043986.lua +++ b/official/c57043986.lua @@ -2,13 +2,13 @@ --Blue-Eyes Solid Dragon local s,id=GetID() function s.initial_effect(c) - --negate + --If this card is Normal or Special Summoned: You can target 1 face-up monster your opponent controls; negate its effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) @@ -16,7 +16,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - --shuffle + --When your opponent activates a card or effect (Quick Effect): You can shuffle this card from the field into the Deck, and if you do, Special Summon 1 "Blue-Eyes White Dragon" from your Deck local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetDescription(aux.Stringid(id,0)) @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_CHAINING) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.spcon) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -35,7 +35,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end function s.negop(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -53,25 +53,22 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp,chk) tc:RegisterEffect(e2) end end -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToDeck() - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then + if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + 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 diff --git a/official/c91349449.lua b/official/c91349449.lua index 2c3af12142..3a703df80a 100644 --- a/official/c91349449.lua +++ b/official/c91349449.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e1) - --Special summon procedure (from hand) + -- Must be Special Summoned (from your hand) while 3 or more of your LIGHT monsters are banished local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetCondition(s.spcon) c:RegisterEffect(e2) - --Banish 1 monster on the field + -- Once per turn: You can target 1 of your banished LIGHT monsters and 1 face-up monster on the field; shuffle the first target into the Deck, and if you do, banish the second target local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE) @@ -42,7 +42,7 @@ function s.spcon(e,c) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - --Cannot attack this turn + --This card cannot attack during the turn you activate this effect local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) @@ -51,30 +51,30 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1,true) end -function s.filter1(c) +function s.tdfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() end -function s.filter2(c) +function s.rmvfilter(c) return c:IsFaceup() and c:IsAbleToRemove() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_REMOVED,0,1,nil) - and Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_REMOVED,0,1,nil) + and Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) + local g1=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,tp,0) e:SetLabelObject(g1:GetFirst()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) + local g2=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,tp,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc1=e:GetLabelObject() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc2=g:GetFirst() if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then + if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc2:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then if tc2:IsFaceup() and tc2:IsRelateToEffect(e) then Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT) end diff --git a/official/c91712985.lua b/official/c91712985.lua index 168e5f8c56..79f5157fd4 100644 --- a/official/c91712985.lua +++ b/official/c91712985.lua @@ -2,14 +2,14 @@ --Kamion, the Timelord local s,id=GetID() function s.initial_effect(c) - --cannot special summon + --Cannot be Special Summoned from the Deck local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetRange(LOCATION_DECK) e1:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e1) - --summon + --If you control no monsters, you can Normal Summon this card without Tributing local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_SUMMON_PROC) e2:SetCondition(s.ntcon) c:RegisterEffect(e2) - --indes + --Cannot be destroyed by battle or card effects local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -28,30 +28,31 @@ function s.initial_effect(c) local e4=e3:Clone() e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e4) + --You take no battle damage from attacks involving this card local e5=e3:Clone() e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) c:RegisterEffect(e5) - --change lp + --At the end of the Battle Phase, if this card battled: Shuffle 1 card your opponent controls into the Deck, and if you do, inflict 500 damage to your opponent local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_TODECK+CATEGORY_DAMAGE) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e6:SetCode(EVENT_PHASE|PHASE_BATTLE) - e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) - e6:SetCondition(s.tdcon) + e6:SetCountLimit(1) + e6:SetCondition(function(e,tp) return e:GetHandler():GetBattledGroupCount()>0 end) e6:SetTarget(s.tdtg) e6:SetOperation(s.tdop) c:RegisterEffect(e6) - --to deck + --Once per turn, during your Standby Phase: Shuffle this card into the Deck local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(id,2)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e7:SetCode(EVENT_PHASE|PHASE_STANDBY) - e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) - e7:SetCondition(s.rtdcon) + e7:SetCountLimit(1) + e7:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) e7:SetTarget(s.rtdtg) e7:SetOperation(s.rtdop) c:RegisterEffect(e7) @@ -62,9 +63,6 @@ function s.ntcon(e,c,minc) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil) @@ -72,21 +70,19 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end + --Neither player can activate cards or effects in response to this effect's activation Duel.SetChainLimit(aux.FALSE) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil) - if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then + local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst() + if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then Duel.Damage(1-tp,500,REASON_EFFECT) end end -function s.rtdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) -end function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,0) end function s.rtdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() From 8e448c923387684fb209e074fdc2c27bc2358785 Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 6 Sep 2026 05:19:44 -0300 Subject: [PATCH 2/3] batch2 --- official/c16259549.lua | 69 +++++++++++++++++++----------------------- official/c20049870.lua | 4 +-- official/c38363525.lua | 16 +++++----- official/c74063034.lua | 10 +++--- official/c78910579.lua | 9 +++--- official/c91668401.lua | 17 ++++++----- 6 files changed, 60 insertions(+), 65 deletions(-) diff --git a/official/c16259549.lua b/official/c16259549.lua index d63f943845..6646408c2d 100644 --- a/official/c16259549.lua +++ b/official/c16259549.lua @@ -2,55 +2,52 @@ --Number 49: Fortune Tune local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,2) c:EnableReviveLimit() - --lpup + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) + --Neither player can target this card on the field with card effects local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(s.reccon) - e1:SetTarget(s.rectg) - e1:SetOperation(s.recop) + e1:SetValue(1) c:RegisterEffect(e1) - -- + --If this card would be destroyed by battle or card effect, you can detach 1 material from this card instead local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_MZONE) - e2:SetValue(1) + e2:SetTarget(s.reptg) c:RegisterEffect(e2) - --destroy replace + --Once per turn, during your Standby Phase: Gain 500 LP local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_DESTROY_REPLACE) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e3:SetCategory(CATEGORY_RECOVER) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) - e3:SetTarget(s.reptg) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e3:SetTarget(s.rectg) + e3:SetOperation(s.recop) c:RegisterEffect(e3) - --todeck + --If this card is sent from the field to the GY: Target 2 Level 3 monsters in your GY; shuffle them both into the Deck, and if you do, return this card from your GY to the Extra Deck local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_TODECK) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCode(EVENT_TO_GRAVE) e4:SetCountLimit(1,id) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCondition(s.tdcon) + e4:SetCondition(function(e,tp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) e4:SetTarget(s.tdtg) e4:SetOperation(s.tdop) c:RegisterEffect(e4) end s.xyz_number=49 -function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) -end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) @@ -69,9 +66,6 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) return true else return false end end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end function s.filter(c,e) return c:GetLevel()==3 and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck() end @@ -83,17 +77,16 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:Select(tp,2,2,nil) Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,2,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,2,tp,0) end end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + local g=Duel.GetTargetCards(e) if not g then return end - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if #tg~=2 then return end - Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA)==2 then + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end end end \ No newline at end of file diff --git a/official/c20049870.lua b/official/c20049870.lua index d693e1b437..8e5a5f7b6f 100644 --- a/official/c20049870.lua +++ b/official/c20049870.lua @@ -1,4 +1,4 @@ ---JP name +--GMX研究員セラン --GMX Researcher Selande --scripted by pyrQ local s,id=GetID() @@ -85,7 +85,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst() if sc then diff --git a/official/c38363525.lua b/official/c38363525.lua index a391e624c3..b875a96877 100644 --- a/official/c38363525.lua +++ b/official/c38363525.lua @@ -3,8 +3,9 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --Take control 1 of opponent's monster + --If a Level 5 or higher Zombie monster is on the field: Target 1 monster your opponent controls; take control of it until the End Phase local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) - --Set itself from GY + --During your Main Phase, if this card is in your GY: You can shuffle 1 of your banished Zombie monsters into the Deck, and if you do, Set this card, but banish it when it leaves the field local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_SET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) @@ -36,11 +37,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end end @@ -55,9 +56,8 @@ end function s.setop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_REMOVED,0,1,1,nil) - if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and c:IsRelateToEffect(e) and c:IsSSetable() then + local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_REMOVED,0,1,1,nil):GetFirst() + if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) --Banish it if it leaves the field local e1=Effect.CreateEffect(c) diff --git a/official/c74063034.lua b/official/c74063034.lua index 77320659b2..5b4d890164 100644 --- a/official/c74063034.lua +++ b/official/c74063034.lua @@ -2,10 +2,10 @@ --Invocation local s,id=GetID() function s.initial_effect(c) - --Fusion Summon 1 Fusion monster using materials from the hand + --Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters from your hand as Fusion Material. If Summoning an "Invoked" Fusion Monster this way, you can also banish monsters from your field and/or either player's GY as Fusion Material local e1=Fusion.CreateSummonEff(c,nil,s.matfilter,s.fextra,s.extraop,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) c:RegisterEffect(e1) - --shuffle itself into the Deck and return 1 "Aleister the Invoker" to the hand + --If this card is in your GY: You can target 1 of your banished "Aleister the Invoker"; shuffle this card into the Deck, and if you do, add that monster to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) @@ -51,13 +51,13 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c78910579.lua b/official/c78910579.lua index bb190fa905..4b3f45935b 100644 --- a/official/c78910579.lua +++ b/official/c78910579.lua @@ -2,8 +2,9 @@ --Aquamirror Cycle local s,id=GetID() function s.initial_effect(c) - --Activate + --Target 1 WATER monster you control and 2 WATER monsters in your Graveyard; shuffle the first target into the Deck, and if you do, add the second targets to your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -26,14 +27,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g2=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,2,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,2,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) local tc1=g1:GetFirst() - if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then + if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>=0 and tc1:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then local hg=g2:Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoHand(hg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,hg) diff --git a/official/c91668401.lua b/official/c91668401.lua index 206c272667..34f8b28587 100644 --- a/official/c91668401.lua +++ b/official/c91668401.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Make the opponent send 1 Spell/Trap they control to the GY + -- If this card is Ritual Summoned: You can make your opponent send 1 Spell/Trap they control to the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) - --This card can make a second attack in a row + --When this attacking card destroys an opponent's monster by battle and sends it to the GY: You can activate this effect; this card can make a second attack on an opponent's monster in a row local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCondition(s.atcon) e2:SetOperation(s.atop) c:RegisterEffect(e2) - --Shuffle 1 Ritual Monster from your GY into the Deck and destroy 1 card the opponent controls + --Once per turn, when your opponent activates a card or effect that targets a "Cyber Angel" Ritual Monster you control (Quick Effect): You can shuffle 1 Ritual Monster from your GY into the Deck, and if you do, destroy 1 card your opponent local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) @@ -88,12 +88,13 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then + local tc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst() + if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - if #g2>0 then - Duel.Destroy(g2,REASON_EFFECT) + 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 end \ No newline at end of file From a73eb19b6d7b8cfdc030ff16eac85b2cef090741 Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 6 Sep 2026 05:25:26 -0300 Subject: [PATCH 3/3] Update c25857977.lua --- official/c25857977.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/official/c25857977.lua b/official/c25857977.lua index 0c17f39454..be6f1367e4 100644 --- a/official/c25857977.lua +++ b/official/c25857977.lua @@ -130,8 +130,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,1,1,nil):GetFirst() - if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and tc:IsRelateToEffect(e) then - and Duel.Destroy(tc,REASON_EFFECT)>0 then + if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.BreakEffect() Duel.Recover(tp,1000,REASON_EFFECT) end