From 5899b2120f66cd7d9f7943bb32a46a9a323b703c Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:13:30 +0300 Subject: [PATCH 001/165] "Flower Cardian" updates --- official/c16024176.lua | 102 +++++++++++++++++---------------- official/c16802689.lua | 100 ++++++++++++++++---------------- official/c17141718.lua | 87 ++++++++++++++-------------- official/c21772453.lua | 86 ++++++++++++++------------- official/c30382214.lua | 73 +++++++++++------------ official/c43413875.lua | 97 ++++++++++++++++--------------- official/c54135423.lua | 66 +++++++++++---------- official/c5489987.lua | 60 ++++++++++--------- official/c57261568.lua | 87 +++++++++++++++------------- official/c80630522.lua | 49 ++++++++-------- official/c81752019.lua | 54 ++++++++++------- official/c89818984.lua | 88 ++++++++++++++-------------- official/c94388754.lua | 80 ++++++++++++++------------ unofficial/c511001692.lua | 2 +- unofficial/c511001693.lua | 2 +- unofficial/c511001694.lua | 2 +- unofficial/c511001695.lua | 2 +- unofficial/c511001696.lua | 2 +- unofficial/c511001697.lua | 2 +- unofficial/c511001698.lua | 2 +- unofficial/c511001699.lua | 2 +- unofficial/c511001700.lua | 2 +- unofficial/c511001723.lua | 2 +- unofficial/c511001724.lua | 2 +- unofficial/c511001725.lua | 2 +- unofficial/proc_unofficial.lua | 20 +++---- 26 files changed, 559 insertions(+), 514 deletions(-) diff --git a/official/c16024176.lua b/official/c16024176.lua index e1e01ed00f..f4a9eb5cec 100644 --- a/official/c16024176.lua +++ b/official/c16024176.lua @@ -3,88 +3,90 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon itself from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 1 "Flower Cardian" monster, except "Flower Cardian Pine with Crane" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw and special summon + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --Draw 1 card local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) - --draw during battle - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE|PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(s.drcon) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,ft,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==1 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(1) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -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) diff --git a/official/c16802689.lua b/official/c16802689.lua index 1bd90cfa06..8646f0c813 100644 --- a/official/c16802689.lua +++ b/official/c16802689.lua @@ -3,87 +3,89 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon summon from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 12 "Flower Cardian" monster, except "Flower Cardian Paulownia with Phoenix" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw and special summon + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --Draw 1 card local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) - --draw during battle - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCountLimit(1) - e3:SetCondition(s.drcon) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==12 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(12) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) diff --git a/official/c17141718.lua b/official/c17141718.lua index 340fa9ec26..f479532997 100644 --- a/official/c17141718.lua +++ b/official/c17141718.lua @@ -2,82 +2,83 @@ --Flower Cardian Zebra Grass local s,id=GetID() function s.initial_effect(c) - --spsummon + --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:SetDescription(aux.Stringid(id,0)) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --shuffle - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetDescription(aux.Stringid(id,1)) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + c:RegisterEffect(e1) + --Reveal any number of "Flower Cardian" monsters in your hand, shuffle them into the Deck, then draw the same number of cards + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetTarget(s.drtg) + e2a:SetOperation(s.drop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) end s.listed_series={SET_FLOWER_CARDIAN} -function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(7) +function s.spconfilter(c) + return c:IsLevelBelow(7) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) -end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) end -function s.filter(c) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsAbleToDeck() and not c:IsPublic() +function s.tdfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and c:IsAbleToDeck() and not c:IsPublic() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetTargetPlayer(tp) + and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,s.filter,p,LOCATION_HAND,0,1,99,nil) +function s.drop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND,0,1,99,nil) if #g>0 then - Duel.ConfirmCards(1-p,g) + Duel.ConfirmCards(1-tp,g) local ct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,ct,REASON_EFFECT) - Duel.ShuffleHand(p) + if ct>0 then + Duel.ShuffleDeck(tp) + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,ct,REASON_EFFECT) + end + end end end \ No newline at end of file diff --git a/official/c21772453.lua b/official/c21772453.lua index 6ecc1aea61..7b0a515e47 100644 --- a/official/c21772453.lua +++ b/official/c21772453.lua @@ -3,75 +3,79 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon rule + --Must first be Special Summoned (from your hand) by Tributing 1 "Flower Cardian" monster, except "Flower Cardian Maple with Deer" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, you can destroy 1 Spell/Trap Card your opponent controls local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) +function s.selfspfilter(c) return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.desfilter(c) - return c:IsSpellTrap() -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - local sg=g:Select(tp,1,1,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end end else Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c30382214.lua b/official/c30382214.lua index 14e81d632f..4839084c22 100644 --- a/official/c30382214.lua +++ b/official/c30382214.lua @@ -3,24 +3,24 @@ --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Special Summon itself from hand + --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:SetDescription(aux.Stringid(id,0)) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --Draw 1 and search or Special Summon + c:RegisterEffect(e1) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, you can take 1 "Flower Cardian" monster from your Deck, except "Flower Cardian Cherry Blossom", and either add it to your hand or Special Summon it local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) e2:SetCost(s.drcost) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) @@ -28,42 +28,40 @@ function s.initial_effect(c) end s.listed_names={id} s.listed_series={SET_FLOWER_CARDIAN} -function s.filter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(2) +function s.spconfilter(c) + return c:IsLevelBelow(2) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) -end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) end -s.cfilter=aux.FaceupFilter(Card.IsSetCard,SET_FLOWER_CARDIAN) function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_FLOWER_CARDIAN) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_FLOWER_CARDIAN) Duel.Release(g,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -75,32 +73,35 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.spfilter(c) - return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) +function s.thspfilter(c,e,tp,mmz_chk) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and not c:IsCode(id) and (c:IsAbleToHand() + or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local g=Duel.GetMatchingGroup(s.thspfilter,tp,LOCATION_DECK,0,nil,e,tp,mmz_chk) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=sg:Select(tp,1,1,nil):GetFirst() + local sc=g:Select(tp,1,1,nil):GetFirst() + Duel.BreakEffect() aux.ToHandOrElse(sc,tp, - function(c) - return sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + function() + return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function(c) + function() return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,0) + aux.Stringid(id,4) ) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c43413875.lua b/official/c43413875.lua index 4a0223c7b8..5952373283 100644 --- a/official/c43413875.lua +++ b/official/c43413875.lua @@ -3,80 +3,85 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --spsummon from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 8 "Flower Cardian" monster, except "Flower Cardian Zebra Grass with Moon" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw(spsummon) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --Draw 1 card local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCountLimit(1) + e2:SetCondition(aux.bdocon) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) - --draw(battle) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCountLimit(1) - e3:SetCondition(aux.bdocon) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==8 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(8) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c54135423.lua b/official/c54135423.lua index 8e58c05853..67784b2652 100644 --- a/official/c54135423.lua +++ b/official/c54135423.lua @@ -2,78 +2,76 @@ --Flower Cardian Willow local s,id=GetID() function s.initial_effect(c) - --spsummon + --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:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --shuffle + c:RegisterEffect(e1) + --Shuffle 1 "Flower Cardian" monster from your GY into your Deck, then draw 1 card local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} -function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(10) +function s.spconfilter(c) + return c:IsLevelBelow(10) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) -end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) end -function s.filter(c) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsAbleToDeck() +function s.tdfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and c:IsAbleToDeck() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) + and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=1 then return end - Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) - if ct==1 then +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then + if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) end Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end diff --git a/official/c5489987.lua b/official/c5489987.lua index 9f05b05873..b93694548c 100644 --- a/official/c5489987.lua +++ b/official/c5489987.lua @@ -3,80 +3,86 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --draw + --Draw 1 card, and if you do, show it, then Special Summon this card if the drawn card is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.drcost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --atk up + c:RegisterEffect(e1) + --Your battling "Flower Cardian" monster gains 1000 ATK until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(s.atkcon) e2:SetCost(Cost.SelfDiscard) + e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsPublic() end -end +s.listed_series={SET_FLOWER_CARDIAN} function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,c,2,tp,LOCATION_HAND) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then + if Duel.Draw(p,d,REASON_EFFECT)>0 then local c=e:GetHandler() - local g=Duel.GetOperatedGroup() - local tc=g:GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then if c:IsRelateToEffect(e) then - if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then + Duel.BreakEffect() + if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then c:CompleteProcedure() end end else + local g=Group.FromCards(dc) if c:IsRelateToEffect(e) then g:AddCard(c) end + Duel.BreakEffect() Duel.SendtoGrave(g,REASON_EFFECT) end Duel.ShuffleHand(tp) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local tc=Duel.GetAttackTarget() - if not tc then return false end - if tc:IsControler(1-tp) then tc=Duel.GetAttacker() end - e:SetLabelObject(tc) - return tc:IsFaceup() and tc:IsSetCard(SET_FLOWER_CARDIAN) and tc:IsRelateToBattle() + if not aux.StatChangeDamageStepCondition() then return false end + local bc1,bc2=Duel.GetBattleMonster(tp) + return bc1 and bc2 and bc1:IsSetCard(SET_FLOWER_CARDIAN) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc=Duel.GetBattleMonster(tp) + e:SetLabelObject(bc) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then + local bc=e:GetLabelObject() + if bc:IsRelateToBattle() and bc:IsFaceup() and bc:IsControler(tp) then + --Your battling monster gains 1000 ATK until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) + bc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c57261568.lua b/official/c57261568.lua index 6f8a0de876..7eac1c74b1 100644 --- a/official/c57261568.lua +++ b/official/c57261568.lua @@ -3,81 +3,88 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon rule + --Must first be Special Summoned (from your hand) by Tributing 1 "Flower Cardian" monster, except "Flower Cardian Peony with Butterfly" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, look at the top 3 cards of your opponent's Deck, then place them all on the top or bottom of the Deck in any order local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) + c:RegisterEffect(e1) + --When this card is used as Synchro Material, you can treat it and all other Synchro Materials (that have a Level) as Level 2 monsters local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) + e2:SetOperation(s.synop) c:RegisterEffect(e2) - --synchro - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e3:SetOperation(s.synop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c) +function s.selfspfilter(c) return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local ct=math.min(Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0),3) - if ct==0 then return end + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + local deck_ct=Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0) + local ct=math.min(deck_ct,3) + if ct==0 then Duel.ShuffleHand(tp) return end Duel.BreakEffect() local g=Duel.GetDecktopGroup(1-tp,ct) Duel.ConfirmCards(tp,g) - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + local op=0 + if deck_ct>3 then + op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) + end Duel.SortDecktop(tp,1-tp,ct) - if opt==0 then + if op==1 then Duel.MoveToDeckBottom(ct,1-tp) end else Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c80630522.lua b/official/c80630522.lua index ee51e2c27b..4f9105ae13 100644 --- a/official/c80630522.lua +++ b/official/c80630522.lua @@ -2,66 +2,69 @@ --Flower Cardian Paulownia local s,id=GetID() function s.initial_effect(c) - --Special summon itself from hand + --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:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --Draw 1 + c:RegisterEffect(e1) + --Negate the attack, end the Battle Phase, then draw 1 card local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DRAW) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} -function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(11) +function s.spconfilter(c) + return c:IsLevelBelow(11) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end end end \ No newline at end of file diff --git a/official/c81752019.lua b/official/c81752019.lua index 694e55c13e..3019591840 100644 --- a/official/c81752019.lua +++ b/official/c81752019.lua @@ -2,49 +2,59 @@ --Flower Cardian Pine local s,id=GetID() function s.initial_effect(c) - --draw (summon) + --Draw 1 card, show it, then send it to the GY unless it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetTarget(s.drtg) - e1:SetOperation(s.drop1) + e1:SetTarget(s.nsdrtg) + e1:SetOperation(s.nsdrop) c:RegisterEffect(e1) - --draw (destroy) + --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:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(s.drcon) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop2) + e2:SetCondition(s.desdrcon) + e2:SetTarget(s.desdrtg) + e2:SetOperation(s.desdrop) c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end +function s.nsdrtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.drop1(e,tp,eg,ep,ev,re,r,rp) +function s.nsdrop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if not (tc:IsSetCard(SET_FLOWER_CARDIAN) and tc:IsMonster()) then - Duel.SendtoGrave(tc,REASON_EFFECT) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if not (dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster()) then + Duel.SendtoGrave(dc,REASON_EFFECT) + end + Duel.ShuffleHand(tp) end - Duel.ShuffleHand(tp) end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) +function s.desdrcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) - or (rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)) + return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) + and c:IsPreviousControler(tp)) +end +function s.desdrtg(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.drop2(e,tp,eg,ep,ev,re,r,rp) +function s.desdrop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c89818984.lua b/official/c89818984.lua index f108c92f25..b4aef87897 100644 --- a/official/c89818984.lua +++ b/official/c89818984.lua @@ -3,76 +3,80 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --spsummon from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 11 "Flower Cardian" monster, except "Flower Cardian Willow with Calligrapher" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --When this card is used as Synchro Material, you can treat it and all other Synchro Materials (that have a Level) as Level 2 monsters local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) + e2:SetOperation(s.synop) c:RegisterEffect(e2) - --synchro - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e3:SetOperation(s.synop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==11 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(11) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c94388754.lua b/official/c94388754.lua index 65850d9f43..0f354cd3ff 100644 --- a/official/c94388754.lua +++ b/official/c94388754.lua @@ -3,71 +3,79 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon rule + --Must first be Special Summoned (from your hand) by Tributing 1 "Flower Cardian" monster, except "Flower Cardian Clover with Boar" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, you can destroy 1 monster your opponent controls local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) +function s.selfspfilter(c) return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then - Duel.BreakEffect() - local sg=g:Select(tp,1,1,nil) - Duel.Destroy(sg,REASON_EFFECT) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end end else Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/unofficial/c511001692.lua b/unofficial/c511001692.lua index 1bb5042c8d..e2367c8b17 100644 --- a/unofficial/c511001692.lua +++ b/unofficial/c511001692.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001693.lua b/unofficial/c511001693.lua index 4f663bcc39..8d337dcc29 100644 --- a/unofficial/c511001693.lua +++ b/unofficial/c511001693.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001694.lua b/unofficial/c511001694.lua index cffcb33a76..bbcc7e2c12 100644 --- a/unofficial/c511001694.lua +++ b/unofficial/c511001694.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001695.lua b/unofficial/c511001695.lua index a296ddc009..0ee19c42bc 100644 --- a/unofficial/c511001695.lua +++ b/unofficial/c511001695.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/c511001696.lua b/unofficial/c511001696.lua index 439b94802d..c22b2322b2 100644 --- a/unofficial/c511001696.lua +++ b/unofficial/c511001696.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001697.lua b/unofficial/c511001697.lua index 8747b9217f..a60925ec10 100644 --- a/unofficial/c511001697.lua +++ b/unofficial/c511001697.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001698.lua b/unofficial/c511001698.lua index f4f022075e..485fdf0c10 100644 --- a/unofficial/c511001698.lua +++ b/unofficial/c511001698.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/c511001699.lua b/unofficial/c511001699.lua index c0b268e7c5..64c6961e88 100644 --- a/unofficial/c511001699.lua +++ b/unofficial/c511001699.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001700.lua b/unofficial/c511001700.lua index afe2ca7ba3..6f02bc7817 100644 --- a/unofficial/c511001700.lua +++ b/unofficial/c511001700.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) --synchro level local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c511001723.lua b/unofficial/c511001723.lua index 5b4e4c7994..298995a54c 100644 --- a/unofficial/c511001723.lua +++ b/unofficial/c511001723.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/c511001724.lua b/unofficial/c511001724.lua index 51a82a7468..5e7e425c12 100644 --- a/unofficial/c511001724.lua +++ b/unofficial/c511001724.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) --synchro level local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c511001725.lua b/unofficial/c511001725.lua index 6f2f944f87..81c175df5d 100644 --- a/unofficial/c511001725.lua +++ b/unofficial/c511001725.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/proc_unofficial.lua b/unofficial/proc_unofficial.lua index 07d34c1910..ee9b84c074 100644 --- a/unofficial/proc_unofficial.lua +++ b/unofficial/proc_unofficial.lua @@ -258,19 +258,13 @@ end ------------------------------------------------------------- Cardian={} function Cardian.CheckSpCondition(c) - if c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() then - local eff={c:GetCardEffect(511001692)} - for _,te2 in ipairs(eff) do - local te=te2:GetLabelObject() - if te:GetType()==EFFECT_TYPE_FIELD then - local con=te:GetCondition() - if not con or con(te,c) then - return true - end - else - if te:IsActivatable(te:GetHandlerPlayer(),true,true) then - return true - end + if not (c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster()) then return false end + local effs={c:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCode()&EFFECT_SPSUMMON_PROC==EFFECT_SPSUMMON_PROC then + local con=eff:GetCondition() + if con==nil or con(eff,c) then + return true end end end From 6f9b5092f260909f6a019132f778f326186268f7 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:29:13 +0800 Subject: [PATCH 002/165] update utility.lua added mechanism for tracking functions that were generated with Cost.Detach --- utility.lua | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/utility.lua b/utility.lua index 74222e734c..8125c07dcc 100644 --- a/utility.lua +++ b/utility.lua @@ -1510,31 +1510,30 @@ function Cost.Discard(filter,other,count) Duel.DiscardHand(tp,filter,count,count,REASON_COST|REASON_DISCARD,exclude) end end --- "Detach Xyz Material Cost Generator" --- Generates a function to be used by Effect.SetCost in order to detach --- a number of Xyz Materials from the Effect's handler. --- `min` minimum number of materials to check for detachment. --- `max` maximum number of materials to detach or a function that gets called --- as if by doing max(e,tp) in order to get the value of max detachments. --- `op` optional function that gets called by passing the effect and the operated --- group of just detached materials in order to do some additional handling with --- them. + +local detach_costs={} function Cost.Detach(min,max,op) max=max or min + do --Perform some sanity checks, simplifies debugging + local min_type=type(min) local max_type=type(max) local op_type=type(op) - if type(min)~="number" then - error("Parameter 1 should be an Integer",2) + if min_type~="number" and min_type~="function" then + error("Parameter 1 should be an Integer|function",2) end if max_type~="number" and max_type~="function" then error("Parameter 2 should be Integer|function",2) end if op_type~="nil" and op_type~="function" then - error("Parameter 2 should be nil|function",2) + error("Parameter 3 should be nil|function",2) end end - return function(e,tp,eg,ep,ev,re,r,rp,chk) + + local function cost_func(e,tp,eg,ep,ev,re,r,rp,chk) + if min_type=="function" then min=min(e,tp) end + if max_type=="function" then max=max(e,tp) end + local c=e:GetHandler() local nn=c:IsSetCard(SET_NUMERON) and c:IsType(TYPE_XYZ) and Duel.IsPlayerAffectedByEffect(tp,CARD_NUMERON_NETWORK) local crm=c:CheckRemoveOverlayCard(tp,min,REASON_COST) @@ -1543,11 +1542,18 @@ function Cost.Detach(min,max,op) --Do not execute `op`, hint at "Numeron Network" being applied return Duel.Hint(HINT_CARD,tp,CARD_NUMERON_NETWORK) end - local m=type(max)=="number" and max or max(e,tp) - if c:RemoveOverlayCard(tp,min,m,REASON_COST)>0 and op then + + if c:RemoveOverlayCard(tp,min,max,REASON_COST)>0 and op then op(e,Duel.GetOperatedGroup()) end end + + detach_costs[cost_func]=true + return cost_func +end + +function Effect.HasDetachCost(e) + return detach_costs[e:GetCost()] end --Default cost for "You can pay X LP;" @@ -1593,7 +1599,8 @@ end function Cost.AND(...) local fns={...} - return function(e,tp,eg,ep,ev,re,r,rp,chk) + + local function full_cost(e,tp,eg,ep,ev,re,r,rp,chk) --when checking, stop at the first falsy value if chk==0 then for _,fn in ipairs(fns) do @@ -1606,6 +1613,11 @@ function Cost.AND(...) fn(e,tp,eg,ep,ev,re,r,rp,1) end end + + for _,fn in ipairs(fns) do + if detach_costs[fn] then detach_costs[full_cost]=true end + end + return full_cost end From 13816de921fa95935c4074399d476d9a0f4c0cdb Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:32:47 +0800 Subject: [PATCH 003/165] update "Tachyon Unit" * use new function for checking effects with a detach cost * modernization --- unofficial/c511002571.lua | 104 ++++++++++++++------------------------ 1 file changed, 39 insertions(+), 65 deletions(-) diff --git a/unofficial/c511002571.lua b/unofficial/c511002571.lua index 82a7d4f6ca..9b16f9f542 100644 --- a/unofficial/c511002571.lua +++ b/unofficial/c511002571.lua @@ -3,83 +3,57 @@ Duel.LoadScript("c420.lua") local s,id=GetID() function s.initial_effect(c) - --Activate + --Activate 1 "Tachyon" monster's effect that is activated by detaching its own Xyz Material(s) local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetCost(Cost.PayLP(500)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) +function s.runfn(fn,eff,re,tp,chk) + return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,re,REASON_EFFECT,PLAYER_NONE,chk) end -function s.filter(c,e,tp) - if c:IsFacedown() or not c:IsTachyon() or not c:IsHasEffect(id) then return false end - local eff={c:GetCardEffect(id)} - for _,teh in ipairs(eff) do - local te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local con=te:GetCondition() - local tg=te:GetTarget() - if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE)) - and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,0)) then return true - end +function s.efffilter(c,e,tp) + if c:IsFacedown() or not c:IsTachyon() then return false end + for _,eff in ipairs({c:GetOwnEffects()}) do + if eff:HasDetachCost() and s.runfn(eff:GetCondition(),eff,e,tp) and s.runfn(eff:GetTarget(),eff,e,tp,0) then return true end end return false 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.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.efffilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.efffilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SelectTarget(tp,s.efffilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local eff={tc:GetCardEffect(id)} - local te=nil - local acd={} - local ac={} - for _,teh in ipairs(eff) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - local con=temp:GetCondition() - local tg=temp:GetTarget() - if (not con or con(temp,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE)) - and (not tg or tg(temp,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,0)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end - end - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - op=Duel.SelectOption(tp,table.unpack(acd)) - op=op+1 - te=ac[op] - end - if not te then return end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local tg=te:GetTarget() - if tg then tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,1) end - Duel.BreakEffect() - tc:CreateEffectRelation(te) - Duel.BreakEffect() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - for etc in aux.Next(g) do - etc:CreateEffectRelation(te) - end - local operation=te:GetOperation() - if operation then operation(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,1) end - tc:ReleaseEffectRelation(te) - for etc in aux.Next(g) do - etc:ReleaseEffectRelation(te) + if not tc:IsRelateToEffect(e) then return end + local effs={} + local options={} + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasDetachCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,e,tp) and s.runfn(eff:GetTarget(),eff,e,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) end end -end \ No newline at end of file + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end + Duel.ClearTargetCard() + s.runfn(te:GetTarget(),te,e,tp,1) + Duel.BreakEffect() + tc:CreateEffectRelation(te) + Duel.BreakEffect() + local tg=Duel.GetTargetCards(te) + tg:ForEach(Card.CreateEffectRelation,te) + s.runfn(te:GetOperation(),te,e,tp,1) + tg:ForEach(Card.ReleaseEffectRelation,te) +end From fb59df821993343efbb2d792e7fa9c0aa824d200 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:38:56 +0800 Subject: [PATCH 004/165] remove uses of EFFECT_MARKER_DETACH_XMAT --- official/c10000030.lua | 4 ++-- official/c10389142.lua | 4 ++-- official/c10406322.lua | 4 ++-- official/c10443957.lua | 4 ++-- official/c10613952.lua | 4 ++-- official/c10666000.lua | 2 +- official/c10678778.lua | 4 ++-- official/c11398059.lua | 2 +- official/c11411223.lua | 4 ++-- official/c11441009.lua | 4 ++-- official/c11510448.lua | 4 ++-- official/c11522979.lua | 4 ++-- official/c11646785.lua | 4 ++-- official/c12014404.lua | 4 ++-- official/c12219047.lua | 4 ++-- official/c1249315.lua | 2 +- official/c12533811.lua | 4 ++-- official/c12615446.lua | 4 ++-- official/c12632096.lua | 4 ++-- official/c1269512.lua | 4 ++-- official/c13030280.lua | 4 ++-- official/c13183454.lua | 4 ++-- official/c14152862.lua | 4 ++-- official/c1426714.lua | 4 ++-- official/c14301396.lua | 4 ++-- official/c14306092.lua | 4 ++-- official/c15092394.lua | 4 ++-- official/c15232745.lua | 4 ++-- official/c15561463.lua | 4 ++-- official/c15862758.lua | 4 ++-- official/c15914410.lua | 4 ++-- official/c15939229.lua | 6 +++--- official/c16037007.lua | 4 ++-- official/c16110708.lua | 4 ++-- official/c16195942.lua | 4 ++-- official/c1621413.lua | 6 +++--- official/c1639384.lua | 4 ++-- official/c16643334.lua | 4 ++-- official/c16691074.lua | 4 ++-- official/c16699558.lua | 4 ++-- official/c1688285.lua | 4 ++-- official/c16955631.lua | 4 ++-- official/c17016362.lua | 4 ++-- official/c1828513.lua | 4 ++-- official/c18326736.lua | 6 +++--- official/c18511599.lua | 4 ++-- official/c18897163.lua | 4 ++-- official/c18963306.lua | 4 ++-- official/c19333131.lua | 4 ++-- official/c19369609.lua | 4 ++-- official/c19684740.lua | 4 ++-- official/c19891310.lua | 4 ++-- official/c1992816.lua | 4 ++-- official/c20145685.lua | 4 ++-- official/c20343502.lua | 4 ++-- official/c20563387.lua | 4 ++-- official/c2061963.lua | 4 ++-- official/c20785975.lua | 4 ++-- official/c2091298.lua | 4 ++-- official/c21044178.lua | 4 ++-- official/c21065189.lua | 4 ++-- official/c21223277.lua | 4 ++-- official/c21313376.lua | 4 ++-- official/c21501505.lua | 4 ++-- official/c21521304.lua | 4 ++-- official/c21858819.lua | 4 ++-- official/c2191144.lua | 4 ++-- official/c22110647.lua | 4 ++-- official/c22653490.lua | 4 ++-- official/c23454876.lua | 4 ++-- official/c23603403.lua | 4 ++-- official/c23649496.lua | 4 ++-- official/c23776077.lua | 4 ++-- official/c23848752.lua | 4 ++-- official/c24701066.lua | 4 ++-- official/c2530830.lua | 4 ++-- official/c25341652.lua | 4 ++-- official/c26096328.lua | 4 ++-- official/c26211048.lua | 4 ++-- official/c26329679.lua | 4 ++-- official/c26556950.lua | 4 ++-- official/c26563200.lua | 4 ++-- official/c2665273.lua | 4 ++-- official/c26988374.lua | 4 ++-- official/c27069566.lua | 4 ++-- official/c27337596.lua | 4 ++-- official/c27420823.lua | 6 +++--- official/c27552504.lua | 4 ++-- official/c2766877.lua | 4 ++-- official/c28150174.lua | 4 ++-- official/c28290705.lua | 4 ++-- official/c28346136.lua | 4 ++-- official/c28400508.lua | 4 ++-- official/c28781003.lua | 4 ++-- official/c28912357.lua | 4 ++-- official/c2896663.lua | 4 ++-- official/c28981598.lua | 4 ++-- official/c29085954.lua | 4 ++-- official/c29208536.lua | 2 +- official/c29423048.lua | 4 ++-- official/c29510428.lua | 4 ++-- official/c29515122.lua | 4 ++-- official/c29669359.lua | 4 ++-- official/c2978414.lua | 8 ++++---- official/c30095833.lua | 4 ++-- official/c30100551.lua | 4 ++-- official/c30128445.lua | 4 ++-- official/c30350202.lua | 4 ++-- official/c30439101.lua | 4 ++-- official/c30741334.lua | 4 ++-- official/c31123642.lua | 4 ++-- official/c31320433.lua | 4 ++-- official/c31437713.lua | 4 ++-- official/c31539614.lua | 2 +- official/c31563350.lua | 4 ++-- official/c31801517.lua | 4 ++-- official/c32003338.lua | 4 ++-- official/c32224143.lua | 4 ++-- official/c32302078.lua | 4 ++-- official/c32446630.lua | 4 ++-- official/c32530043.lua | 4 ++-- official/c32559361.lua | 4 ++-- official/c3292267.lua | 4 ++-- official/c33776843.lua | 4 ++-- official/c33779875.lua | 6 +++--- official/c33909817.lua | 4 ++-- official/c34086406.lua | 4 ++-- official/c34481518.lua | 4 ++-- official/c34909328.lua | 2 +- official/c34945480.lua | 4 ++-- official/c3594985.lua | 4 ++-- official/c359563.lua | 4 ++-- official/c36076683.lua | 4 ++-- official/c36757171.lua | 4 ++-- official/c36776089.lua | 4 ++-- official/c37057743.lua | 4 ++-- official/c37164373.lua | 4 ++-- official/c37279508.lua | 4 ++-- official/c3743515.lua | 4 ++-- official/c3758046.lua | 4 ++-- official/c37649320.lua | 4 ++-- official/c3790062.lua | 4 ++-- official/c37926346.lua | 4 ++-- official/c38026562.lua | 4 ++-- official/c3814632.lua | 4 ++-- official/c38180759.lua | 4 ++-- official/c38250531.lua | 4 ++-- official/c38273745.lua | 4 ++-- official/c3828844.lua | 4 ++-- official/c38495396.lua | 4 ++-- official/c38694052.lua | 2 +- official/c39030163.lua | 4 ++-- official/c39139935.lua | 4 ++-- official/c39272762.lua | 4 ++-- official/c39622156.lua | 4 ++-- official/c3989465.lua | 4 ++-- official/c39972129.lua | 4 ++-- official/c39987164.lua | 4 ++-- official/c4019153.lua | 4 ++-- official/c40390147.lua | 4 ++-- official/c40424929.lua | 4 ++-- official/c40673853.lua | 4 ++-- official/c41147577.lua | 4 ++-- official/c41309158.lua | 4 ++-- official/c41375811.lua | 2 +- official/c41522092.lua | 4 ++-- official/c41524885.lua | 4 ++-- official/c42160203.lua | 4 ++-- official/c42230449.lua | 4 ++-- official/c42421606.lua | 4 ++-- official/c42589641.lua | 4 ++-- official/c42741437.lua | 4 ++-- official/c42752141.lua | 4 ++-- official/c42940335.lua | 4 ++-- official/c43047672.lua | 4 ++-- official/c440556.lua | 4 ++-- official/c4423206.lua | 4 ++-- official/c44311445.lua | 4 ++-- official/c44405066.lua | 4 ++-- official/c44505297.lua | 4 ++-- official/c44698398.lua | 4 ++-- official/c45533023.lua | 4 ++-- official/c45742626.lua | 4 ++-- official/c45852939.lua | 4 ++-- official/c46772449.lua | 4 ++-- official/c46871387.lua | 4 ++-- official/c46895036.lua | 4 ++-- official/c47017574.lua | 4 ++-- official/c47060528.lua | 2 +- official/c47132793.lua | 4 ++-- official/c47349116.lua | 4 ++-- official/c47506081.lua | 4 ++-- official/c47579719.lua | 4 ++-- official/c47805931.lua | 4 ++-- official/c48348921.lua | 4 ++-- official/c48608796.lua | 4 ++-- official/c48739166.lua | 4 ++-- official/c48905153.lua | 4 ++-- official/c48928529.lua | 4 ++-- official/c49032236.lua | 4 ++-- official/c49121795.lua | 4 ++-- official/c49202331.lua | 4 ++-- official/c49221191.lua | 4 ++-- official/c49456901.lua | 4 ++-- official/c49678559.lua | 4 ++-- official/c4997565.lua | 4 ++-- official/c5014629.lua | 4 ++-- official/c50260683.lua | 4 ++-- official/c50449881.lua | 4 ++-- official/c50789693.lua | 4 ++-- official/c5088741.lua | 4 ++-- official/c51497409.lua | 4 ++-- official/c51543904.lua | 4 ++-- official/c51735257.lua | 4 ++-- official/c51960178.lua | 4 ++-- official/c52323874.lua | 4 ++-- official/c52558805.lua | 4 ++-- official/c52653092.lua | 4 ++-- official/c53054164.lua | 2 +- official/c53244294.lua | 4 ++-- official/c53334641.lua | 4 ++-- official/c53701457.lua | 4 ++-- official/c54358015.lua | 4 ++-- official/c54366836.lua | 4 ++-- official/c54719828.lua | 4 ++-- official/c5530780.lua | 4 ++-- official/c55470553.lua | 4 ++-- official/c55727845.lua | 4 ++-- official/c55935416.lua | 4 ++-- official/c56051086.lua | 4 ++-- official/c56292140.lua | 4 ++-- official/c56337500.lua | 4 ++-- official/c56638325.lua | 4 ++-- official/c56832966.lua | 4 ++-- official/c56910167.lua | 4 ++-- official/c57031794.lua | 6 +++--- official/c57043117.lua | 4 ++-- official/c57314798.lua | 4 ++-- official/c57450198.lua | 6 +++--- official/c57566760.lua | 4 ++-- official/c57707471.lua | 4 ++-- official/c58058134.lua | 4 ++-- official/c58069384.lua | 4 ++-- official/c581014.lua | 4 ++-- official/c58504745.lua | 4 ++-- official/c58600555.lua | 4 ++-- official/c58712976.lua | 4 ++-- official/c58720904.lua | 4 ++-- official/c58820923.lua | 4 ++-- official/c59071624.lua | 6 +++--- official/c5916510.lua | 4 ++-- official/c59170782.lua | 6 +++--- official/c59208943.lua | 4 ++-- official/c59242457.lua | 4 ++-- official/c59627393.lua | 4 ++-- official/c60195675.lua | 4 ++-- official/c60517697.lua | 4 ++-- official/c60645181.lua | 4 ++-- official/c60992364.lua | 4 ++-- official/c61307542.lua | 2 +- official/c61344030.lua | 4 ++-- official/c61374414.lua | 4 ++-- official/c61399402.lua | 4 ++-- official/c6165656.lua | 4 ++-- official/c62070231.lua | 4 ++-- official/c6247535.lua | 4 ++-- official/c62541668.lua | 4 ++-- official/c62709239.lua | 4 ++-- official/c6284176.lua | 4 ++-- official/c62967433.lua | 4 ++-- official/c63746411.lua | 4 ++-- official/c63767246.lua | 4 ++-- official/c6387204.lua | 4 ++-- official/c64245689.lua | 4 ++-- official/c64276752.lua | 4 ++-- official/c64332231.lua | 4 ++-- official/c64414267.lua | 4 ++-- official/c64554883.lua | 4 ++-- official/c64689404.lua | 4 ++-- official/c6511113.lua | 4 ++-- official/c65301952.lua | 4 ++-- official/c65676461.lua | 4 ++-- official/c65884091.lua | 4 ++-- official/c65892585.lua | 4 ++-- official/c66011101.lua | 4 ++-- official/c66506689.lua | 4 ++-- official/c66523544.lua | 4 ++-- official/c66547759.lua | 4 ++-- official/c6659193.lua | 4 ++-- official/c66970002.lua | 4 ++-- official/c67173574.lua | 4 ++-- official/c68300121.lua | 4 ++-- official/c68396121.lua | 4 ++-- official/c68597372.lua | 4 ++-- official/c68618157.lua | 6 +++--- official/c68679595.lua | 4 ++-- official/c68836428.lua | 4 ++-- official/c69058960.lua | 4 ++-- official/c69069911.lua | 4 ++-- official/c69170557.lua | 4 ++-- official/c69610924.lua | 4 ++-- official/c69655484.lua | 6 +++--- official/c69757518.lua | 4 ++-- official/c6983839.lua | 4 ++-- official/c69840739.lua | 2 +- official/c698785.lua | 4 ++-- official/c7020743.lua | 4 ++-- official/c70636044.lua | 2 +- official/c71068247.lua | 4 ++-- official/c71612253.lua | 4 ++-- official/c7194917.lua | 4 ++-- official/c72409226.lua | 2 +- official/c72971064.lua | 4 ++-- official/c73082255.lua | 2 +- official/c73289035.lua | 4 ++-- official/c73347079.lua | 4 ++-- official/c73445448.lua | 4 ++-- official/c73659078.lua | 4 ++-- official/c73887236.lua | 4 ++-- official/c73964868.lua | 4 ++-- official/c74294676.lua | 8 ++++---- official/c74371660.lua | 4 ++-- official/c74416224.lua | 4 ++-- official/c74593218.lua | 4 ++-- official/c75083197.lua | 4 ++-- official/c75253697.lua | 4 ++-- official/c75367227.lua | 4 ++-- official/c75402014.lua | 4 ++-- official/c75433814.lua | 4 ++-- official/c75574498.lua | 4 ++-- official/c75620895.lua | 4 ++-- official/c75797046.lua | 4 ++-- official/c75840616.lua | 4 ++-- official/c7593748.lua | 4 ++-- official/c76067258.lua | 4 ++-- official/c7628844.lua | 4 ++-- official/c76290637.lua | 4 ++-- official/c76372778.lua | 4 ++-- official/c76419637.lua | 4 ++-- official/c76589815.lua | 4 ++-- official/c770365.lua | 4 ++-- official/c77205367.lua | 4 ++-- official/c77571454.lua | 4 ++-- official/c77799846.lua | 4 ++-- official/c78135071.lua | 4 ++-- official/c78144171.lua | 2 +- official/c78625448.lua | 4 ++-- official/c79559912.lua | 4 ++-- official/c79625003.lua | 4 ++-- official/c80117527.lua | 4 ++-- official/c80764541.lua | 4 ++-- official/c80796456.lua | 4 ++-- official/c80993256.lua | 2 +- official/c81122844.lua | 6 +++--- official/c8165596.lua | 2 +- official/c81927732.lua | 4 ++-- official/c82308875.lua | 4 ++-- official/c82633039.lua | 6 +++--- official/c82697249.lua | 4 ++-- official/c82944432.lua | 4 ++-- official/c83531441.lua | 4 ++-- official/c83827392.lua | 4 ++-- official/c84013237.lua | 4 ++-- official/c84025439.lua | 4 ++-- official/c84124261.lua | 4 ++-- official/c84224627.lua | 4 ++-- official/c84401683.lua | 4 ++-- official/c84417082.lua | 6 +++--- official/c8491961.lua | 4 ++-- official/c85004150.lua | 4 ++-- official/c85115440.lua | 4 ++-- official/c85121942.lua | 4 ++-- official/c85252081.lua | 6 +++--- official/c85692042.lua | 4 ++-- official/c85747929.lua | 4 ++-- official/c8617563.lua | 6 +++--- official/c86221741.lua | 4 ++-- official/c86238081.lua | 4 ++-- official/c86331741.lua | 4 ++-- official/c86532744.lua | 4 ++-- official/c86848580.lua | 4 ++-- official/c87327776.lua | 4 ++-- official/c87676171.lua | 4 ++-- official/c87911394.lua | 4 ++-- official/c88021907.lua | 4 ++-- official/c88120966.lua | 4 ++-- official/c88177324.lua | 4 ++-- official/c88581108.lua | 4 ++-- official/c88722973.lua | 4 ++-- official/c88754763.lua | 4 ++-- official/c88917691.lua | 4 ++-- official/c88942504.lua | 4 ++-- official/c89477759.lua | 4 ++-- official/c89516305.lua | 8 ++++---- official/c89642993.lua | 4 ++-- official/c90098780.lua | 4 ++-- official/c90162951.lua | 4 ++-- official/c90664857.lua | 2 +- official/c90726340.lua | 4 ++-- official/c90809975.lua | 4 ++-- official/c91279700.lua | 4 ++-- official/c91499077.lua | 4 ++-- official/c9161357.lua | 4 ++-- official/c91895091.lua | 4 ++-- official/c92661479.lua | 4 ++-- official/c9272381.lua | 2 +- official/c92918648.lua | 4 ++-- official/c93039339.lua | 4 ++-- official/c93568288.lua | 4 ++-- official/c93713837.lua | 4 ++-- official/c93730230.lua | 4 ++-- official/c94119480.lua | 4 ++-- official/c94151981.lua | 4 ++-- official/c94380860.lua | 4 ++-- official/c9453320.lua | 2 +- official/c9486959.lua | 4 ++-- official/c95113856.lua | 4 ++-- official/c95134948.lua | 4 ++-- official/c95169481.lua | 4 ++-- official/c95239444.lua | 4 ++-- official/c95243515.lua | 2 +- official/c95442074.lua | 4 ++-- official/c95474755.lua | 4 ++-- official/c95685352.lua | 4 ++-- official/c95992081.lua | 4 ++-- official/c96157835.lua | 4 ++-- official/c96471335.lua | 4 ++-- official/c96592102.lua | 4 ++-- official/c96864105.lua | 4 ++-- official/c97170107.lua | 6 +++--- official/c97403510.lua | 4 ++-- official/c97453744.lua | 4 ++-- official/c97584719.lua | 4 ++-- official/c99469936.lua | 4 ++-- official/c99666430.lua | 4 ++-- pre-release/c101302106.lua | 4 ++-- unofficial/c100000178.lua | 4 ++-- unofficial/c100000179.lua | 4 ++-- unofficial/c100000498.lua | 4 ++-- unofficial/c100000549.lua | 4 ++-- unofficial/c111011803.lua | 4 ++-- unofficial/c111011903.lua | 4 ++-- unofficial/c111011904.lua | 4 ++-- unofficial/c111011905.lua | 4 ++-- unofficial/c511000034.lua | 4 ++-- unofficial/c511000041.lua | 4 ++-- unofficial/c511000183.lua | 4 ++-- unofficial/c511000184.lua | 4 ++-- unofficial/c511000192.lua | 6 +++--- unofficial/c511000230.lua | 4 ++-- unofficial/c511000231.lua | 4 ++-- unofficial/c511000232.lua | 4 ++-- unofficial/c511000233.lua | 4 ++-- unofficial/c511000277.lua | 4 ++-- unofficial/c511000294.lua | 4 ++-- unofficial/c511000296.lua | 4 ++-- unofficial/c511000369.lua | 4 ++-- unofficial/c511000512.lua | 4 ++-- unofficial/c511000513.lua | 4 ++-- unofficial/c511000515.lua | 4 ++-- unofficial/c511000674.lua | 4 ++-- unofficial/c511000675.lua | 4 ++-- unofficial/c511001247.lua | 4 ++-- unofficial/c511001273.lua | 4 ++-- unofficial/c511001275.lua | 4 ++-- unofficial/c511001338.lua | 4 ++-- unofficial/c511001339.lua | 4 ++-- unofficial/c511001371.lua | 4 ++-- unofficial/c511001372.lua | 4 ++-- unofficial/c511001374.lua | 4 ++-- unofficial/c511001376.lua | 6 +++--- unofficial/c511001429.lua | 8 ++++---- unofficial/c511001430.lua | 4 ++-- unofficial/c511001431.lua | 4 ++-- unofficial/c511001432.lua | 4 ++-- unofficial/c511001624.lua | 4 ++-- unofficial/c511001659.lua | 4 ++-- unofficial/c511001706.lua | 4 ++-- unofficial/c511001776.lua | 4 ++-- unofficial/c511001777.lua | 4 ++-- unofficial/c511001778.lua | 2 +- unofficial/c511001779.lua | 4 ++-- unofficial/c511001781.lua | 4 ++-- unofficial/c511001791.lua | 4 ++-- unofficial/c511001997.lua | 4 ++-- unofficial/c511001998.lua | 4 ++-- unofficial/c511001999.lua | 4 ++-- unofficial/c511002001.lua | 4 ++-- unofficial/c511002054.lua | 4 ++-- unofficial/c511002058.lua | 4 ++-- unofficial/c511002059.lua | 6 +++--- unofficial/c511002060.lua | 4 ++-- unofficial/c511002064.lua | 4 ++-- unofficial/c511002075.lua | 4 ++-- unofficial/c511002076.lua | 4 ++-- unofficial/c511002077.lua | 4 ++-- unofficial/c511002079.lua | 4 ++-- unofficial/c511002088.lua | 4 ++-- unofficial/c511002090.lua | 4 ++-- unofficial/c511002091.lua | 4 ++-- unofficial/c511002092.lua | 4 ++-- unofficial/c511002111.lua | 4 ++-- unofficial/c511002112.lua | 4 ++-- unofficial/c511002384.lua | 4 ++-- unofficial/c511002482.lua | 4 ++-- unofficial/c511002543.lua | 4 ++-- unofficial/c511002599.lua | 4 ++-- unofficial/c511002658.lua | 4 ++-- unofficial/c511002727.lua | 4 ++-- unofficial/c511002737.lua | 4 ++-- unofficial/c511002749.lua | 4 ++-- unofficial/c511002762.lua | 4 ++-- unofficial/c511002763.lua | 4 ++-- unofficial/c511002764.lua | 4 ++-- unofficial/c511002778.lua | 4 ++-- unofficial/c511002829.lua | 4 ++-- unofficial/c511002830.lua | 4 ++-- unofficial/c511002839.lua | 4 ++-- unofficial/c511002855.lua | 4 ++-- unofficial/c511002858.lua | 4 ++-- unofficial/c511002864.lua | 4 ++-- unofficial/c511002866.lua | 6 +++--- unofficial/c511002870.lua | 4 ++-- unofficial/c511002871.lua | 4 ++-- unofficial/c511002872.lua | 4 ++-- unofficial/c511002873.lua | 4 ++-- unofficial/c511002896.lua | 4 ++-- unofficial/c511002912.lua | 4 ++-- unofficial/c511002913.lua | 4 ++-- unofficial/c511003224.lua | 4 ++-- unofficial/c511003236.lua | 4 ++-- unofficial/c511009002.lua | 4 ++-- unofficial/c511009026.lua | 2 +- unofficial/c511009062.lua | 4 ++-- unofficial/c511009074.lua | 6 +++--- unofficial/c511009136.lua | 4 ++-- unofficial/c511009321.lua | 4 ++-- unofficial/c511009340.lua | 4 ++-- unofficial/c511009387.lua | 4 ++-- unofficial/c511009462.lua | 4 ++-- unofficial/c511009480.lua | 4 ++-- unofficial/c511009560.lua | 6 +++--- unofficial/c511009567.lua | 4 ++-- unofficial/c511009951.lua | 4 ++-- unofficial/c511010007.lua | 4 ++-- unofficial/c511010009.lua | 4 ++-- unofficial/c511010010.lua | 4 ++-- unofficial/c511010011.lua | 4 ++-- unofficial/c511010020.lua | 4 ++-- unofficial/c511010021.lua | 4 ++-- unofficial/c511010025.lua | 4 ++-- unofficial/c511010032.lua | 4 ++-- unofficial/c511010034.lua | 4 ++-- unofficial/c511010039.lua | 4 ++-- unofficial/c511010047.lua | 4 ++-- unofficial/c511010053.lua | 6 +++--- unofficial/c511010056.lua | 4 ++-- unofficial/c511010064.lua | 4 ++-- unofficial/c511010065.lua | 2 +- unofficial/c511010083.lua | 4 ++-- unofficial/c511010096.lua | 4 ++-- unofficial/c511010103.lua | 4 ++-- unofficial/c511010104.lua | 4 ++-- unofficial/c511010105.lua | 4 ++-- unofficial/c511010107.lua | 6 +++--- unofficial/c511010132.lua | 4 ++-- unofficial/c511010139.lua | 4 ++-- unofficial/c511010165.lua | 4 ++-- unofficial/c511010173.lua | 4 ++-- unofficial/c511010192.lua | 4 ++-- unofficial/c511010196.lua | 4 ++-- unofficial/c511010205.lua | 4 ++-- unofficial/c511010207.lua | 4 ++-- unofficial/c511010238.lua | 4 ++-- unofficial/c511010239.lua | 4 ++-- unofficial/c511010504.lua | 4 ++-- unofficial/c511010515.lua | 4 ++-- unofficial/c511015129.lua | 4 ++-- unofficial/c511020000.lua | 4 ++-- unofficial/c511023000.lua | 4 ++-- unofficial/c511027117.lua | 4 ++-- unofficial/c511600284.lua | 4 ++-- unofficial/c511600298.lua | 4 ++-- unofficial/c511600369.lua | 4 ++-- unofficial/c511600384.lua | 4 ++-- unofficial/c513000017.lua | 4 ++-- unofficial/c513000018.lua | 4 ++-- unofficial/c513000059.lua | 4 ++-- unofficial/c513000060.lua | 4 ++-- unofficial/c513000061.lua | 4 ++-- unofficial/c513000062.lua | 4 ++-- unofficial/c513000063.lua | 4 ++-- unofficial/c700000026.lua | 4 ++-- unofficial/c700000027.lua | 4 ++-- unofficial/c810000081.lua | 4 ++-- 595 files changed, 1198 insertions(+), 1198 deletions(-) diff --git a/official/c10000030.lua b/official/c10000030.lua index cd5e1ddec8..12fe23edd7 100644 --- a/official/c10000030.lua +++ b/official/c10000030.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.effcost) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -70,4 +70,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Special Summon 1 monster from your opponent's GY Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c10389142.lua b/official/c10389142.lua index a1676abb80..e896be7a38 100644 --- a/official/c10389142.lua +++ b/official/c10389142.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_names={10389143} s.xyz_number=42 @@ -81,4 +81,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tg=g:Filter(s.desfilter,nil,e:GetLabel()) g:DeleteGroup() Duel.Destroy(tg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c10406322.lua b/official/c10406322.lua index 5801e1519c..a8f82219d2 100644 --- a/official/c10406322.lua +++ b/official/c10406322.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end @@ -75,4 +75,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) else Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c10443957.lua b/official/c10443957.lua index 3c7f0b50fa..84d5aeb1c6 100644 --- a/official/c10443957.lua +++ b/official/c10443957.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={58069384} function s.mfilter(c,xyz,sumtype,tp) @@ -83,4 +83,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c10613952.lua b/official/c10613952.lua index b919c4f2c7..9043ac75fb 100644 --- a/official/c10613952.lua +++ b/official/c10613952.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --spsummon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -102,4 +102,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c10666000.lua b/official/c10666000.lua index 22c67568e9..6ff92790ce 100644 --- a/official/c10666000.lua +++ b/official/c10666000.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=1 function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c10678778.lua b/official/c10678778.lua index 87c7bafbeb..9b60ada2a3 100644 --- a/official/c10678778.lua +++ b/official/c10678778.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.rmfilter(c) return c:IsFacedown() and c:IsAbleToRemove() @@ -76,4 +76,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsType,ctype),tp,0,LOCATION_MZONE,1,1,nil) Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c11398059.lua b/official/c11398059.lua index 1317112bbb..ad958d0b3e 100644 --- a/official/c11398059.lua +++ b/official/c11398059.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsRace(RACE_REPTILE) and c:IsAbleToHand() diff --git a/official/c11411223.lua b/official/c11411223.lua index 1b54a70ac9..523dc7e172 100644 --- a/official/c11411223.lua +++ b/official/c11411223.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=10 function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -31,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Draw(tp,1,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c11441009.lua b/official/c11441009.lua index aff52a33e6..dbba3cb0f9 100644 --- a/official/c11441009.lua +++ b/official/c11441009.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.AND(Cost.PayLP(600),Cost.Detach(1))) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate the activation of another monster's effect, and if you do, destroy that monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c11510448.lua b/official/c11510448.lua index 991536a6e5..db155c38e6 100644 --- a/official/c11510448.lua +++ b/official/c11510448.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) @@ -73,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc1 and tc1:IsFaceup() and not tc1:IsImmuneToEffect(e) and #g2>0 then Duel.Overlay(tc1,g2) end -end \ No newline at end of file +end diff --git a/official/c11522979.lua b/official/c11522979.lua index e7118052d6..3add83fc59 100644 --- a/official/c11522979.lua +++ b/official/c11522979.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=69 s.listed_names={2407234} @@ -77,4 +77,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end \ No newline at end of file +end diff --git a/official/c11646785.lua b/official/c11646785.lua index 4268f64f82..d5a8b58aab 100644 --- a/official/c11646785.lua +++ b/official/c11646785.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum Green Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) @@ -76,4 +76,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c12014404.lua b/official/c12014404.lua index 324e5e60e8..ecc61bfbc5 100644 --- a/official/c12014404.lua +++ b/official/c12014404.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -60,4 +60,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) bc:RegisterEffect(e2) c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) -end \ No newline at end of file +end diff --git a/official/c12219047.lua b/official/c12219047.lua index b5f1d58bce..6c9a71a517 100644 --- a/official/c12219047.lua +++ b/official/c12219047.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) local e2=e1:Clone() e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) @@ -75,4 +75,4 @@ end function s.condition2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_THE_PHANTOM_KNIGHTS) and aux.StatChangeDamageStepCondition() -end \ No newline at end of file +end diff --git a/official/c1249315.lua b/official/c1249315.lua index 4c633897ee..62466fd3c4 100644 --- a/official/c1249315.lua +++ b/official/c1249315.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thfilter(c) return c:IsMonster() and c:IsAbleToHand() diff --git a/official/c12533811.lua b/official/c12533811.lua index fdb636bb14..3d1e64f381 100644 --- a/official/c12533811.lua +++ b/official/c12533811.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPhase(PHASE_MAIN1) @@ -38,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c12615446.lua b/official/c12615446.lua index cfb7f0c852..0a5160ca43 100644 --- a/official/c12615446.lua +++ b/official/c12615446.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Attach local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -83,4 +83,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Overlay(c,tc) end -end \ No newline at end of file +end diff --git a/official/c12632096.lua b/official/c12632096.lua index 1de8c0513e..0d5fd1594b 100644 --- a/official/c12632096.lua +++ b/official/c12632096.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.ctcost) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CIPHER} s.listed_names={id} @@ -73,4 +73,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c1269512.lua b/official/c1269512.lua index 9bddcb5720..b7fe5e17be 100644 --- a/official/c1269512.lua +++ b/official/c1269512.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCondition(s.exatkcon) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetOperation(function() Duel.ChainAttack() end) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listes_names={id} function s.ovfilter(c,tp,xyzc) @@ -71,4 +71,4 @@ end function s.exatkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()==c and c:CanChainAttack() and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) -end \ No newline at end of file +end diff --git a/official/c13030280.lua b/official/c13030280.lua index 02493d8074..f5459ac8cb 100644 --- a/official/c13030280.lua +++ b/official/c13030280.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={77631175} --"Comics Hero King Arthur" function s.valcon(e,re,r,rp) @@ -48,4 +48,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToEffect(e) and Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)>0 then Duel.Damage(1-tp,bc:GetBaseAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c13183454.lua b/official/c13183454.lua index 3b740e4ad4..4df5914d67 100644 --- a/official/c13183454.lua +++ b/official/c13183454.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c14152862.lua b/official/c14152862.lua index bb00dc29a3..fa73e44bbd 100644 --- a/official/c14152862.lua +++ b/official/c14152862.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end @@ -35,4 +35,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c1426714.lua b/official/c1426714.lua index 273edf2086..f301354647 100644 --- a/official/c1426714.lua +++ b/official/c1426714.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be battle target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -60,4 +60,4 @@ function s.atkcon(e) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_ONFIELD,0,nil,id+1)*500 -end \ No newline at end of file +end diff --git a/official/c14301396.lua b/official/c14301396.lua index dcf07f08ba..f80385782c 100644 --- a/official/c14301396.lua +++ b/official/c14301396.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Equip this card to another monster you control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -116,4 +116,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c14306092.lua b/official/c14306092.lua index 9afb4d0f7b..91d70cfb87 100644 --- a/official/c14306092.lua +++ b/official/c14306092.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atkup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.atkcon(e) end function s.atkval(e,c) return c:GetCounter(0x2e)*1000 -end \ No newline at end of file +end diff --git a/official/c15092394.lua b/official/c15092394.lua index 11d42c0c8c..4f5a5f86ff 100644 --- a/official/c15092394.lua +++ b/official/c15092394.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c15232745.lua b/official/c15232745.lua index 8a3a228670..076d848979 100644 --- a/official/c15232745.lua +++ b/official/c15232745.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=1 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c15561463.lua b/official/c15561463.lua index 0a387e7f90..56161568e5 100644 --- a/official/c15561463.lua +++ b/official/c15561463.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -29,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c15862758.lua b/official/c15862758.lua index 0c5baa5cb0..04ff5b7f7d 100644 --- a/official/c15862758.lua +++ b/official/c15862758.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) e7:SetCost(Cost.Detach(1)) e7:SetTarget(s.natg) e7:SetOperation(s.naop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) end s.listed_names={89477759} s.xyz_number=1000 @@ -81,4 +81,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then Duel.Recover(tp,Duel.GetAttacker():GetAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c15914410.lua b/official/c15914410.lua index b297f28065..2f47530c7a 100644 --- a/official/c15914410.lua +++ b/official/c15914410.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.postg) e1:SetOperation(s.posop) e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() @@ -46,4 +46,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c15939229.lua b/official/c15939229.lua index 2fe18afc19..ec5f20ec0f 100644 --- a/official/c15939229.lua +++ b/official/c15939229.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Set local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.settg) e3:SetOperation(s.setop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.listed_series={SET_DARK_CONTRACT,SET_DD} @@ -87,4 +87,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end \ No newline at end of file +end diff --git a/official/c16037007.lua b/official/c16037007.lua index ace2180c33..3eb2ec263b 100644 --- a/official/c16037007.lua +++ b/official/c16037007.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=74 function s.discon(e,tp,eg,ep,ev,re,r,rp) @@ -44,4 +44,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c16110708.lua b/official/c16110708.lua index 8826431760..901b983493 100644 --- a/official/c16110708.lua +++ b/official/c16110708.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCondition(function(e) return not e:GetHandler():IsBaseAttack(1500) end) e3:SetCost(Cost.Detach(1,1)) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={63767246} --"Number 38: Hope Harbinger Dragon Titanic Galaxy" s.xyz_number=38 @@ -81,4 +81,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c16195942.lua b/official/c16195942.lua index 35bf65a1b6..22d5e4ae8d 100644 --- a/official/c16195942.lua +++ b/official/c16195942.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) 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(1-tp) and chkc:HasNonZeroAttack() end @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/official/c1621413.lua b/official/c1621413.lua index cb50bd1ada..5b6605bf0c 100644 --- a/official/c1621413.lua +++ b/official/c1621413.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate monster effect activation and special summon 1 Xyz monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={16195942} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -90,4 +90,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end diff --git a/official/c1639384.lua b/official/c1639384.lua index b1f24d9901..c8d01f8e68 100644 --- a/official/c1639384.lua +++ b/official/c1639384.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -59,4 +59,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end \ No newline at end of file +end diff --git a/official/c16643334.lua b/official/c16643334.lua index 6f241c8f24..67ddd0c6c7 100644 --- a/official/c16643334.lua +++ b/official/c16643334.lua @@ -49,7 +49,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_PHOTON} s.listed_names={CARD_GALAXYEYES_P_DRAGON} @@ -94,4 +94,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c16691074.lua b/official/c16691074.lua index f038719211..c9e8c0ca32 100644 --- a/official/c16691074.lua +++ b/official/c16691074.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special summon 1 "Odd-Eyes" monster from the Extra Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c16699558.lua b/official/c16699558.lua index f2ccf1d2de..80cdd3eff5 100644 --- a/official/c16699558.lua +++ b/official/c16699558.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) --It gains 1000 ATK tc:UpdateAttack(1000,RESET_EVENT|RESETS_STANDARD,e:GetHandler()) end -end \ No newline at end of file +end diff --git a/official/c1688285.lua b/official/c1688285.lua index ed9baabfc2..17ae93a921 100644 --- a/official/c1688285.lua +++ b/official/c1688285.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Attach 1 monster to this card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -88,4 +88,4 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c16955631.lua b/official/c16955631.lua index b9cb961e9e..9759a71e62 100644 --- a/official/c16955631.lua +++ b/official/c16955631.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_MIMIGHOUL} function s.thfilter(c) @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetOperatedGroup():GetCount() Duel.Damage(1-tp,ct*1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c17016362.lua b/official/c17016362.lua index 939ac0eebb..61f8971a73 100644 --- a/official/c17016362.lua +++ b/official/c17016362.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.mttg) e2:SetOperation(s.mtop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special summon "Performage" monster from deck local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -114,4 +114,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c1828513.lua b/official/c1828513.lua index 17ca930212..3ee740717a 100644 --- a/official/c1828513.lua +++ b/official/c1828513.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_SIX_SAMURAI} function s.filter(c) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c18326736.lua b/official/c18326736.lua index 5c0c76b7ef..ace1f31edb 100644 --- a/official/c18326736.lua +++ b/official/c18326736.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --turn skip local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.skipcost) e2:SetTarget(s.skiptg) e2:SetOperation(s.skipop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -106,4 +106,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c18511599.lua b/official/c18511599.lua index 648d1562db..98ed599f66 100644 --- a/official/c18511599.lua +++ b/official/c18511599.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indcon(e) return e:GetHandler():GetOverlayCount()~=0 @@ -41,4 +41,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c18897163.lua b/official/c18897163.lua index 514c5d4103..c1cceedad4 100644 --- a/official/c18897163.lua +++ b/official/c18897163.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --move to the pendulum zone local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,3)) @@ -124,4 +124,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c18963306.lua b/official/c18963306.lua index 5dd1d029c3..74bfd82f79 100644 --- a/official/c18963306.lua +++ b/official/c18963306.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() @@ -77,4 +77,4 @@ function s.concon(e) end function s.atktg(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c19333131.lua b/official/c19333131.lua index 9c2ced525b..0e04401d63 100644 --- a/official/c19333131.lua +++ b/official/c19333131.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_NINJA} s.xyz_number=12 @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.etarget(e,c) return c:IsFaceup() and c:IsSetCard(SET_NINJA) -end \ No newline at end of file +end diff --git a/official/c19369609.lua b/official/c19369609.lua index 1fcbfe0dbe..7c8466d729 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --ATK gain on battle local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCondition(s.atkcon) e3:SetCost(s.atkcost) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end --ATK gain function s.atkval(e,c) diff --git a/official/c19684740.lua b/official/c19684740.lua index 6c73c99583..3234ee8210 100644 --- a/official/c19684740.lua +++ b/official/c19684740.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end @@ -29,4 +29,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoHand(g,nil,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c19891310.lua b/official/c19891310.lua index c1d929d61a..281af953ad 100644 --- a/official/c19891310.lua +++ b/official/c19891310.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --add to hand local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) @@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c1992816.lua b/official/c1992816.lua index 380b4c963e..42e9ddce76 100644 --- a/official/c1992816.lua +++ b/official/c1992816.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCondition(s.dacon) e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.daop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=9 function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -90,4 +90,4 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c20145685.lua b/official/c20145685.lua index 4edd87dc32..748462eb17 100644 --- a/official/c20145685.lua +++ b/official/c20145685.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(s.thcost) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Double battle damage local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) @@ -68,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(thg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,thg) end -end \ No newline at end of file +end diff --git a/official/c20343502.lua b/official/c20343502.lua index 43aafd38bb..3d83480bed 100644 --- a/official/c20343502.lua +++ b/official/c20343502.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetTarget(s.immtg) e1:SetOperation(s.immop) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Shuffle up to 2 cards from either GY into deck local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK) @@ -77,4 +77,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c20563387.lua b/official/c20563387.lua index b90558032a..d524831e05 100644 --- a/official/c20563387.lua +++ b/official/c20563387.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=80 s.listed_names={93568288} @@ -90,4 +90,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c2061963.lua b/official/c2061963.lua index 8f6e881edd..c3752b7b8c 100644 --- a/official/c2061963.lua +++ b/official/c2061963.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetTarget(s.decktg) e2:SetOperation(s.deckop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=104 function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) @@ -54,4 +54,4 @@ end function s.deckop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.DiscardDeck(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c20785975.lua b/official/c20785975.lua index eb3909e518..7bb0378ea0 100644 --- a/official/c20785975.lua +++ b/official/c20785975.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=103 s.listed_names={94380860} @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c2091298.lua b/official/c2091298.lua index fb423447de..92a1a33146 100644 --- a/official/c2091298.lua +++ b/official/c2091298.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c21044178.lua b/official/c21044178.lua index ad21f6c984..035a490846 100644 --- a/official/c21044178.lua +++ b/official/c21044178.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.aclimit(e,re,tp) return re:GetActivateLocation()==LOCATION_GRAVE -end \ No newline at end of file +end diff --git a/official/c21065189.lua b/official/c21065189.lua index f3e6388329..e9f5e92ae7 100644 --- a/official/c21065189.lua +++ b/official/c21065189.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/official/c21223277.lua b/official/c21223277.lua index fb44ec6e86..8c70156481 100644 --- a/official/c21223277.lua +++ b/official/c21223277.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -74,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c21313376.lua b/official/c21313376.lua index 973bcf6fed..712ed3a6ba 100644 --- a/official/c21313376.lua +++ b/official/c21313376.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=14 function s.refcon(e,re,val,r,rp,rc) @@ -39,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local atk=e:GetHandler():GetBattleTarget():GetBaseAttack() local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttackBelow,atk),tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c21501505.lua b/official/c21501505.lua index 5ee053979f..918dbd0323 100644 --- a/official/c21501505.lua +++ b/official/c21501505.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangeTargetCard(ev,Group.FromCards(tc)) end -end \ No newline at end of file +end diff --git a/official/c21521304.lua b/official/c21521304.lua index 9ab2fc862c..6f16be7bf3 100644 --- a/official/c21521304.lua +++ b/official/c21521304.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not tc2:IsRelateToEffect(e) or Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)==0 then return end Duel.BreakEffect() Duel.Recover(tp,1250,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c21858819.lua b/official/c21858819.lua index 3230ceffc3..c05867296d 100644 --- a/official/c21858819.lua +++ b/official/c21858819.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --recover local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_RECOVER) @@ -62,4 +62,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c2191144.lua b/official/c2191144.lua index 8677a347ca..043b3b942e 100644 --- a/official/c2191144.lua +++ b/official/c2191144.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetOverlayCount(tp,1,1)>1 end @@ -33,4 +33,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c22110647.lua b/official/c22110647.lua index f94e5ff2a9..68b3e48f7b 100644 --- a/official/c22110647.lua +++ b/official/c22110647.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Destroy 1 card on the field local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -99,4 +99,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c22653490.lua b/official/c22653490.lua index 2fa33afe9d..bbe8a2d6ad 100644 --- a/official/c22653490.lua +++ b/official/c22653490.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg2) e2:SetOperation(s.tdop2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.tdcon1(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() @@ -62,4 +62,4 @@ function s.tdop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup() then Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c23454876.lua b/official/c23454876.lua index 77dea5d2cd..84a453b21d 100644 --- a/official/c23454876.lua +++ b/official/c23454876.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={51960178} function s.drcon(e,tp,eg,ep,ev,re,r,rp) @@ -57,4 +57,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*400 Duel.Damage(p,dam,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c23603403.lua b/official/c23603403.lua index 6f24d5affb..8405f62bc2 100644 --- a/official/c23603403.lua +++ b/official/c23603403.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_RAIDRAPTOR} function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -87,4 +87,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(ct*-800) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c23649496.lua b/official/c23649496.lua index fd48c45fb6..de631690f9 100644 --- a/official/c23649496.lua +++ b/official/c23649496.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Send 2 "Heraldic Beast" monsters from your Deck to the Graveyard. local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SendtoGrave(sg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c23776077.lua b/official/c23776077.lua index 1d62ce87ef..8589865eb7 100644 --- a/official/c23776077.lua +++ b/official/c23776077.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk/def local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ function s.tgcon(e) end function s.indcon(e) return e:GetHandler():GetOverlayCount()==5 -end \ No newline at end of file +end diff --git a/official/c23848752.lua b/official/c23848752.lua index 987a4b77fd..5e0afbdb2e 100644 --- a/official/c23848752.lua +++ b/official/c23848752.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Gain LP equal to the ATK of a battling monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -88,4 +88,4 @@ function s.rcop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local d=tc:GetAttack()/2 Duel.Recover(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c24701066.lua b/official/c24701066.lua index bfb159598c..bae0777497 100644 --- a/official/c24701066.lua +++ b/official/c24701066.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtgtg) e2:SetOperation(s.thtgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon this card from the GY in Defense Position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c2530830.lua b/official/c2530830.lua index a152cb6806..a2fdf102ba 100644 --- a/official/c2530830.lua +++ b/official/c2530830.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --special summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c25341652.lua b/official/c25341652.lua index 29f1951f73..126b6fd43a 100644 --- a/official/c25341652.lua +++ b/official/c25341652.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction replacement for a "Djinn" monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -63,4 +63,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT) end g:DeleteGroup() -end \ No newline at end of file +end diff --git a/official/c26096328.lua b/official/c26096328.lua index cdffc8e8ef..029f3aecc4 100644 --- a/official/c26096328.lua +++ b/official/c26096328.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --multi attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -61,4 +61,4 @@ end function s.raval(e,c) local oc=e:GetHandler():GetOverlayCount() return math.max(0,oc) -end \ No newline at end of file +end diff --git a/official/c26211048.lua b/official/c26211048.lua index 6c796b9e72..26028a6f23 100644 --- a/official/c26211048.lua +++ b/official/c26211048.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,function(ec,_,tp) return ec:IsControler(1-tp) end,s.equipop,e1) end function s.eqfilter(c) @@ -58,4 +58,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or not tc:IsMonster() then return end if not s.equipop(c,e,tp,tc) then return end -end \ No newline at end of file +end diff --git a/official/c26329679.lua b/official/c26329679.lua index d43fcd4bd6..50994ab702 100644 --- a/official/c26329679.lua +++ b/official/c26329679.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) return te:IsSpellTrapEffect() -end \ No newline at end of file +end diff --git a/official/c26556950.lua b/official/c26556950.lua index bf632a412d..7cad760932 100644 --- a/official/c26556950.lua +++ b/official/c26556950.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.xyz_number=84 function s.ovfilter(c,tp,xyzc) @@ -75,4 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,c:GetDefense()) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c26563200.lua b/official/c26563200.lua index 6f502f56f9..e8f784f049 100644 --- a/official/c26563200.lua +++ b/official/c26563200.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_DJINN} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -38,4 +38,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c2665273.lua b/official/c2665273.lua index 12cbcb2267..b7a923dad3 100644 --- a/official/c2665273.lua +++ b/official/c2665273.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.atkval(e,c) return c:GetOverlayCount()*1000 @@ -60,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,tc,true) end end -end \ No newline at end of file +end diff --git a/official/c26988374.lua b/official/c26988374.lua index 4fcb3d9b43..533d609ab5 100644 --- a/official/c26988374.lua +++ b/official/c26988374.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Detach 1 material and banish local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c27069566.lua b/official/c27069566.lua index 419c87e0b1..0e95069842 100644 --- a/official/c27069566.lua +++ b/official/c27069566.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.rmvtg) e1:SetOperation(s.rmvop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 2 "Datascape" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if sg and #sg==2 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c27337596.lua b/official/c27337596.lua index 5c610efe1e..9fb178e6bc 100644 --- a/official/c27337596.lua +++ b/official/c27337596.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c27420823.lua b/official/c27420823.lua index e7480d8eee..6d354dce1f 100644 --- a/official/c27420823.lua +++ b/official/c27420823.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsMonsterEffect() end) --Negate an opponent's monster effect activated in the hand or GY local e2=Effect.CreateEffect(c) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_K9} function s.thfilter(c) @@ -68,4 +68,4 @@ end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) -end \ No newline at end of file +end diff --git a/official/c27552504.lua b/official/c27552504.lua index c136a357b1..a71e4b4bec 100644 --- a/official/c27552504.lua +++ b/official/c27552504.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c2766877.lua b/official/c2766877.lua index 1529cb2d99..aefb7f9989 100644 --- a/official/c2766877.lua +++ b/official/c2766877.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c28150174.lua b/official/c28150174.lua index a517e2f3cc..fedb1b3813 100644 --- a/official/c28150174.lua +++ b/official/c28150174.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefensePos() end @@ -38,4 +38,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c28290705.lua b/official/c28290705.lua index ebecc15b7d..3685adc42a 100644 --- a/official/c28290705.lua +++ b/official/c28290705.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_EARTH),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -37,4 +37,4 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c28346136.lua b/official/c28346136.lua index 8fd0d48cca..401714df3d 100644 --- a/official/c28346136.lua +++ b/official/c28346136.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.cannottgtg) e1:SetOperation(s.cannottgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return 1 Rank 9 or lower Dragon Xyz Monster from your GY to the Extra Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -90,4 +90,4 @@ function s.texspop(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end \ No newline at end of file +end diff --git a/official/c28400508.lua b/official/c28400508.lua index 1ae792bf80..4d746349cb 100644 --- a/official/c28400508.lua +++ b/official/c28400508.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.listed_names={id} @@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return e:GetLabelObject()~=c -end \ No newline at end of file +end diff --git a/official/c28781003.lua b/official/c28781003.lua index e031a866d9..7777115168 100644 --- a/official/c28781003.lua +++ b/official/c28781003.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR,SET_XYZ_DRAGON} function s.spfilter(c,e,tp,mc,rk,pg) @@ -69,4 +69,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sc=e:GetLabelObject() Duel.Destroy(sc,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c28912357.lua b/official/c28912357.lua index ecc5b58e71..1b5ee1018a 100644 --- a/official/c28912357.lua +++ b/official/c28912357.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -64,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c2896663.lua b/official/c2896663.lua index d311bb39b6..ef0392bdf1 100644 --- a/official/c2896663.lua +++ b/official/c2896663.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Equip this card on the field to 1 Utopia monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -120,4 +120,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if #spg>0 then Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c28981598.lua b/official/c28981598.lua index 74f8686edb..b244890a18 100644 --- a/official/c28981598.lua +++ b/official/c28981598.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.tgfilter(e,c) return c:IsSummonLocation(LOCATION_GRAVE) and c~=e:GetHandler() @@ -48,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c29085954.lua b/official/c29085954.lua index f102b67401..06b8ac5820 100644 --- a/official/c29085954.lua +++ b/official/c29085954.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_NUMBER} s.xyz_number=78 @@ -80,4 +80,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c29208536.lua b/official/c29208536.lua index eab76183a1..7278e94cba 100644 --- a/official/c29208536.lua +++ b/official/c29208536.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannnot activate local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) diff --git a/official/c29423048.lua b/official/c29423048.lua index 1380b47d2c..0b38e35c05 100644 --- a/official/c29423048.lua +++ b/official/c29423048.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtgtg) e1:SetOperation(s.thtgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c29510428.lua b/official/c29510428.lua index 088d585ce9..5241db2b3e 100644 --- a/official/c29510428.lua +++ b/official/c29510428.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Add to hand or Special Summon 1 Level 5 monster from the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -86,4 +86,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end, aux.Stringid(id,5) ) -end \ No newline at end of file +end diff --git a/official/c29515122.lua b/official/c29515122.lua index 654de8c80d..0cd592b964 100644 --- a/official/c29515122.lua +++ b/official/c29515122.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,3) end @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c29669359.lua b/official/c29669359.lua index 87c79a78e0..7b7768a760 100644 --- a/official/c29669359.lua +++ b/official/c29669359.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=61 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c2978414.lua b/official/c2978414.lua index c2a1b59c23..d9b23d3cb8 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --effect limit local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetCondition(s.condition) e3:SetCost(s.cost) e3:SetOperation(s.efop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=46 function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -93,4 +93,4 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) end function s.actfilter(e,c) return c:IsRace(RACE_DRAGON) -end \ No newline at end of file +end diff --git a/official/c30095833.lua b/official/c30095833.lua index 02039498ab..18deeb5ea5 100644 --- a/official/c30095833.lua +++ b/official/c30095833.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Place this card in the Pendulum Zone local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) @@ -101,4 +101,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c30100551.lua b/official/c30100551.lua index 83941f5819..3efb7911b8 100644 --- a/official/c30100551.lua +++ b/official/c30100551.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --discard deck & destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DECKDES+CATEGORY_DESTROY) @@ -64,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sdg) Duel.Destroy(sdg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c30128445.lua b/official/c30128445.lua index 4be10c761b..053df4bf73 100644 --- a/official/c30128445.lua +++ b/official/c30128445.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Shuffle 1 Normal Monster from your GY into the Deck and Special Summon this card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c30350202.lua b/official/c30350202.lua index 636b44916d..9a0715d772 100644 --- a/official/c30350202.lua +++ b/official/c30350202.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_DRAGON_RULER} function s.tdfilter(c,e,tp) @@ -81,4 +81,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c30439101.lua b/official/c30439101.lua index 752106d95a..39a239f402 100644 --- a/official/c30439101.lua +++ b/official/c30439101.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Opponent's targeted monster cannot attack, also negate its effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -88,4 +88,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c30741334.lua b/official/c30741334.lua index 832a4a818d..ddaf2c76a9 100644 --- a/official/c30741334.lua +++ b/official/c30741334.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end \ No newline at end of file +end diff --git a/official/c31123642.lua b/official/c31123642.lua index 91358a3167..f7e286b636 100644 --- a/official/c31123642.lua +++ b/official/c31123642.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction replacement for a "Utopia" or "Utopic" Xyz monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -88,4 +88,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) -end \ No newline at end of file +end diff --git a/official/c31320433.lua b/official/c31320433.lua index f65b171d6f..c8752a4d26 100644 --- a/official/c31320433.lua +++ b/official/c31320433.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.datg) e2:SetOperation(s.daop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=47 function s.matfilter(c) @@ -82,4 +82,4 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c31437713.lua b/official/c31437713.lua index bf41d49f48..553608a291 100644 --- a/official/c31437713.lua +++ b/official/c31437713.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.condition) e2:SetCost(s.cost) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=82 function s.filter(c) @@ -64,4 +64,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c31539614.lua b/official/c31539614.lua index f3921e5d8e..79215ed438 100644 --- a/official/c31539614.lua +++ b/official/c31539614.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.changeatkdeftg) e1:SetOperation(s.changeatkdefop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Make a monster(s) Special Summoned to your field gain 900 ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c31563350.lua b/official/c31563350.lua index 72316d617f..d3b609df1f 100644 --- a/official/c31563350.lua +++ b/official/c31563350.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1) end function s.eqval(ec,c,tp) @@ -54,4 +54,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return e:GetOwner()==c -end \ No newline at end of file +end diff --git a/official/c31801517.lua b/official/c31801517.lua index cfeb76a5e2..4cc606a16d 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -103,4 +103,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end function s.rdcon(e) return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) -end \ No newline at end of file +end diff --git a/official/c32003338.lua b/official/c32003338.lua index cc6a20b7ca..0dcb1b8901 100644 --- a/official/c32003338.lua +++ b/official/c32003338.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=34 function s.filter(c) @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end \ No newline at end of file +end diff --git a/official/c32224143.lua b/official/c32224143.lua index ffcf830219..fdfd150e22 100644 --- a/official/c32224143.lua +++ b/official/c32224143.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be battle target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -84,4 +84,4 @@ function s.disop(e,tp) end function s.atkcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end \ No newline at end of file +end diff --git a/official/c32302078.lua b/official/c32302078.lua index 839a889263..284fa3e059 100644 --- a/official/c32302078.lua +++ b/official/c32302078.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon 1 monster from your opponent's GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -40,7 +40,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) local g=Group.CreateGroup() g:KeepAlive() e3:SetLabelObject(g) diff --git a/official/c32446630.lua b/official/c32446630.lua index 246f427e3a..5b5deaff62 100644 --- a/official/c32446630.lua +++ b/official/c32446630.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=43 s.listed_names={56051086,32446631} @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_SET_DEFENSE) token:RegisterEffect(e2) Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c32530043.lua b/official/c32530043.lua index 298dd48398..329b908be5 100644 --- a/official/c32530043.lua +++ b/official/c32530043.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thfilter(c) return c:IsRace(RACE_ROCK) and c:IsAbleToHand() @@ -60,4 +60,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end \ No newline at end of file +end diff --git a/official/c32559361.lua b/official/c32559361.lua index 093d22323f..d34229844b 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,s.mxmc,s.slwc)) e3:SetTarget(s.damtg2) e3:SetOperation(s.damop2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=9 s.listed_names={1992816} @@ -82,4 +82,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c3292267.lua b/official/c3292267.lua index 32323e3304..737214d24e 100644 --- a/official/c3292267.lua +++ b/official/c3292267.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.tfilter(c,tp) return (c:IsOnField() or c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) and c:IsControler(tp) @@ -40,4 +40,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c33776843.lua b/official/c33776843.lua index 554f5e5a18..8f53569235 100644 --- a/official/c33776843.lua +++ b/official/c33776843.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=15 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c33779875.lua b/official/c33779875.lua index de7802b76c..4a4a3de3c3 100644 --- a/official/c33779875.lua +++ b/official/c33779875.lua @@ -18,13 +18,13 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.trtg) e1:SetOperation(s.trop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) local e2=e1:Clone() e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetCondition(s.quickcon) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Increase ATK when a monster is tributed local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -69,4 +69,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(200*ct) c:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c33909817.lua b/official/c33909817.lua index 60c03f4054..1e3d78bdd2 100644 --- a/official/c33909817.lua +++ b/official/c33909817.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 1 "Sylvan" monster from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c34086406.lua b/official/c34086406.lua index e17e0c27e4..b1b7497b83 100644 --- a/official/c34086406.lua +++ b/official/c34086406.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) @@ -54,4 +54,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,1) end end -end \ No newline at end of file +end diff --git a/official/c34481518.lua b/official/c34481518.lua index e25187aadf..629cfb99a5 100644 --- a/official/c34481518.lua +++ b/official/c34481518.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy 1 card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c34909328.lua b/official/c34909328.lua index 32da3cb088..4f3d9c55b5 100644 --- a/official/c34909328.lua +++ b/official/c34909328.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Attach 1 monster from your GY to this card as material local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c34945480.lua b/official/c34945480.lua index 0c1cff9f54..ea54597d7f 100644 --- a/official/c34945480.lua +++ b/official/c34945480.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_OUTER_ENTITY} function s.ovfilter(c,tp,xyzc) @@ -70,4 +70,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c3594985.lua b/official/c3594985.lua index 9efbedfeee..9b98068f36 100644 --- a/official/c3594985.lua +++ b/official/c3594985.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Place this card in the Pendulum Zone local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -111,4 +111,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c359563.lua b/official/c359563.lua index 630039081a..78b4718768 100644 --- a/official/c359563.lua +++ b/official/c359563.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsCanTurnSet() and c:IsSummonPlayer(1-tp) and (not e or c:IsRelateToEffect(e)) @@ -28,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) -end \ No newline at end of file +end diff --git a/official/c36076683.lua b/official/c36076683.lua index 298a89fa2d..2b15fa5928 100644 --- a/official/c36076683.lua +++ b/official/c36076683.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=73 function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -37,4 +37,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c36757171.lua b/official/c36757171.lua index 8aeb04f5cf..f97f1ba615 100644 --- a/official/c36757171.lua +++ b/official/c36757171.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_LSWARM} function s.filter(c) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end \ No newline at end of file +end diff --git a/official/c36776089.lua b/official/c36776089.lua index 9da006987f..8458917b97 100644 --- a/official/c36776089.lua +++ b/official/c36776089.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rettg) e2:SetOperation(s.retop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.incon(e) return e:GetHandler():GetOverlayCount()>0 @@ -43,4 +43,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.SendtoHand(bc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c37057743.lua b/official/c37057743.lua index 19a3053149..fce1877d1b 100644 --- a/official/c37057743.lua +++ b/official/c37057743.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() @@ -47,4 +47,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c) return c:IsCode(e:GetLabel()) -end \ No newline at end of file +end diff --git a/official/c37164373.lua b/official/c37164373.lua index 77c6bddefd..8252cd4a8a 100644 --- a/official/c37164373.lua +++ b/official/c37164373.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_MADOLCHE} function s.filter(c) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(rg) Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c37279508.lua b/official/c37279508.lua index 5cbf3ee6a4..923e81f3fb 100644 --- a/official/c37279508.lua +++ b/official/c37279508.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -66,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c3743515.lua b/official/c3743515.lua index f20a667381..75e7f9481b 100644 --- a/official/c3743515.lua +++ b/official/c3743515.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy this card, and if you do, your Dinosaur monster battling gains 2000 ATK until the end of the Battle Phase local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -83,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c3758046.lua b/official/c3758046.lua index 056a2ba8d4..f59e4ecad9 100644 --- a/official/c3758046.lua +++ b/official/c3758046.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.regtg) e1:SetOperation(s.regop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Search 1 "Dark Contract" card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -94,4 +94,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c37649320.lua b/official/c37649320.lua index 9152113399..e1180531e0 100644 --- a/official/c37649320.lua +++ b/official/c37649320.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --"Paleozoic" Trap cards can be activated from the hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c3790062.lua b/official/c3790062.lua index 8bd75a1073..600b430bdf 100644 --- a/official/c3790062.lua +++ b/official/c3790062.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=65 function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) then Duel.Damage(1-tp,500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c37926346.lua b/official/c37926346.lua index 3cbadb2268..da21bdc2c8 100644 --- a/official/c37926346.lua +++ b/official/c37926346.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsLevelAbove(5) @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local g=eg:Filter(s.filter,nil) Duel.NegateSummon(g) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c38026562.lua b/official/c38026562.lua index 8b3046c580..bc222c4a10 100644 --- a/official/c38026562.lua +++ b/official/c38026562.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.tgtg) e4:SetOperation(s.tgop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end function s.spfilter(c,e,tp) return c:IsType(TYPE_GEMINI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -87,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg,true) Duel.SendtoGrave(sg,REASON_RULE,PLAYER_NONE,1-tp) end -end \ No newline at end of file +end diff --git a/official/c3814632.lua b/official/c3814632.lua index 8f30232ec7..d51645a3bd 100644 --- a/official/c3814632.lua +++ b/official/c3814632.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.AND(Cost.Detach(1),s.descost)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -43,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c38180759.lua b/official/c38180759.lua index cf05487765..1f345e7a6f 100644 --- a/official/c38180759.lua +++ b/official/c38180759.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) @@ -46,4 +46,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/official/c38250531.lua b/official/c38250531.lua index edc310c185..8f418cebc9 100644 --- a/official/c38250531.lua +++ b/official/c38250531.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -83,4 +83,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c38273745.lua b/official/c38273745.lua index 3fe824917b..e05d12fe1d 100644 --- a/official/c38273745.lua +++ b/official/c38273745.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -83,4 +83,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c3828844.lua b/official/c3828844.lua index 0ababe2d6a..3ef0709c02 100644 --- a/official/c3828844.lua +++ b/official/c3828844.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --If tributed, special summon 1 rank 5+ plant Xyz from extra deck or GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Overlay(g:GetFirst(),c) end -end \ No newline at end of file +end diff --git a/official/c38495396.lua b/official/c38495396.lua index dba354471e..0af8088d87 100644 --- a/official/c38495396.lua +++ b/official/c38495396.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} function s.ovfilter(c,tp,xyzc) @@ -43,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c38694052.lua b/official/c38694052.lua index 823e8b6256..4ba5134a06 100644 --- a/official/c38694052.lua +++ b/official/c38694052.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.AND(Cost.Detach(2),s.descost)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --This is a Quick Effect if this card has a Dragon monster as material local e2=e1:Clone() e2:SetType(EFFECT_TYPE_QUICK_O) diff --git a/official/c39030163.lua b/official/c39030163.lua index af734cd88e..8d649131fe 100644 --- a/official/c39030163.lua +++ b/official/c39030163.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c39139935.lua b/official/c39139935.lua index 7288040bff..768ac83705 100644 --- a/official/c39139935.lua +++ b/official/c39139935.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=33 function s.filter(c) @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end end -end \ No newline at end of file +end diff --git a/official/c39272762.lua b/official/c39272762.lua index 548dfb970e..5e7ed72fad 100644 --- a/official/c39272762.lua +++ b/official/c39272762.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.attg) e3:SetOperation(s.atop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.valcheck(e,c) @@ -90,4 +90,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(#g-1) e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) -end \ No newline at end of file +end diff --git a/official/c39622156.lua b/official/c39622156.lua index f25efdb504..e5fd044bdd 100644 --- a/official/c39622156.lua +++ b/official/c39622156.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetTarget(Cost.Detach(1)) e1:SetOperation(s.btop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --control local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -101,4 +101,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.GetControl(tc,1-p) end -end \ No newline at end of file +end diff --git a/official/c3989465.lua b/official/c3989465.lua index 0be940681e..2290f048ca 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c39972129.lua b/official/c39972129.lua index 00717690d7..98d72ffdf7 100644 --- a/official/c39972129.lua +++ b/official/c39972129.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle or effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end \ No newline at end of file +end diff --git a/official/c39987164.lua b/official/c39987164.lua index 9dd26ec2d4..a9f29ed78b 100644 --- a/official/c39987164.lua +++ b/official/c39987164.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1) --destroy local e2=Effect.CreateEffect(c) @@ -76,4 +76,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dt:IsRelateToBattle() then Duel.Destroy(dt,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c4019153.lua b/official/c4019153.lua index cd8ceb3d08..71bcf67cc1 100644 --- a/official/c4019153.lua +++ b/official/c4019153.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=4 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c40390147.lua b/official/c40390147.lua index 2dcc024235..1444c46b91 100644 --- a/official/c40390147.lua +++ b/official/c40390147.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_PHOTON} s.listed_names={CARD_GALAXYEYES_P_DRAGON} @@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c40424929.lua b/official/c40424929.lua index 5f9c3d4f8d..a1fecc3c88 100644 --- a/official/c40424929.lua +++ b/official/c40424929.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end @@ -27,4 +27,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) Duel.Damage(p,ct*200,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c40673853.lua b/official/c40673853.lua index aadeb81009..d10ddbd53e 100644 --- a/official/c40673853.lua +++ b/official/c40673853.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy 1 face-down card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -58,4 +58,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c41147577.lua b/official/c41147577.lua index 5ea782c2e0..3908ceed5e 100644 --- a/official/c41147577.lua +++ b/official/c41147577.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.postg) e2:SetOperation(s.posop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={14152862} function s.efilter(e,te) @@ -58,4 +58,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c41309158.lua b/official/c41309158.lua index ad79374a70..784d167fad 100644 --- a/official/c41309158.lua +++ b/official/c41309158.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={15914410} function s.poscon(e,tp,eg,ep,ev,re,r,rp) @@ -55,4 +55,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c41375811.lua b/official/c41375811.lua index bd30960227..34579e396f 100644 --- a/official/c41375811.lua +++ b/official/c41375811.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) diff --git a/official/c41522092.lua b/official/c41522092.lua index f9936522b6..fc432502f8 100644 --- a/official/c41522092.lua +++ b/official/c41522092.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e5:SetCost(Cost.Detach(1)) e5:SetTarget(s.cttg) e5:SetOperation(s.ctop) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.xyz_number=0 function s.xyzcheck(g,tp,xyz) @@ -83,4 +83,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c41524885.lua b/official/c41524885.lua index 251a3c38ee..9d9d324743 100644 --- a/official/c41524885.lua +++ b/official/c41524885.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c42160203.lua b/official/c42160203.lua index 101c2c2079..4d2bd9c186 100644 --- a/official/c42160203.lua +++ b/official/c42160203.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -87,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c42230449.lua b/official/c42230449.lua index e0b2cfeb49..bd1ea118ca 100644 --- a/official/c42230449.lua +++ b/official/c42230449.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=2 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c42421606.lua b/official/c42421606.lua index 5389f34871..d31c175e8e 100644 --- a/official/c42421606.lua +++ b/official/c42421606.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.eftg) e2:SetOperation(s.efop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.roll_dice=true s.xyz_number=85 @@ -70,4 +70,4 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c42589641.lua b/official/c42589641.lua index ad3aa0d9fc..be5a6db09d 100644 --- a/official/c42589641.lua +++ b/official/c42589641.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.hdtg) e4:SetOperation(s.hdop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --spsummon local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,2)) @@ -137,4 +137,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c42741437.lua b/official/c42741437.lua index 37c6c549fc..30322da551 100644 --- a/official/c42741437.lua +++ b/official/c42741437.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -83,4 +83,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c42752141.lua b/official/c42752141.lua index e41196d70c..91e9938059 100644 --- a/official/c42752141.lua +++ b/official/c42752141.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c42940335.lua b/official/c42940335.lua index b19c3f8c4c..c89e994d25 100644 --- a/official/c42940335.lua +++ b/official/c42940335.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Equip this card to 1 "Mimighoul Master" you control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -95,4 +95,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c43047672.lua b/official/c43047672.lua index 81815864e0..50dc3f92dd 100644 --- a/official/c43047672.lua +++ b/official/c43047672.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --chain attack local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end \ No newline at end of file +end diff --git a/official/c440556.lua b/official/c440556.lua index 14ae85bf96..1192c99e64 100644 --- a/official/c440556.lua +++ b/official/c440556.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c,e,tp) return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c4423206.lua b/official/c4423206.lua index d78b3937ce..c4a9d313c3 100644 --- a/official/c4423206.lua +++ b/official/c4423206.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spfilter(c,e,tp) return c:IsRace(RACE_WARRIOR|RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) @@ -55,4 +55,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c44311445.lua b/official/c44311445.lua index 5f0910cad2..59ee344e73 100644 --- a/official/c44311445.lua +++ b/official/c44311445.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.spcost) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_MADOLCHE} s.listed_names={74641045} @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end \ No newline at end of file +end diff --git a/official/c44405066.lua b/official/c44405066.lua index 18a379195b..07f9b341a5 100644 --- a/official/c44405066.lua +++ b/official/c44405066.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_RED_EYES} function s.indcon(e) @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c44505297.lua b/official/c44505297.lua index 9694cfc72e..096e5f97b6 100644 --- a/official/c44505297.lua +++ b/official/c44505297.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() @@ -90,4 +90,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.SendtoGrave(tg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c44698398.lua b/official/c44698398.lua index 1f494a831d..2a3abb51f2 100644 --- a/official/c44698398.lua +++ b/official/c44698398.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_GALAXY,SET_TACHYON} function s.thfilter(c) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(sc,mc) end end -end \ No newline at end of file +end diff --git a/official/c45533023.lua b/official/c45533023.lua index e9c5361bfe..3204e6de1f 100644 --- a/official/c45533023.lua +++ b/official/c45533023.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCondition(s.descon) e2:SetTarget(s.destg1) e2:SetOperation(s.desop1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --destroy local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) @@ -66,4 +66,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c45742626.lua b/official/c45742626.lua index 62129ff339..2c62b1056d 100644 --- a/official/c45742626.lua +++ b/official/c45742626.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsAttribute,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,ATTRIBUTE_DARK)*200 @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) g1:Merge(g2) Duel.DisableShuffleCheck() Duel.SendtoGrave(g1,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c45852939.lua b/official/c45852939.lua index 25e375d7f8..3a9d57dece 100644 --- a/official/c45852939.lua +++ b/official/c45852939.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 1 Rank 4 or lower Xyz monster from the GY and attach another to it local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -86,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g:RemoveCard(sc) Duel.Overlay(sc,g) end -end \ No newline at end of file +end diff --git a/official/c46772449.lua b/official/c46772449.lua index 565ee3c36d..f8b5435599 100644 --- a/official/c46772449.lua +++ b/official/c46772449.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) if not ((Duel.IsTurnPlayer(tp) and Duel.IsMainPhase()) or (Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase())) then return false end @@ -49,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/official/c46871387.lua b/official/c46871387.lua index 97bb8b9813..afd536b64a 100644 --- a/official/c46871387.lua +++ b/official/c46871387.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --def local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -43,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c46895036.lua b/official/c46895036.lua index d8ec8a65c2..e4d6faf17d 100644 --- a/official/c46895036.lua +++ b/official/c46895036.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --to hand local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND) @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c47017574.lua b/official/c47017574.lua index 4cc823ca42..552167f0b1 100644 --- a/official/c47017574.lua +++ b/official/c47017574.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=92 s.listed_names={97403510} @@ -82,4 +82,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c47060528.lua b/official/c47060528.lua index 892cb0f6d6..3081c1fe3d 100644 --- a/official/c47060528.lua +++ b/official/c47060528.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Change the name of 1 other face-up monster on the field to "Sakra Vendirage" until the End Phase local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c47132793.lua b/official/c47132793.lua index 91a22a9b89..eb14e1b81e 100644 --- a/official/c47132793.lua +++ b/official/c47132793.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card from your GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end \ No newline at end of file +end diff --git a/official/c47349116.lua b/official/c47349116.lua index ad514827f2..e56995a00a 100644 --- a/official/c47349116.lua +++ b/official/c47349116.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --destroy replace local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -75,4 +75,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end \ No newline at end of file +end diff --git a/official/c47506081.lua b/official/c47506081.lua index 9a8f620a91..143bcd984b 100644 --- a/official/c47506081.lua +++ b/official/c47506081.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -31,4 +31,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c47579719.lua b/official/c47579719.lua index 90af745c69..e4d5aeda6a 100644 --- a/official/c47579719.lua +++ b/official/c47579719.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition() @@ -26,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE) -end \ No newline at end of file +end diff --git a/official/c47805931.lua b/official/c47805931.lua index d5197d76d3..8fde461cbd 100644 --- a/official/c47805931.lua +++ b/official/c47805931.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=20 function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c48348921.lua b/official/c48348921.lua index 52d61461ed..ac8d913582 100644 --- a/official/c48348921.lua +++ b/official/c48348921.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Unaffected by opponent's monster effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -60,4 +60,4 @@ function s.atkval(e,c) local g=c:GetOverlayGroup() local sum=g:GetSum(Card.GetLevel)+g:GetSum(Card.GetRank) return sum*100 -end \ No newline at end of file +end diff --git a/official/c48608796.lua b/official/c48608796.lua index c5b0fe023f..3b92ba74e2 100644 --- a/official/c48608796.lua +++ b/official/c48608796.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetCountLimit(1) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.indop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_LYRILUSC} function s.atkval(e,c) @@ -65,4 +65,4 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e3:SetValue(1) e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) -end \ No newline at end of file +end diff --git a/official/c48739166.lua b/official/c48739166.lua index 171dea3e29..391e1be231 100644 --- a/official/c48739166.lua +++ b/official/c48739166.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Protect itself from destruction local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -50,4 +50,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c48905153.lua b/official/c48905153.lua index 081b7fc9e2..dffef9468f 100644 --- a/official/c48905153.lua +++ b/official/c48905153.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) @@ -68,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c48928529.lua b/official/c48928529.lua index 61ac6e818f..66a54d315e 100644 --- a/official/c48928529.lua +++ b/official/c48928529.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=83 function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c49032236.lua b/official/c49032236.lua index f8325f9e12..779189fa2b 100644 --- a/official/c49032236.lua +++ b/official/c49032236.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=81 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -43,4 +43,4 @@ end function s.efilter(e,re) local c=e:GetHandler() return c~=re:GetOwner() and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end \ No newline at end of file +end diff --git a/official/c49121795.lua b/official/c49121795.lua index 622bdcb1f0..59c4e17810 100644 --- a/official/c49121795.lua +++ b/official/c49121795.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.datg) e1:SetOperation(s.daop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c49202331.lua b/official/c49202331.lua index 1987bddccb..812ddf9702 100644 --- a/official/c49202331.lua +++ b/official/c49202331.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCondition(s.atcon) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.atop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={3814632} function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -54,4 +54,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end \ No newline at end of file +end diff --git a/official/c49221191.lua b/official/c49221191.lua index 7ff2078dec..f2d9520071 100644 --- a/official/c49221191.lua +++ b/official/c49221191.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=32 s.listed_names={65676461} @@ -67,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c49456901.lua b/official/c49456901.lua index 345319ccb7..f5fa4c181d 100644 --- a/official/c49456901.lua +++ b/official/c49456901.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.xyz_number=104 @@ -66,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) end -end \ No newline at end of file +end diff --git a/official/c49678559.lua b/official/c49678559.lua index a184ad305f..4cded6a594 100644 --- a/official/c49678559.lua +++ b/official/c49678559.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction Replacement local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -73,4 +73,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RegisterEffect(e1,tp) return true else return false end -end \ No newline at end of file +end diff --git a/official/c4997565.lua b/official/c4997565.lua index ea1885fe46..a41cba6c16 100644 --- a/official/c4997565.lua +++ b/official/c4997565.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=3 function s.spfilter(c,e,tp) @@ -97,4 +97,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) sc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c5014629.lua b/official/c5014629.lua index 845672b4f8..e773788a49 100644 --- a/official/c5014629.lua +++ b/official/c5014629.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:IsMonster() @@ -31,4 +31,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_REMOVED,0,nil) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,ct*100,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c50260683.lua b/official/c50260683.lua index ec81aabb35..90e9e231ab 100644 --- a/official/c50260683.lua +++ b/official/c50260683.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()~=tc:GetBaseAttack() then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c50449881.lua b/official/c50449881.lua index 85bbbc0b28..a85c94cbc4 100644 --- a/official/c50449881.lua +++ b/official/c50449881.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Opponent can only target this card for attacks local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.atlimit(e,c) return c~=e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c50789693.lua b/official/c50789693.lua index 33c52d32a4..78b88156df 100644 --- a/official/c50789693.lua +++ b/official/c50789693.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.adop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) -- local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -72,4 +72,4 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/official/c5088741.lua b/official/c5088741.lua index 5b91f0fdb6..0cab045745 100644 --- a/official/c5088741.lua +++ b/official/c5088741.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCost(Cost.Detach(1,1,nil)) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Add 1 "A.I." Trap from your Deck to your hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -60,4 +60,4 @@ function s.thop(filter) Duel.ConfirmCards(1-tp,g) end end -end \ No newline at end of file +end diff --git a/official/c51497409.lua b/official/c51497409.lua index df593f92cb..4b081603f5 100644 --- a/official/c51497409.lua +++ b/official/c51497409.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ddtg) e1:SetOperation(s.ddop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --indes local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dc and Duel.Destroy(dc,REASON_EFFECT)>0 then Duel.Damage(1-tp,500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c51543904.lua b/official/c51543904.lua index 9be8f566df..8a1647ce4a 100644 --- a/official/c51543904.lua +++ b/official/c51543904.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_RANK_UP_MAGIC,SET_NUMBER} s.xyz_number=99 @@ -93,4 +93,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c51735257.lua b/official/c51735257.lua index f3aa3b4bd9..3166326af2 100644 --- a/official/c51735257.lua +++ b/official/c51735257.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=50 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c51960178.lua b/official/c51960178.lua index 5e6bb4e02e..d8c96b4f50 100644 --- a/official/c51960178.lua +++ b/official/c51960178.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -27,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) 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 +end diff --git a/official/c52323874.lua b/official/c52323874.lua index 70789d45ab..bc4d19e712 100644 --- a/official/c52323874.lua +++ b/official/c52323874.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_RAIDRAPTOR} function s.filter(c) @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c52558805.lua b/official/c52558805.lua index 7b196035de..4ebfd51976 100644 --- a/official/c52558805.lua +++ b/official/c52558805.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_DJINN} function s.filter(c,tp) @@ -49,4 +49,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c52653092.lua b/official/c52653092.lua index 64bd918ea6..b984d80b3e 100644 --- a/official/c52653092.lua +++ b/official/c52653092.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e6:SetCondition(s.actcon) e6:SetCost(Cost.Detach(1)) e6:SetOperation(s.actop) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) end s.listed_series={SET_NUMBER,SET_RANK_UP_MAGIC,SET_UTOPIA} s.xyz_number=0 @@ -94,4 +94,4 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c53054164.lua b/official/c53054164.lua index 76c9abd44b..69094a0c96 100644 --- a/official/c53054164.lua +++ b/official/c53054164.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return to the Extra Deck and Special Summon from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c53244294.lua b/official/c53244294.lua index dbc16b6607..8484942ec9 100644 --- a/official/c53244294.lua +++ b/official/c53244294.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.ztg) e2:SetOperation(s.zop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=57 function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -66,4 +66,4 @@ function s.zop(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp) return e:GetLabel() -end \ No newline at end of file +end diff --git a/official/c53334641.lua b/official/c53334641.lua index b854bee499..2a22f14307 100644 --- a/official/c53334641.lua +++ b/official/c53334641.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -77,4 +77,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c53701457.lua b/official/c53701457.lua index c8891d92bc..1503382487 100644 --- a/official/c53701457.lua +++ b/official/c53701457.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=28 function s.dircon(e) @@ -53,4 +53,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*500 Duel.Damage(p,dam,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c54358015.lua b/official/c54358015.lua index 137be567ca..ab1bf74f0f 100644 --- a/official/c54358015.lua +++ b/official/c54358015.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Prevent effect target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.tgtg(e,c) return c:IsSetCard(SET_GALAXY) and c~=e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c54366836.lua b/official/c54366836.lua index b18e7b51c2..89434e7c1d 100644 --- a/official/c54366836.lua +++ b/official/c54366836.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCondition(s.damcon2) e3:SetCost(s.damcost2) e3:SetOperation(s.damop2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=54 function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -71,4 +71,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end \ No newline at end of file +end diff --git a/official/c54719828.lua b/official/c54719828.lua index 05aa18609d..b6a9c28323 100644 --- a/official/c54719828.lua +++ b/official/c54719828.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=16 function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -50,4 +50,4 @@ function s.aclimit2(e,re,tp) end function s.aclimit3(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() -end \ No newline at end of file +end diff --git a/official/c5530780.lua b/official/c5530780.lua index 9c5f4d7441..3b3a7b82d1 100644 --- a/official/c5530780.lua +++ b/official/c5530780.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e3:SetCountLimit(1,{id,1}) e3:SetCost(s.atkcost) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -101,4 +101,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(800) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c55470553.lua b/official/c55470553.lua index bda4f9b7ad..0f1f9aa6bf 100644 --- a/official/c55470553.lua +++ b/official/c55470553.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -64,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c55727845.lua b/official/c55727845.lua index bd2ee51764..49dc0eb60f 100644 --- a/official/c55727845.lua +++ b/official/c55727845.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=96 function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,4 +43,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c55935416.lua b/official/c55935416.lua index d1b894db89..aed1250cde 100644 --- a/official/c55935416.lua +++ b/official/c55935416.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=56 function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -32,4 +32,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c56051086.lua b/official/c56051086.lua index 3d5a9248c3..f9550e15bc 100644 --- a/official/c56051086.lua +++ b/official/c56051086.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e1) --indest local e2=Effect.CreateEffect(c) @@ -88,4 +88,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) Duel.Damage(1-tp,ev,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c56292140.lua b/official/c56292140.lua index 6867a1409c..5ff1994a44 100644 --- a/official/c56292140.lua +++ b/official/c56292140.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --destroy local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -59,4 +59,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c56337500.lua b/official/c56337500.lua index 58864c0962..0cb2ffccc8 100644 --- a/official/c56337500.lua +++ b/official/c56337500.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -114,4 +114,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end \ No newline at end of file +end diff --git a/official/c56638325.lua b/official/c56638325.lua index fdf1128da1..934f82a426 100644 --- a/official/c56638325.lua +++ b/official/c56638325.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -97,4 +97,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c56832966.lua b/official/c56832966.lua index 8d02e99e40..089e5364eb 100644 --- a/official/c56832966.lua +++ b/official/c56832966.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCondition(s.atkcon) e3:SetCost(s.atkcost) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -61,4 +61,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(5000) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c56910167.lua b/official/c56910167.lua index 3a433afe0e..ffb6382c7f 100644 --- a/official/c56910167.lua +++ b/official/c56910167.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -27,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c57031794.lua b/official/c57031794.lua index 2ca958293c..4dcc2515b7 100644 --- a/official/c57031794.lua +++ b/official/c57031794.lua @@ -23,14 +23,14 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum Red Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCondition(s.quickeffcond) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Attach 1 "Super Quantum" monster from your hand or field to this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c57043117.lua b/official/c57043117.lua index ec683b14b6..b64f9c2039 100644 --- a/official/c57043117.lua +++ b/official/c57043117.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.efilter(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() @@ -57,4 +57,4 @@ end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 else return val end -end \ No newline at end of file +end diff --git a/official/c57314798.lua b/official/c57314798.lua index acfb964845..3e1de1cc15 100644 --- a/official/c57314798.lua +++ b/official/c57314798.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy as many monsters on the field as possible and each player sets 1 Spell/Trap from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -109,4 +109,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c57450198.lua b/official/c57450198.lua index b0d863cf7d..dcdb1e805d 100644 --- a/official/c57450198.lua +++ b/official/c57450198.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum White Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCondition(s.quickeffcond) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Attach 1 "Super Quantum" monster from your hand or field to this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -81,4 +81,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c57566760.lua b/official/c57566760.lua index c8b64c8173..1b805a31f9 100644 --- a/official/c57566760.lua +++ b/official/c57566760.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetCondition(s.atcon) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.atop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_MIKANKO} function s.thfilter(c) @@ -60,4 +60,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToBattle() then Duel.ChainAttack() end -end \ No newline at end of file +end diff --git a/official/c57707471.lua b/official/c57707471.lua index 7fbf337933..2cd4879271 100644 --- a/official/c57707471.lua +++ b/official/c57707471.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=21 function s.ovfilter(c,tp,xyzc) @@ -46,4 +46,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c58058134.lua b/official/c58058134.lua index 4f11743cac..b835f7143b 100644 --- a/official/c58058134.lua +++ b/official/c58058134.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 @@ -50,4 +50,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c58069384.lua b/official/c58069384.lua index 2fdf6a7307..7c50da1ec5 100644 --- a/official/c58069384.lua +++ b/official/c58069384.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Increase ATK by 2100 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c581014.lua b/official/c581014.lua index 974ae8a7cd..b41729ffc5 100644 --- a/official/c581014.lua +++ b/official/c581014.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spfilter(c,e,tp) return c:IsNonEffectMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -72,4 +72,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end diff --git a/official/c58504745.lua b/official/c58504745.lua index fd411b8a1d..6527581e77 100644 --- a/official/c58504745.lua +++ b/official/c58504745.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.filter1(c) @@ -39,4 +39,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c58600555.lua b/official/c58600555.lua index 5a48be649a..b389794bbd 100644 --- a/official/c58600555.lua +++ b/official/c58600555.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Change position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c58712976.lua b/official/c58712976.lua index 189b2a3289..cf0c1c623c 100644 --- a/official/c58712976.lua +++ b/official/c58712976.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -60,4 +60,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #rg>0 then Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c58720904.lua b/official/c58720904.lua index 34dfc1b7c9..84c7657348 100644 --- a/official/c58720904.lua +++ b/official/c58720904.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end @@ -56,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SetLP(1-tp,3000) end -end \ No newline at end of file +end diff --git a/official/c58820923.lua b/official/c58820923.lua index 5cc9562242..6c4e5b170e 100644 --- a/official/c58820923.lua +++ b/official/c58820923.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=95 function s.ovfilter(c,tp,xyzc) @@ -87,4 +87,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c59071624.lua b/official/c59071624.lua index e5c3f92b12..4682998c19 100644 --- a/official/c59071624.lua +++ b/official/c59071624.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --If an opponent's monster is in GY/banished due to your effect, special summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -40,10 +40,10 @@ function s.initial_effect(c) e3:SetCondition(s.sscon) e3:SetTarget(s.sstg) e3:SetOperation(s.ssop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) local e4=e3:Clone() e4:SetCode(EVENT_REMOVE) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end --Part of "Traptrix" archetype s.listed_series={SET_TRAPTRIX} diff --git a/official/c5916510.lua b/official/c5916510.lua index 599b79cd74..93d10e73db 100644 --- a/official/c5916510.lua +++ b/official/c5916510.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon itself from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -67,4 +67,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) and tc:IsRelateToEffect(e) and s.matfilter(tc) and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c59170782.lua b/official/c59170782.lua index 04f161119c..ffc3297131 100644 --- a/official/c59170782.lua +++ b/official/c59170782.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.tgcon1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.tgop1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Change battle target local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.tgcon2) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.tgop2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -91,4 +91,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c59208943.lua b/official/c59208943.lua index c3d231e021..4e7576b3db 100644 --- a/official/c59208943.lua +++ b/official/c59208943.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --attach local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -69,4 +69,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,g) end end -end \ No newline at end of file +end diff --git a/official/c59242457.lua b/official/c59242457.lua index dfdac7124b..73f633e395 100644 --- a/official/c59242457.lua +++ b/official/c59242457.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Return material to Extra Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -99,4 +99,4 @@ function s.teop(e,tp,eg,ep,ev,re,r,rp) tc:CompleteProcedure() end end -end \ No newline at end of file +end diff --git a/official/c59627393.lua b/official/c59627393.lua index 3d37048b91..ea00693eba 100644 --- a/official/c59627393.lua +++ b/official/c59627393.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_BATTLIN_BOXER} s.xyz_number=105 @@ -73,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetReset(RESETS_STANDARD_PHASE_END) at:RegisterEffect(e4) end -end \ No newline at end of file +end diff --git a/official/c60195675.lua b/official/c60195675.lua index a52e7923f8..9a61f8fd11 100644 --- a/official/c60195675.lua +++ b/official/c60195675.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,id) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon this card from the GY in Defense Position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c60517697.lua b/official/c60517697.lua index a59d5d7679..82b9878e3b 100644 --- a/official/c60517697.lua +++ b/official/c60517697.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 3 Level 3 or lower Fish, Sea Serpent, and/or Aqua monsters from your hand and/or GY. local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -88,4 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g==3 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c60645181.lua b/official/c60645181.lua index 4d7376f41c..5b47e3740d 100644 --- a/official/c60645181.lua +++ b/official/c60645181.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(2)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -26,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c60992364.lua b/official/c60992364.lua index 976cf47e11..c0cf8aaf88 100644 --- a/official/c60992364.lua +++ b/official/c60992364.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Equip this card on the field to 1 "Utopia" monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -123,4 +123,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c61307542.lua b/official/c61307542.lua index 4a66361639..725ec1e193 100644 --- a/official/c61307542.lua +++ b/official/c61307542.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.efilter(e,re) return re:IsMonsterEffect() and re:GetOwner()~=e:GetOwner() diff --git a/official/c61344030.lua b/official/c61344030.lua index 59fe12f3a3..715ad446d5 100644 --- a/official/c61344030.lua +++ b/official/c61344030.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ 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 +end diff --git a/official/c61374414.lua b/official/c61374414.lua index 25afbc871d..92a30d9ae8 100644 --- a/official/c61374414.lua +++ b/official/c61374414.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.listed_names={34876719} @@ -83,4 +83,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sc=e:GetLabelObject() Duel.Destroy(sc,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c61399402.lua b/official/c61399402.lua index d0fddc7996..d5267ad31c 100644 --- a/official/c61399402.lua +++ b/official/c61399402.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.descost) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -91,4 +91,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end \ No newline at end of file +end diff --git a/official/c6165656.lua b/official/c6165656.lua index cd4d502ffb..a7bed17a32 100644 --- a/official/c6165656.lua +++ b/official/c6165656.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --win local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -82,4 +82,4 @@ function s.wincon(e,tp,eg,ep,ev,re,r,rp) end function s.winop(e,tp,eg,ep,ev,re,r,rp) Duel.Win(tp,WIN_REASON_DISASTER_LEO) -end \ No newline at end of file +end diff --git a/official/c62070231.lua b/official/c62070231.lua index cc6c786f45..398b03e5dc 100644 --- a/official/c62070231.lua +++ b/official/c62070231.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=94 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c6247535.lua b/official/c6247535.lua index 7e13a454ac..f6c53ac599 100644 --- a/official/c6247535.lua +++ b/official/c6247535.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_BORREL} function s.mfilter(c,lc,sumtype,tp) @@ -111,4 +111,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c62541668.lua b/official/c62541668.lua index e8cbeb35da..bafca0c3ba 100644 --- a/official/c62541668.lua +++ b/official/c62541668.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Protect itself from destruction local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -66,4 +66,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c62709239.lua b/official/c62709239.lua index f51530087f..6c8544b24b 100644 --- a/official/c62709239.lua +++ b/official/c62709239.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -102,4 +102,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c) return not c:IsAttribute(ATTRIBUTE_DARK) -end \ No newline at end of file +end diff --git a/official/c6284176.lua b/official/c6284176.lua index c52764d729..e8cdf5cdb2 100644 --- a/official/c6284176.lua +++ b/official/c6284176.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -92,4 +92,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=Duel.GetFirstTarget() Duel.Release(tc,REASON_EFFECT|REASON_REPLACE) -end \ No newline at end of file +end diff --git a/official/c62967433.lua b/official/c62967433.lua index 908d8e20b4..8e1881e5c6 100644 --- a/official/c62967433.lua +++ b/official/c62967433.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 1 Level 4 monster from your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c63746411.lua b/official/c63746411.lua index 9fe3874dc7..053bea8eb5 100644 --- a/official/c63746411.lua +++ b/official/c63746411.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=106 function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end \ No newline at end of file +end diff --git a/official/c63767246.lua b/official/c63767246.lua index 36900da489..d0bbb9049a 100644 --- a/official/c63767246.lua +++ b/official/c63767246.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()~=e:GetHandler() end) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.chngtgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Make 1 of your Xyz monsters gain ATK local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -99,4 +99,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(g:GetFirst():GetBaseAttack()) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c6387204.lua b/official/c6387204.lua index bde33d679a..e74f1611fd 100644 --- a/official/c6387204.lua +++ b/official/c6387204.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCondition(s.lpcon) e2:SetCost(s.lpcost) e2:SetOperation(s.lpop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=6 @@ -89,4 +89,4 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c64245689.lua b/official/c64245689.lua index 58e7bc7a0c..20a6f342b7 100644 --- a/official/c64245689.lua +++ b/official/c64245689.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.tgfilter(c) return c:IsRace(RACE_PLANT) and c:IsAbleToGrave() @@ -60,4 +60,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -end \ No newline at end of file +end diff --git a/official/c64276752.lua b/official/c64276752.lua index 7e842ca791..9cfb19eff7 100644 --- a/official/c64276752.lua +++ b/official/c64276752.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indescon(e) return e:GetHandler():IsXyzSummoned() @@ -83,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c64332231.lua b/official/c64332231.lua index f6bc6a2670..7f63e67a60 100644 --- a/official/c64332231.lua +++ b/official/c64332231.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsReleasableByEffect,1,nil) @@ -35,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c64414267.lua b/official/c64414267.lua index f41f5abf80..67c913f180 100644 --- a/official/c64414267.lua +++ b/official/c64414267.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.AND(Cost.Detach(1),Cost.Discard())) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(function(e,c,sump,sumtype) return (sumtype&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c64554883.lua b/official/c64554883.lua index 93a59b1e79..8488ecf325 100644 --- a/official/c64554883.lua +++ b/official/c64554883.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=25 function s.filter(c) @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c64689404.lua b/official/c64689404.lua index 485cf83396..8f8d620070 100644 --- a/official/c64689404.lua +++ b/official/c64689404.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ractg) e1:SetOperation(s.racop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -61,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c6511113.lua b/official/c6511113.lua index c344a429b8..e063f88ace 100644 --- a/official/c6511113.lua +++ b/official/c6511113.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e5:SetCost(s.cost) e5:SetTarget(s.target) e5:SetOperation(s.operation) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_names={id} s.listed_series={SET_TRAPTRIX,SET_TRAP_HOLE,SET_HOLE} @@ -90,4 +90,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end -end \ No newline at end of file +end diff --git a/official/c65301952.lua b/official/c65301952.lua index 08da822755..23158a467f 100644 --- a/official/c65301952.lua +++ b/official/c65301952.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(s.setcost) e2:SetTarget(s.settg) e2:SetOperation(s.setop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsSpell,c:GetControler(),LOCATION_GRAVE,0,nil)*200 @@ -54,4 +54,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end \ No newline at end of file +end diff --git a/official/c65676461.lua b/official/c65676461.lua index 87ee6eabce..36e304b8c0 100644 --- a/official/c65676461.lua +++ b/official/c65676461.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=32 function s.atcon(e,tp,eg,ep,ev,re,r,rp) @@ -58,4 +58,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c65884091.lua b/official/c65884091.lua index c8bca23033..4159a73d51 100644 --- a/official/c65884091.lua +++ b/official/c65884091.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) return te:IsActiveType(TYPE_EFFECT) and te:GetOwner()~=e:GetOwner() -end \ No newline at end of file +end diff --git a/official/c65892585.lua b/official/c65892585.lua index e32b74c3dd..ca53aded6b 100644 --- a/official/c65892585.lua +++ b/official/c65892585.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return itself to the Extra Deck and Special Summon "Gold Pride - Captain Carrie" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end diff --git a/official/c66011101.lua b/official/c66011101.lua index d5ee56a410..ad7c14c31b 100644 --- a/official/c66011101.lua +++ b/official/c66011101.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=60 function s.spfilter(c,e,tp) @@ -109,4 +109,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/official/c66506689.lua b/official/c66506689.lua index a5ef91aff4..e1fde6c1f7 100644 --- a/official/c66506689.lua +++ b/official/c66506689.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tg) e1:SetOperation(s.op) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsCanChangePosition() @@ -35,4 +35,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) end -end \ No newline at end of file +end diff --git a/official/c66523544.lua b/official/c66523544.lua index 3244964b06..07c8a2363d 100644 --- a/official/c66523544.lua +++ b/official/c66523544.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsSpellTrap() @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.climit(e,lp,tp) return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end \ No newline at end of file +end diff --git a/official/c66547759.lua b/official/c66547759.lua index 6841d6e086..82f7558c38 100644 --- a/official/c66547759.lua +++ b/official/c66547759.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.xyz_number=23 @@ -68,4 +68,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c6659193.lua b/official/c6659193.lua index cb04fd58cf..53d9bb951c 100644 --- a/official/c6659193.lua +++ b/official/c6659193.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetCondition(s.atkcon) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetOperation(s.atkop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_names={17016362} --"Performage Trapeze Magician" function s.reflectcond(e) @@ -68,4 +68,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c66970002.lua b/official/c66970002.lua index 21cc02ced5..ff0ec7f6d0 100644 --- a/official/c66970002.lua +++ b/official/c66970002.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c67173574.lua b/official/c67173574.lua index afa51c3a85..fb0ad0c4ab 100644 --- a/official/c67173574.lua +++ b/official/c67173574.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=102 s.listed_names={49678559} @@ -93,4 +93,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c68300121.lua b/official/c68300121.lua index afb9715d3a..df6821b48c 100644 --- a/official/c68300121.lua +++ b/official/c68300121.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Make the opponent send a monste to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -64,4 +64,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() and bc:IsFaceup() then Duel.SendtoGrave(bc,REASON_RULE,PLAYER_NONE,1-tp) end -end \ No newline at end of file +end diff --git a/official/c68396121.lua b/official/c68396121.lua index 9a1521e99e..a4acb7d16f 100644 --- a/official/c68396121.lua +++ b/official/c68396121.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -86,4 +86,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c68597372.lua b/official/c68597372.lua index 960532daf6..ae742ed35e 100644 --- a/official/c68597372.lua +++ b/official/c68597372.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkval(e,c) return c:GetOverlayCount()*300 @@ -62,4 +62,4 @@ end function s.flipop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.ChangePosition(tc,POS_FACEUP_ATTACK) -end \ No newline at end of file +end diff --git a/official/c68618157.lua b/official/c68618157.lua index f6b96d8067..2fe069ee16 100644 --- a/official/c68618157.lua +++ b/official/c68618157.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --tohand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -33,7 +33,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(tp) @@ -74,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c68679595.lua b/official/c68679595.lua index d1d71014b3..7d1dd4f6e4 100644 --- a/official/c68679595.lua +++ b/official/c68679595.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -102,4 +102,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c68836428.lua b/official/c68836428.lua index e343873701..c765fedf6f 100644 --- a/official/c68836428.lua +++ b/official/c68836428.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.filter(c) return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or c:GetAttack()>0) @@ -61,4 +61,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetValue(-800) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c69058960.lua b/official/c69058960.lua index d68a0aa8c7..f3041f1c26 100644 --- a/official/c69058960.lua +++ b/official/c69058960.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be destroyed local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ end function s.refcon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and Duel.GetAttackTarget()==e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c69069911.lua b/official/c69069911.lua index 52497ebd0b..3322720c36 100644 --- a/official/c69069911.lua +++ b/official/c69069911.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.atcon) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -23,4 +23,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end \ No newline at end of file +end diff --git a/official/c69170557.lua b/official/c69170557.lua index a1cb897824..ddf2e2778a 100644 --- a/official/c69170557.lua +++ b/official/c69170557.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.counter_place_list={0x1024} s.xyz_number=40 @@ -58,4 +58,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(g) do tc:AddCounter(0x1024,1) end -end \ No newline at end of file +end diff --git a/official/c69610924.lua b/official/c69610924.lua index d9c1f4b0dc..f660863ff3 100644 --- a/official/c69610924.lua +++ b/official/c69610924.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot direct attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c69655484.lua b/official/c69655484.lua index ee2dc16b0a..b35e6fe453 100644 --- a/official/c69655484.lua +++ b/official/c69655484.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.edsptg) e1:SetOperation(s.edspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Add 1 "Rank-Up-Magic" Spell from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(s.thcost) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon 1 "Performage" monster from your GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -100,4 +100,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c69757518.lua b/official/c69757518.lua index caac9b8852..b863feffe8 100644 --- a/official/c69757518.lua +++ b/official/c69757518.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.atop) --Place 1 card from the GY on the top of the Deck, and if you do, attach another to this card as material - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TODECK) @@ -80,4 +80,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,sg) end end -end \ No newline at end of file +end diff --git a/official/c6983839.lua b/official/c6983839.lua index c4b64dee35..0bd87176ea 100644 --- a/official/c6983839.lua +++ b/official/c6983839.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c69840739.lua b/official/c69840739.lua index a358a9f688..0a72dcb706 100644 --- a/official/c69840739.lua +++ b/official/c69840739.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) local event_chaining,_,_,event_value,reason_effect,_,reason_player=Duel.CheckEvent(EVENT_CHAINING,true) diff --git a/official/c698785.lua b/official/c698785.lua index b2293f7dec..22bf9daa3c 100644 --- a/official/c698785.lua +++ b/official/c698785.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end @@ -25,4 +25,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c7020743.lua b/official/c7020743.lua index 8b57528695..2c3bdcaf1e 100644 --- a/official/c7020743.lua +++ b/official/c7020743.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) e6:SetCost(Cost.Detach(4,4,nil)) e6:SetTarget(s.destg) e6:SetOperation(s.desop) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) end function s.atchtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.GetFieldGroupCount(0,LOCATION_GRAVE,LOCATION_GRAVE)>0 end @@ -77,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c70636044.lua b/official/c70636044.lua index f5e4899135..b43f69179b 100644 --- a/official/c70636044.lua +++ b/official/c70636044.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --At start of Damage Step, destroy 1 card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c71068247.lua b/official/c71068247.lua index f9b918e92d..c7e4e72f73 100644 --- a/official/c71068247.lua +++ b/official/c71068247.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --ATK decrease local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.adcon(e) return e:GetHandler():GetOverlayCount()==0 -end \ No newline at end of file +end diff --git a/official/c71612253.lua b/official/c71612253.lua index 6204352e32..85d63c3e7c 100644 --- a/official/c71612253.lua +++ b/official/c71612253.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to grave local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOGRAVE) @@ -87,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c7194917.lua b/official/c7194917.lua index e1241cbdfd..ee89c885ea 100644 --- a/official/c7194917.lua +++ b/official/c7194917.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.adop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --pos local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -66,4 +66,4 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToBattle() and c:IsDefensePos() then Duel.ChangePosition(c,POS_FACEUP_ATTACK) end -end \ No newline at end of file +end diff --git a/official/c72409226.lua b/official/c72409226.lua index 082be83783..d06b597852 100644 --- a/official/c72409226.lua +++ b/official/c72409226.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.deckspthtg) e1:SetOperation(s.deckspthop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Add up to 2 cards attached to this card to your hand, including at least 1 "Materiactor" card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c72971064.lua b/official/c72971064.lua index 9679da9925..7644992668 100644 --- a/official/c72971064.lua +++ b/official/c72971064.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.retopthtg) e2:SetOperation(s.retopthop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Add 1 "Lyrilusc" monster from your GY to your hand, except this card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -87,4 +87,4 @@ function s.llthop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c73082255.lua b/official/c73082255.lua index 20bc7c52f7..08ac8075c3 100644 --- a/official/c73082255.lua +++ b/official/c73082255.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.gytg) e3:SetOperation(s.gyop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.lvtg(e,c) return c:IsLevelAbove(1) and c:GetOwner()~=e:GetHandlerPlayer() diff --git a/official/c73289035.lua b/official/c73289035.lua index 5dc2a6e6b2..96f5b217cd 100644 --- a/official/c73289035.lua +++ b/official/c73289035.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c73347079.lua b/official/c73347079.lua index d851a4c152..509913f7a2 100644 --- a/official/c73347079.lua +++ b/official/c73347079.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.adval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_WINGEDBEAST),c:GetControler(),LOCATION_MZONE,0,c)*500 @@ -44,4 +44,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c73445448.lua b/official/c73445448.lua index 30c7957d1d..6654992832 100644 --- a/official/c73445448.lua +++ b/official/c73445448.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=22 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -68,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c73659078.lua b/official/c73659078.lua index 307cf9dd50..8ad13394d7 100644 --- a/official/c73659078.lua +++ b/official/c73659078.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.countertg) e1:SetOperation(s.counterop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Non-WATER monsters lose 200 ATK for each Ice Counter on the field local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -50,4 +50,4 @@ function s.counterop(e,tp,eg,ep,ev,re,r,rp) tc=g:Select(tp,1,1,nil):GetFirst() tc:AddCounter(0x1015,1) end -end \ No newline at end of file +end diff --git a/official/c73887236.lua b/official/c73887236.lua index aaea9da5ea..51cd95d9bc 100644 --- a/official/c73887236.lua +++ b/official/c73887236.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkfilter(e,c) return c:IsSpecialSummoned() @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c73964868.lua b/official/c73964868.lua index d9952e7f7e..e4a6c07e1d 100644 --- a/official/c73964868.lua +++ b/official/c73964868.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c74294676.lua b/official/c74294676.lua index e630b27e30..fbc107abef 100644 --- a/official/c74294676.lua +++ b/official/c74294676.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate Normal Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,12 +29,12 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Negate Special Summon local e3=e2:Clone() e3:SetDescription(aux.Stringid(id,2)) e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.condition1(e,tp,eg,ep,ev,re,r,rp) @@ -65,4 +65,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c74371660.lua b/official/c74371660.lua index aa995ed37f..ed204b91e3 100644 --- a/official/c74371660.lua +++ b/official/c74371660.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.dscon(e) return e:GetHandler():GetOverlayCount()~=0 @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) Duel.NegateRelatedChain(tc,RESET_TURN_SET) end -end \ No newline at end of file +end diff --git a/official/c74416224.lua b/official/c74416224.lua index 5f402ba261..b5fbf9531f 100644 --- a/official/c74416224.lua +++ b/official/c74416224.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c74593218.lua b/official/c74593218.lua index 85a0531fe9..d924c4a6d6 100644 --- a/official/c74593218.lua +++ b/official/c74593218.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) @@ -46,4 +46,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c75083197.lua b/official/c75083197.lua index d350b04ec9..34a5bba8b7 100644 --- a/official/c75083197.lua +++ b/official/c75083197.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={id} --Filter for cards summoned from GY @@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c75253697.lua b/official/c75253697.lua index dc8620c56a..33dbb90a24 100644 --- a/official/c75253697.lua +++ b/official/c75253697.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=72 function s.dfilter(c,pos) @@ -46,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(HALF_DAMAGE) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c75367227.lua b/official/c75367227.lua index 5ff8096065..cd9ea59756 100644 --- a/official/c75367227.lua +++ b/official/c75367227.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) -- local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND) @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c75402014.lua b/official/c75402014.lua index e04799ceda..dc886e4591 100644 --- a/official/c75402014.lua +++ b/official/c75402014.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_ZW} s.xyz_number=39 @@ -112,4 +112,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c75433814.lua b/official/c75433814.lua index 7cbf22ca2b..1be391620e 100644 --- a/official/c75433814.lua +++ b/official/c75433814.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy monsters with String counters and burn 500 for each local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -55,4 +55,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c75574498.lua b/official/c75574498.lua index debd577791..c892cfddfb 100644 --- a/official/c75574498.lua +++ b/official/c75574498.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_names={81587028} --"Box of Friends" function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -89,4 +89,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c75620895.lua b/official/c75620895.lua index 2e5f33665a..6c96dcd85f 100644 --- a/official/c75620895.lua +++ b/official/c75620895.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) c:CopyEffect(code,RESET_EVENT|RESETS_STANDARD,1) end -end \ No newline at end of file +end diff --git a/official/c75797046.lua b/official/c75797046.lua index 07c90db3f7..15d1cd64d5 100644 --- a/official/c75797046.lua +++ b/official/c75797046.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_BUTTERSPY} function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,4 +35,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,ct1*300,REASON_EFFECT,true) Duel.Damage(1-tp,ct2*300,REASON_EFFECT,true) Duel.RDComplete() -end \ No newline at end of file +end diff --git a/official/c75840616.lua b/official/c75840616.lua index eb1a9e4aa9..d70bd5f0a0 100644 --- a/official/c75840616.lua +++ b/official/c75840616.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --attack all local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) aux.ToHandOrElse(g:GetFirst(),tp) -end \ No newline at end of file +end diff --git a/official/c7593748.lua b/official/c7593748.lua index 490debf65b..8c040f0f82 100644 --- a/official/c7593748.lua +++ b/official/c7593748.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --level local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -89,4 +89,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c76067258.lua b/official/c76067258.lua index bf2cdd90d8..53b58eaf41 100644 --- a/official/c76067258.lua +++ b/official/c76067258.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --desrep local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -68,4 +68,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c7628844.lua b/official/c7628844.lua index 2cc0f3d7f4..1da1501404 100644 --- a/official/c7628844.lua +++ b/official/c7628844.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --This card can make a second attack during each Battle Phase local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -78,4 +78,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c76290637.lua b/official/c76290637.lua index 9e4575e99d..bfe1f65d2d 100644 --- a/official/c76290637.lua +++ b/official/c76290637.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card from your GY to either field in Defense Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -97,4 +97,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end \ No newline at end of file +end diff --git a/official/c76372778.lua b/official/c76372778.lua index 0b6cbacc0d..0a5fe7caed 100644 --- a/official/c76372778.lua +++ b/official/c76372778.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,4 +41,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c76419637.lua b/official/c76419637.lua index 9fffb55ebc..1e638e2498 100644 --- a/official/c76419637.lua +++ b/official/c76419637.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={40424929} function s.dccon(e,tp,eg,ep,ev,re,r,rp) @@ -57,4 +57,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD,LOCATION_ONFIELD) Duel.Damage(p,ct*300,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c76589815.lua b/official/c76589815.lua index 8a211902a1..4b70d4cc03 100644 --- a/official/c76589815.lua +++ b/official/c76589815.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(2)) e3:SetTarget(s.cftg) e3:SetOperation(s.cfop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_BATTLIN_BOXER} function s.atfilter(c) @@ -63,4 +63,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) end end Duel.ShuffleHand(1-tp) -end \ No newline at end of file +end diff --git a/official/c770365.lua b/official/c770365.lua index ef2084ffd3..c3446ad9f9 100644 --- a/official/c770365.lua +++ b/official/c770365.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_SPELLBOOK} function s.atkval(e,c) @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() end Duel.SortDecktop(tp,tp,5) -end \ No newline at end of file +end diff --git a/official/c77205367.lua b/official/c77205367.lua index 6ad258b2ed..8606ca2ca0 100644 --- a/official/c77205367.lua +++ b/official/c77205367.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=96 s.listed_names={55727845} @@ -65,4 +65,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c77571454.lua b/official/c77571454.lua index cd1cffe2e5..a66d0cd89c 100644 --- a/official/c77571454.lua +++ b/official/c77571454.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.namechangetg) e3:SetOperation(s.namechangeop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Negate the activated effects of "Unknown" your opponent controls local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -69,4 +69,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end end -end \ No newline at end of file +end diff --git a/official/c77799846.lua b/official/c77799846.lua index 526aae1559..2975224464 100644 --- a/official/c77799846.lua +++ b/official/c77799846.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,mg) end end -end \ No newline at end of file +end diff --git a/official/c78135071.lua b/official/c78135071.lua index 2af87057fd..6154ed14be 100644 --- a/official/c78135071.lua +++ b/official/c78135071.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c78144171.lua b/official/c78144171.lua index d84d254498..7bb23c31a0 100644 --- a/official/c78144171.lua +++ b/official/c78144171.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.ovfilter(c,tp,lc) return c:IsFaceup() and c:IsRace(RACE_DRAGON,lc,SUMMON_TYPE_XYZ,tp) and c:IsAttribute(ATTRIBUTE_DARK,lc,SUMMON_TYPE_XYZ,tp) and c:IsLevelAbove(5) diff --git a/official/c78625448.lua b/official/c78625448.lua index 1274d9537a..99b96894f0 100644 --- a/official/c78625448.lua +++ b/official/c78625448.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=3 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c79559912.lua b/official/c79559912.lua index 8290d1f607..95b92cde60 100644 --- a/official/c79559912.lua +++ b/official/c79559912.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Search 1 "Dark Contract" card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c79625003.lua b/official/c79625003.lua index 77e60086e6..67b2387c35 100644 --- a/official/c79625003.lua +++ b/official/c79625003.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -76,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c80117527.lua b/official/c80117527.lua index b57d7dcff2..c1a47c4a40 100644 --- a/official/c80117527.lua +++ b/official/c80117527.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=11 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end \ No newline at end of file +end diff --git a/official/c80764541.lua b/official/c80764541.lua index 898fa8adf7..a2fe077231 100644 --- a/official/c80764541.lua +++ b/official/c80764541.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=44 function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -38,4 +38,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c80796456.lua b/official/c80796456.lua index d7a66ccbde..b07e8bfcc7 100644 --- a/official/c80796456.lua +++ b/official/c80796456.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atkup local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c80993256.lua b/official/c80993256.lua index 31e7494a76..11fd217fc3 100644 --- a/official/c80993256.lua +++ b/official/c80993256.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.matkval(e,c) local oc=e:GetHandler():GetOverlayCount() diff --git a/official/c81122844.lua b/official/c81122844.lua index a5ae8638b7..0bae9ce3d6 100644 --- a/official/c81122844.lua +++ b/official/c81122844.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --salvage local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_WIND_UP} function s.spfilter(c,e,tp) @@ -68,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c8165596.lua b/official/c8165596.lua index 8ca63e30e8..20ac7fcbf7 100644 --- a/official/c8165596.lua +++ b/official/c8165596.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,function(e,og) e:SetLabel(og:GetFirst():IsSetCard(SET_GALAXY) and 1 or 0) end)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Take 1 "Photon" or "Galaxy" card from your Deck, and either add it to your hand or attach it to this card as material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) diff --git a/official/c81927732.lua b/official/c81927732.lua index 312d3dc8ec..8cd9d236a5 100644 --- a/official/c81927732.lua +++ b/official/c81927732.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk/def local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) @@ -92,4 +92,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c82308875.lua b/official/c82308875.lua index 9c88e3c42f..19fde79c32 100644 --- a/official/c82308875.lua +++ b/official/c82308875.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.roll_dice=true s.xyz_number=7 @@ -72,4 +72,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD) end -end \ No newline at end of file +end diff --git a/official/c82633039.lua b/official/c82633039.lua index 54b8fad727..eeaf10b152 100644 --- a/official/c82633039.lua +++ b/official/c82633039.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Shuffle 1 face-up card into the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.setfilter(c) return c:IsFaceup() and c:IsCanTurnSet() @@ -62,4 +62,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c82697249.lua b/official/c82697249.lua index 48f872c583..750bc0440c 100644 --- a/official/c82697249.lua +++ b/official/c82697249.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=59 function s.imcon(e) @@ -58,4 +58,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c82944432.lua b/official/c82944432.lua index 23c5c0a5b5..6a8a35ce67 100644 --- a/official/c82944432.lua +++ b/official/c82944432.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_NINJA} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c83531441.lua b/official/c83531441.lua index ca8cdac92a..6cd6496569 100644 --- a/official/c83531441.lua +++ b/official/c83531441.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -91,4 +91,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c83827392.lua b/official/c83827392.lua index 768f11bcff..820c22fd59 100644 --- a/official/c83827392.lua +++ b/official/c83827392.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) @@ -56,4 +56,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c84013237.lua b/official/c84013237.lua index b6c288d8c1..f4d72a6843 100644 --- a/official/c84013237.lua +++ b/official/c84013237.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(function() Duel.NegateAttack() end) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Self destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -39,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c84025439.lua b/official/c84025439.lua index b8e60ffe61..77e80d7e98 100644 --- a/official/c84025439.lua +++ b/official/c84025439.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Unaffected by other effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -99,4 +99,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c84124261.lua b/official/c84124261.lua index e8b2c7207f..c963f5067e 100644 --- a/official/c84124261.lua +++ b/official/c84124261.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=39 function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +33,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c84224627.lua b/official/c84224627.lua index 6bdc72f2cf..82b0fa76dd 100644 --- a/official/c84224627.lua +++ b/official/c84224627.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) @@ -56,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(tc:GetBaseDefense()*2) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c84401683.lua b/official/c84401683.lua index c439d394d1..e1dfb0a8c2 100644 --- a/official/c84401683.lua +++ b/official/c84401683.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c84417082.lua b/official/c84417082.lua index 46abe584d7..5776d72154 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost1) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy2 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(s.cost2) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=91 function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk) @@ -56,4 +56,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c8491961.lua b/official/c8491961.lua index 84a7137642..578021fe27 100644 --- a/official/c8491961.lua +++ b/official/c8491961.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() and e:GetHandler():GetOverlayCount()>0 @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c85004150.lua b/official/c85004150.lua index 10125e445e..99f5a89772 100644 --- a/official/c85004150.lua +++ b/official/c85004150.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) -- local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -48,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=g:GetMaxGroup(Card.GetDefense) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c85115440.lua b/official/c85115440.lua index 3d2ea8485e..992b60f1b6 100644 --- a/official/c85115440.lua +++ b/official/c85115440.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) @@ -67,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c85121942.lua b/official/c85121942.lua index 33ac6e8bfb..7bcefe4b00 100644 --- a/official/c85121942.lua +++ b/official/c85121942.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=105 s.listed_names={59627393} @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c85252081.lua b/official/c85252081.lua index 0b9f356ef7..4c7f4ba505 100644 --- a/official/c85252081.lua +++ b/official/c85252081.lua @@ -23,14 +23,14 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum Blue Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e3:SetCondition(s.quickeffcond) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Attach 1 "Super Quantum" monster from your hand or field to this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c85692042.lua b/official/c85692042.lua index 4a8a1fbee3..37b4d925af 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,4)) @@ -142,4 +142,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c85747929.lua b/official/c85747929.lua index 28a6608cd7..9a08d5cd38 100644 --- a/official/c85747929.lua +++ b/official/c85747929.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Change levels to 4 or 8 local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -110,4 +110,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c8617563.lua b/official/c8617563.lua index f17f2ae311..f4c13da07f 100644 --- a/official/c8617563.lua +++ b/official/c8617563.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Search 1 "Rank-Up-Magic" Spell if it has a Winged Beast monster attached local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --A "Raidraptor" Xyz Monster that has this card as material gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_XMATERIAL) @@ -66,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c86221741.lua b/official/c86221741.lua index b2c08d0acd..f547839850 100644 --- a/official/c86221741.lua +++ b/official/c86221741.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Minus 1000 ATK for opp cards, optionally inflict damage local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -79,4 +79,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) else Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c86238081.lua b/official/c86238081.lua index b784f96cb9..618a9a0115 100644 --- a/official/c86238081.lua +++ b/official/c86238081.lua @@ -49,7 +49,7 @@ function s.initial_effect(c) e5:SetCost(Cost.Detach(1)) e5:SetTarget(s.destg) e5:SetOperation(s.desop) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) --Place itself into pendulum zone local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(id,2)) @@ -128,4 +128,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c86331741.lua b/official/c86331741.lua index 6cdf61c29d..a526d244fb 100644 --- a/official/c86331741.lua +++ b/official/c86331741.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Xyz Material local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -96,4 +96,4 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c86532744.lua b/official/c86532744.lua index 55b7d965c0..ff52d9499b 100644 --- a/official/c86532744.lua +++ b/official/c86532744.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=39 s.listed_names={84013237} --Number 39: Utopia @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(1-tp,ct*300,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c86848580.lua b/official/c86848580.lua index a64ac774f0..0c1aa61178 100644 --- a/official/c86848580.lua +++ b/official/c86848580.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end @@ -54,4 +54,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY,2) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c87327776.lua b/official/c87327776.lua index 6ed6c41581..1de8b23ef5 100644 --- a/official/c87327776.lua +++ b/official/c87327776.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return 1 monster on the field to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c87676171.lua b/official/c87676171.lua index d725c84cc2..4e633f536c 100644 --- a/official/c87676171.lua +++ b/official/c87676171.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_CRYSTAL_GOD_TISTINA) end) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon 1 "Tistina" monster from the GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c87911394.lua b/official/c87911394.lua index 8ab6016d70..32daba6455 100644 --- a/official/c87911394.lua +++ b/official/c87911394.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -69,4 +69,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c88021907.lua b/official/c88021907.lua index e335ab044b..b75c7966e6 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.tg) e1:SetOperation(s.op) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction replacement for "Mathmech" cards local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -138,4 +138,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end \ No newline at end of file +end diff --git a/official/c88120966.lua b/official/c88120966.lua index 55a8ce5de0..718d19a3d7 100644 --- a/official/c88120966.lua +++ b/official/c88120966.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=15 function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c88177324.lua b/official/c88177324.lua index b0099b3493..5819bcf6b2 100644 --- a/official/c88177324.lua +++ b/official/c88177324.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Can gain ATK and make a second attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -106,4 +106,4 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(1) e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e2) -end \ No newline at end of file +end diff --git a/official/c88581108.lua b/official/c88581108.lua index a7130c029c..e98fee6e70 100644 --- a/official/c88581108.lua +++ b/official/c88581108.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --"True Draco" and "True King" opponent destruction flag local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -68,4 +68,4 @@ function s.aclimit(e,re,tp) end function s.atktarget(e,c) return c:IsAttribute(e:GetLabel()) -end \ No newline at end of file +end diff --git a/official/c88722973.lua b/official/c88722973.lua index 026e35be63..d0192d8e8f 100644 --- a/official/c88722973.lua +++ b/official/c88722973.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_DRACOSLAYER} function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c88754763.lua b/official/c88754763.lua index 5be903838e..62ef332f53 100644 --- a/official/c88754763.lua +++ b/official/c88754763.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end \ No newline at end of file +end diff --git a/official/c88917691.lua b/official/c88917691.lua index e13b48b91c..44b55ffc27 100644 --- a/official/c88917691.lua +++ b/official/c88917691.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --A "Utopic Future" Xyz Monster that has this card as material gains this effect. --● If it is Xyz Summoned: Activate this effect; it can make a second attack during each Battle Phase this turn. local e2=Effect.CreateEffect(c) @@ -61,4 +61,4 @@ function s.secondattackop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c88942504.lua b/official/c88942504.lua index 5a0e67895c..27bfa26134 100644 --- a/official/c88942504.lua +++ b/official/c88942504.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_DJINN} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c89477759.lua b/official/c89477759.lua index b46d2df2e7..4775600421 100644 --- a/official/c89477759.lua +++ b/official/c89477759.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy and Special Summon (Battle Phase) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,0x53b,tp,tp,false,false,POS_FACEUP)>0 and e:GetHandler():IsRelateToEffect(e) then Duel.Overlay(tc,e:GetHandler()) end -end \ No newline at end of file +end diff --git a/official/c89516305.lua b/official/c89516305.lua index a1b8f864a9..212cdf1fd9 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.sttg) e1:SetOperation(s.stop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --turn set local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.settg) e2:SetOperation(s.setop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --atkup local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -42,7 +42,7 @@ function s.initial_effect(c) e3:SetCost(s.cost) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=87 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -108,4 +108,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c89642993.lua b/official/c89642993.lua index ec07df051e..65de697f5e 100644 --- a/official/c89642993.lua +++ b/official/c89642993.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eftg) e1:SetOperation(s.efop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=63 function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -44,4 +44,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c90098780.lua b/official/c90098780.lua index d70baf525a..e61ad2b3a8 100644 --- a/official/c90098780.lua +++ b/official/c90098780.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_DJINN} function s.filter(c,e,tp) @@ -68,4 +68,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c90162951.lua b/official/c90162951.lua index 12840437de..de98910ce5 100644 --- a/official/c90162951.lua +++ b/official/c90162951.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Register flag in order to avoid some loops with certain anime cards local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) @@ -68,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,c:GetAttack()) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c90664857.lua b/official/c90664857.lua index ed66ee57d5..172ca85946 100644 --- a/official/c90664857.lua +++ b/official/c90664857.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.indtg) e1:SetOperation(s.indop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Banish a battled monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c90726340.lua b/official/c90726340.lua index cc379f315e..c9fbfcae2c 100644 --- a/official/c90726340.lua +++ b/official/c90726340.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indtg(e,c) return c:IsRace(RACE_DRAGON) and c:GetCode()~=id @@ -66,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c90809975.lua b/official/c90809975.lua index a48eb02319..ca5d5a804b 100644 --- a/official/c90809975.lua +++ b/official/c90809975.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate activation local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -125,4 +125,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c91279700.lua b/official/c91279700.lua index 07fac66b00..3316e53021 100644 --- a/official/c91279700.lua +++ b/official/c91279700.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_INFESTATION,SET_LSWARM} function s.dscon(e) @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c91499077.lua b/official/c91499077.lua index da3ceffd5c..8398a832a2 100644 --- a/official/c91499077.lua +++ b/official/c91499077.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --When your monster is targeted for attack, change the attack target to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -67,4 +67,4 @@ function s.cbop(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(at,c) end end -end \ No newline at end of file +end diff --git a/official/c9161357.lua b/official/c9161357.lua index 57aec67ad0..46751d96c7 100644 --- a/official/c9161357.lua +++ b/official/c9161357.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(s.lpcost) e2:SetOperation(s.lpop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=6 @@ -96,4 +96,4 @@ function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end \ No newline at end of file +end diff --git a/official/c91895091.lua b/official/c91895091.lua index 1130ea831a..9f57188177 100644 --- a/official/c91895091.lua +++ b/official/c91895091.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c92661479.lua b/official/c92661479.lua index a279fa791d..e13fc122bf 100644 --- a/official/c92661479.lua +++ b/official/c92661479.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c9272381.lua b/official/c9272381.lua index e4ce7627a2..c82ca739f2 100644 --- a/official/c9272381.lua +++ b/official/c9272381.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.target) e4:SetOperation(s.operation) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) diff --git a/official/c92918648.lua b/official/c92918648.lua index fcc06f657e..c797f9ef8e 100644 --- a/official/c92918648.lua +++ b/official/c92918648.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_SPELLBOOK} function s.cfilter(c) @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c93039339.lua b/official/c93039339.lua index b12050ac8f..93ad6a1efe 100644 --- a/official/c93039339.lua +++ b/official/c93039339.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Register Special Summons from the Extra Deck aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g,true) Duel.SendtoHand(g,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c93568288.lua b/official/c93568288.lua index b307cb05c9..aca9914d3b 100644 --- a/official/c93568288.lua +++ b/official/c93568288.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=80 function s.filter(c) @@ -82,4 +82,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c93713837.lua b/official/c93713837.lua index c434818ad2..f5fa5dc37f 100644 --- a/official/c93713837.lua +++ b/official/c93713837.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -87,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c93730230.lua b/official/c93730230.lua index df496c2044..6b79c37db0 100644 --- a/official/c93730230.lua +++ b/official/c93730230.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c94119480.lua b/official/c94119480.lua index f4c1383203..21e0c81dde 100644 --- a/official/c94119480.lua +++ b/official/c94119480.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -30,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c94151981.lua b/official/c94151981.lua index 28480485b9..b3a80fe629 100644 --- a/official/c94151981.lua +++ b/official/c94151981.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.drwtg) e2:SetOperation(s.drwop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Your opponent cannot activate cards or effects if the equipped monster battles local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -73,4 +73,4 @@ end function s.btlcond(e) local ec=e:GetHandler():GetEquipTarget() return ec and (Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec) -end \ No newline at end of file +end diff --git a/official/c94380860.lua b/official/c94380860.lua index 92cfe1824f..9ea801efad 100644 --- a/official/c94380860.lua +++ b/official/c94380860.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=103 function s.filter(c,e) @@ -48,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c9453320.lua b/official/c9453320.lua index 4017f958aa..2fb261aab7 100644 --- a/official/c9453320.lua +++ b/official/c9453320.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.settg) e4:SetOperation(s.setop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_ABYSS} function s.spfilter(c,e,tp) diff --git a/official/c9486959.lua b/official/c9486959.lua index 662c9cc370..9a461c7ffd 100644 --- a/official/c9486959.lua +++ b/official/c9486959.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return to the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -90,4 +90,4 @@ function s.matpreop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetOverlayGroup() g:KeepAlive() e:GetLabelObject():SetLabelObject(g) -end \ No newline at end of file +end diff --git a/official/c95113856.lua b/official/c95113856.lua index aebb59c63c..70f5c27ea9 100644 --- a/official/c95113856.lua +++ b/official/c95113856.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,1,nil) end @@ -68,4 +68,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c95134948.lua b/official/c95134948.lua index be9f4c8ed2..051c3da207 100644 --- a/official/c95134948.lua +++ b/official/c95134948.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --disable attack local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -123,4 +123,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(0) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c95169481.lua b/official/c95169481.lua index 5015fdf9fa..4b074e5f68 100644 --- a/official/c95169481.lua +++ b/official/c95169481.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.desfilter(c) return c:IsFaceup() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) @@ -35,4 +35,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c95239444.lua b/official/c95239444.lua index bdf00b2efd..9b41737b0a 100644 --- a/official/c95239444.lua +++ b/official/c95239444.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.cfilter(c,lv) return c:IsRace(RACE_PLANT) and c:IsLevelBelow(lv) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() @@ -78,4 +78,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(mg:GetFirst(),1) end end -end \ No newline at end of file +end diff --git a/official/c95243515.lua b/official/c95243515.lua index db54f8ace1..00fba92d06 100644 --- a/official/c95243515.lua +++ b/official/c95243515.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Can attack directly local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) diff --git a/official/c95442074.lua b/official/c95442074.lua index 0ec57a4de7..e5a9e22686 100644 --- a/official/c95442074.lua +++ b/official/c95442074.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be destroyed local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ end function s.refcon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and Duel.GetAttackTarget()==e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c95474755.lua b/official/c95474755.lua index 079e3a0b77..7b0b1bbd95 100644 --- a/official/c95474755.lua +++ b/official/c95474755.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.extg) e1:SetOperation(s.exop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Banish 1 card from the opponent's GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -100,4 +100,4 @@ function s.dkop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetDecktopGroup(1-tp,ct) Duel.DisableShuffleCheck() Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c95685352.lua b/official/c95685352.lua index a8fff2952f..8654fbb7a4 100644 --- a/official/c95685352.lua +++ b/official/c95685352.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.atkop2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --place in pendulum zone local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -97,4 +97,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c95992081.lua b/official/c95992081.lua index 4258cfa505..038840eaf7 100644 --- a/official/c95992081.lua +++ b/official/c95992081.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c96157835.lua b/official/c96157835.lua index 67d010030e..478bc09877 100644 --- a/official/c96157835.lua +++ b/official/c96157835.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --extra attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -81,4 +81,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,c) end end -end \ No newline at end of file +end diff --git a/official/c96471335.lua b/official/c96471335.lua index 2191a8511c..ffbe960a58 100644 --- a/official/c96471335.lua +++ b/official/c96471335.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --remove local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -65,4 +65,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c96592102.lua b/official/c96592102.lua index 72c3b1c064..3556ab5950 100644 --- a/official/c96592102.lua +++ b/official/c96592102.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 and e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ @@ -61,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g,true) Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c96864105.lua b/official/c96864105.lua index afead73d09..f3240611a8 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --indes local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -54,4 +54,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) -end \ No newline at end of file +end diff --git a/official/c97170107.lua b/official/c97170107.lua index 725184b480..8d62bc98c5 100644 --- a/official/c97170107.lua +++ b/official/c97170107.lua @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SUMMON_SUCCESS) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsControler(1-tp) and c:GetAttack()>0 and (not e or c:IsRelateToEffect(e)) @@ -38,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c97403510.lua b/official/c97403510.lua index de3e00d351..acc2df16ee 100644 --- a/official/c97403510.lua +++ b/official/c97403510.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -109,4 +109,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c97453744.lua b/official/c97453744.lua index 085b4b121c..9f75a0910b 100644 --- a/official/c97453744.lua +++ b/official/c97453744.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end --Cannot target other monsters for attacks function s.tgtg(e,c) @@ -103,4 +103,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c97584719.lua b/official/c97584719.lua index f044176e18..e2a44e389c 100644 --- a/official/c97584719.lua +++ b/official/c97584719.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetMatchingGroupCount(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon this card from the GY in Defense Position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c99469936.lua b/official/c99469936.lua index 99aa1a329d..13523ca136 100644 --- a/official/c99469936.lua +++ b/official/c99469936.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:GetRank()==5 and c:IsAttribute(ATTRIBUTE_WATER,xyzc,SUMMON_TYPE_XYZ,tp) @@ -66,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c99666430.lua b/official/c99666430.lua index 27856fbbe5..2d09ce4d0c 100644 --- a/official/c99666430.lua +++ b/official/c99666430.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ctrltg) e1:SetOperation(s.ctrlop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Tribute 1 monster, and if you do, destroy 1 face-up card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -70,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua index 1c2bff4300..8536d879a2 100644 --- a/pre-release/c101302106.lua +++ b/pre-release/c101302106.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --A targeted "D/D" Effect Monster gains an effect until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c100000178.lua b/unofficial/c100000178.lua index 876d104f48..15415cad73 100644 --- a/unofficial/c100000178.lua +++ b/unofficial/c100000178.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -27,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(800) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e:GetHandler():RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/unofficial/c100000179.lua b/unofficial/c100000179.lua index eff49a1dc8..782e9f33e8 100644 --- a/unofficial/c100000179.lua +++ b/unofficial/c100000179.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e:GetHandler():RegisterEffect(e2) -end \ No newline at end of file +end diff --git a/unofficial/c100000498.lua b/unofficial/c100000498.lua index b0f36c3acb..5c7d3b947a 100644 --- a/unofficial/c100000498.lua +++ b/unofficial/c100000498.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.negcost) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) @@ -40,4 +40,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then Duel.BreakEffect() end -end \ No newline at end of file +end diff --git a/unofficial/c100000549.lua b/unofficial/c100000549.lua index 4aaea8e51f..1ba619107c 100644 --- a/unofficial/c100000549.lua +++ b/unofficial/c100000549.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c111011803.lua b/unofficial/c111011803.lua index 80961c2f93..4d792ea0d7 100644 --- a/unofficial/c111011803.lua +++ b/unofficial/c111011803.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -34,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:SetStatus(STATUS_SET_TURN,false) end end -end \ No newline at end of file +end diff --git a/unofficial/c111011903.lua b/unofficial/c111011903.lua index efea63fb84..64947ed03b 100644 --- a/unofficial/c111011903.lua +++ b/unofficial/c111011903.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c111011904.lua b/unofficial/c111011904.lua index a6f4d18af5..ab78cf1601 100644 --- a/unofficial/c111011904.lua +++ b/unofficial/c111011904.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.actg) e2:SetOperation(s.acop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.thfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() @@ -165,4 +165,4 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp,chk) end end end -end \ No newline at end of file +end diff --git a/unofficial/c111011905.lua b/unofficial/c111011905.lua index 391033798b..8d2bf1573f 100644 --- a/unofficial/c111011905.lua +++ b/unofficial/c111011905.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dg=g:Select(1-tp,ct,ct,nil) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511000034.lua b/unofficial/c511000034.lua index 49f96a1621..c7e4963279 100644 --- a/unofficial/c511000034.lua +++ b/unofficial/c511000034.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCondition(s.condition) e2:SetCost(s.cost) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atktg(e,c) return c==e:GetHandler():GetBattleTarget() @@ -69,4 +69,4 @@ end function s.baseval(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler():GetBattleTarget() return c:GetBaseAttack() -end \ No newline at end of file +end diff --git a/unofficial/c511000041.lua b/unofficial/c511000041.lua index 9ac2c0070b..743b3f6337 100644 --- a/unofficial/c511000041.lua +++ b/unofficial/c511000041.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.catg) e2:SetOperation(s.caop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,4 +54,4 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChainAttack(tc) end -end \ No newline at end of file +end diff --git a/unofficial/c511000183.lua b/unofficial/c511000183.lua index 601253ca49..8a770685d6 100644 --- a/unofficial/c511000183.lua +++ b/unofficial/c511000183.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --battle indestructable local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) @@ -79,4 +79,4 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end \ No newline at end of file +end diff --git a/unofficial/c511000184.lua b/unofficial/c511000184.lua index 3d6da9ea34..4a685b935d 100644 --- a/unofficial/c511000184.lua +++ b/unofficial/c511000184.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.tbcon) e1:SetCost(s.tbcost) e1:SetOperation(s.tbop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -69,4 +69,4 @@ function s.dfilter(c,atk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511000192.lua b/unofficial/c511000192.lua index c61e684889..2d17cd110c 100644 --- a/unofficial/c511000192.lua +++ b/unofficial/c511000192.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetCountLimit(1) e4:SetCost(s.cost) e4:SetOperation(s.op2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Prevent Effect damage local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(20450925,0)) @@ -51,7 +51,7 @@ function s.initial_effect(c) e5:SetCountLimit(1) e5:SetCost(s.cost) e5:SetOperation(s.op3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.xyz_number=0 function s.xyzfilter(c,xyz,sumtype,tp) @@ -104,4 +104,4 @@ function s.damval(e,re,val,r,rp,rc) else return val end -end \ No newline at end of file +end diff --git a/unofficial/c511000230.lua b/unofficial/c511000230.lua index 8695cf0778..50fdca17b9 100644 --- a/unofficial/c511000230.lua +++ b/unofficial/c511000230.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000231.lua b/unofficial/c511000231.lua index c0b60518c1..2581ae73c3 100644 --- a/unofficial/c511000231.lua +++ b/unofficial/c511000231.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000232.lua b/unofficial/c511000232.lua index 9ea5bb9c53..e86efdd636 100644 --- a/unofficial/c511000232.lua +++ b/unofficial/c511000232.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000233.lua b/unofficial/c511000233.lua index 0e136fcf1b..ab8fb3afb9 100644 --- a/unofficial/c511000233.lua +++ b/unofficial/c511000233.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000277.lua b/unofficial/c511000277.lua index c4f8476f1e..f7e1e41bc2 100644 --- a/unofficial/c511000277.lua +++ b/unofficial/c511000277.lua @@ -98,7 +98,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.damop) e1:SetLabel(e:GetLabel()) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) end end @@ -114,4 +114,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511000294.lua b/unofficial/c511000294.lua index 5e6fe90250..ac6304cfc4 100644 --- a/unofficial/c511000294.lua +++ b/unofficial/c511000294.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetCost(s.descost) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Destroy and Special Summon (Battle Phase) local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) @@ -143,4 +143,4 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp) g=g:Select(tp,ft,ft,nil) end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end \ No newline at end of file +end diff --git a/unofficial/c511000296.lua b/unofficial/c511000296.lua index fd9de74524..21d0ddca9b 100644 --- a/unofficial/c511000296.lua +++ b/unofficial/c511000296.lua @@ -61,7 +61,7 @@ function s.initial_effect(c) e7:SetCost(s.nacost) e7:SetTarget(s.natg) e7:SetOperation(s.naop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) --number generic effect local e8=Effect.CreateEffect(c) e8:SetType(EFFECT_TYPE_SINGLE) @@ -136,4 +136,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then Duel.Recover(tp,Duel.GetAttacker():GetAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511000369.lua b/unofficial/c511000369.lua index a1e28861a0..d86f693aeb 100644 --- a/unofficial/c511000369.lua +++ b/unofficial/c511000369.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.regop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Cannot be destroyed by battle local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) @@ -184,4 +184,4 @@ function s.stcheck(e,tp,eg,ep,ev,re,r,rp) tc=g:GetNext() end end -end \ No newline at end of file +end diff --git a/unofficial/c511000512.lua b/unofficial/c511000512.lua index a64dbe176d..92a5be8d02 100644 --- a/unofficial/c511000512.lua +++ b/unofficial/c511000512.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511000513.lua b/unofficial/c511000513.lua index 0b9fd3eaf2..2c070450f2 100644 --- a/unofficial/c511000513.lua +++ b/unofficial/c511000513.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.desatchtg) e2:SetOperation(s.desatchop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --If this card would be banished, you can detach 1 material from this card instead local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -55,4 +55,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_COST) return true else return false end -end \ No newline at end of file +end diff --git a/unofficial/c511000515.lua b/unofficial/c511000515.lua index e289a2e9cc..a14c92ef50 100644 --- a/unofficial/c511000515.lua +++ b/unofficial/c511000515.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCondition(s.atcon) e3:SetCost(s.atcost) e3:SetOperation(s.atop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --remove local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) @@ -122,4 +122,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511000674.lua b/unofficial/c511000674.lua index 2ebcb10001..6e639b13f2 100644 --- a/unofficial/c511000674.lua +++ b/unofficial/c511000674.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetCost(s.cost) e4:SetTarget(s.target) e4:SetOperation(s.operation) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end function s.bttg(e,c) return not c:IsSpecialSummoned() @@ -60,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) e:GetHandler():RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511000675.lua b/unofficial/c511000675.lua index 8b32cacad9..5a27bc578d 100644 --- a/unofficial/c511000675.lua +++ b/unofficial/c511000675.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkfilter(c) return c:IsLevelAbove(5) and c:HasNonZeroAttack() @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/unofficial/c511001247.lua b/unofficial/c511001247.lua index e6ab665c66..5ed3e62872 100644 --- a/unofficial/c511001247.lua +++ b/unofficial/c511001247.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -34,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511001273.lua b/unofficial/c511001273.lua index 5f716870c2..cfb7ff2135 100644 --- a/unofficial/c511001273.lua +++ b/unofficial/c511001273.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to grave local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -143,4 +143,4 @@ function s.numspop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511001275.lua b/unofficial/c511001275.lua index 50b8e107de..33b6a7d6bb 100644 --- a/unofficial/c511001275.lua +++ b/unofficial/c511001275.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCondition(s.con) e3:SetCost(s.cost) e3:SetOperation(s.op) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --gain atk local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) @@ -150,4 +150,4 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511001338.lua b/unofficial/c511001338.lua index 674d2c3443..1e29a53212 100644 --- a/unofficial/c511001338.lua +++ b/unofficial/c511001338.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(s.descost) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --battle indestructable local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) @@ -102,4 +102,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511001339.lua b/unofficial/c511001339.lua index ae4969f7d3..619aba5692 100644 --- a/unofficial/c511001339.lua +++ b/unofficial/c511001339.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle, expect with "Number" monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -82,4 +82,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e) return e:GetHandler():GetCounter(0x1101)>0 -end \ No newline at end of file +end diff --git a/unofficial/c511001371.lua b/unofficial/c511001371.lua index 1008150b6c..7f7c0e9aec 100644 --- a/unofficial/c511001371.lua +++ b/unofficial/c511001371.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_RANKUP_EFFECT) e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) c:RegisterEffect(e6) @@ -96,4 +96,4 @@ 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 +end diff --git a/unofficial/c511001372.lua b/unofficial/c511001372.lua index eccd10d66e..394ae48ee9 100644 --- a/unofficial/c511001372.lua +++ b/unofficial/c511001372.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_RANKUP_EFFECT) e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) c:RegisterEffect(e6) @@ -71,4 +71,4 @@ function s.winop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetOverlayCount()==0 then Duel.Win(tp,WIN_REASON_DISASTER_LEO) end -end \ No newline at end of file +end diff --git a/unofficial/c511001374.lua b/unofficial/c511001374.lua index 21d8ead76b..5749b901fd 100644 --- a/unofficial/c511001374.lua +++ b/unofficial/c511001374.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.listed_names={CARD_UNKNOWN} @@ -112,4 +112,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) bc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511001376.lua b/unofficial/c511001376.lua index 6b961880f5..e7e7074040 100644 --- a/unofficial/c511001376.lua +++ b/unofficial/c511001376.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(s.cost) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --return local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -46,7 +46,7 @@ function s.initial_effect(c) e4:SetCost(s.cost) e4:SetTarget(s.rettg) e4:SetOperation(s.retop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --special summon local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -124,4 +124,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(tc,tp,tp,tc:GetPreviousLocation(),tc:GetPreviousPosition(),true,(1<0 and Duel.SpecialSummon(g,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then g:GetFirst():CompleteProcedure() end -end \ No newline at end of file +end diff --git a/unofficial/c511002076.lua b/unofficial/c511002076.lua index e4ca7c8659..1696d7abc0 100644 --- a/unofficial/c511002076.lua +++ b/unofficial/c511002076.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) tc=g:GetNext() end -end \ No newline at end of file +end diff --git a/unofficial/c511002077.lua b/unofficial/c511002077.lua index be61301aa6..e86a00fd2a 100644 --- a/unofficial/c511002077.lua +++ b/unofficial/c511002077.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002079.lua b/unofficial/c511002079.lua index 70ffb3c5d7..2214f44f4e 100644 --- a/unofficial/c511002079.lua +++ b/unofficial/c511002079.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.negcost) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -143,4 +143,4 @@ function s.endop(e,tp,eg,ep,ev,re,r,rp) end function s.unval(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() -end \ No newline at end of file +end diff --git a/unofficial/c511002088.lua b/unofficial/c511002088.lua index 6d1f50ad3e..4495ad655a 100644 --- a/unofficial/c511002088.lua +++ b/unofficial/c511002088.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle by non-"Number" monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002090.lua b/unofficial/c511002090.lua index ad188aceaa..6f8b62a74e 100644 --- a/unofficial/c511002090.lua +++ b/unofficial/c511002090.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(s.lpcost) e2:SetOperation(s.lpop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --lp - 0 materials local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(52090844,0)) @@ -144,4 +144,4 @@ function s.lpchk(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002091.lua b/unofficial/c511002091.lua index a5aa2e1176..91bca600f6 100644 --- a/unofficial/c511002091.lua +++ b/unofficial/c511002091.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002092.lua b/unofficial/c511002092.lua index 7acea091ea..fc071c21a0 100644 --- a/unofficial/c511002092.lua +++ b/unofficial/c511002092.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -46,4 +46,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002111.lua b/unofficial/c511002111.lua index deb5715dc9..d80c9de1b7 100644 --- a/unofficial/c511002111.lua +++ b/unofficial/c511002111.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Destroy monster targeted by previous effect when it declares an attack local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(50491121,0)) @@ -83,4 +83,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,tc:GetPreviousAttackOnField(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002112.lua b/unofficial/c511002112.lua index c872a18bb0..c00140df87 100644 --- a/unofficial/c511002112.lua +++ b/unofficial/c511002112.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(p,Duel.GetLP(p)/2) end end -end \ No newline at end of file +end diff --git a/unofficial/c511002384.lua b/unofficial/c511002384.lua index 285336143d..7a5563bdcc 100644 --- a/unofficial/c511002384.lua +++ b/unofficial/c511002384.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Disable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -71,4 +71,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT+0x57a0000) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/unofficial/c511002482.lua b/unofficial/c511002482.lua index 9dfc15b6df..d21a1c4d22 100644 --- a/unofficial/c511002482.lua +++ b/unofficial/c511002482.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_RANKUP_EFFECT) e3:SetLabelObject(e2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_NUMBER} s.listed_names={88120966} @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002543.lua b/unofficial/c511002543.lua index ff030a8259..3183bebd1f 100644 --- a/unofficial/c511002543.lua +++ b/unofficial/c511002543.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.discost) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Double Snare local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -71,4 +71,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e4:SetValue(-atk) tg:RegisterEffect(e4) end -end \ No newline at end of file +end diff --git a/unofficial/c511002599.lua b/unofficial/c511002599.lua index 53dc14bfc8..1e021f932a 100644 --- a/unofficial/c511002599.lua +++ b/unofficial/c511002599.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCondition(function(e) return Duel.GetAttacker() and not e:GetHandler():IsStatus(STATUS_CHAINING) end) e2:SetCost(Cost.Detach(1)) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} -s.xyz_number=39 \ No newline at end of file +s.xyz_number=39 diff --git a/unofficial/c511002658.lua b/unofficial/c511002658.lua index 48ac9d7d43..5debd36d0e 100644 --- a/unofficial/c511002658.lua +++ b/unofficial/c511002658.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002727.lua b/unofficial/c511002727.lua index 58efdf2783..cfe385027c 100644 --- a/unofficial/c511002727.lua +++ b/unofficial/c511002727.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetCondition(function(e,tp) return Duel.GetBattleDamage(tp)>=Duel.GetLP(tp) end) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.damop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.xyz_number=54 @@ -48,4 +48,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) Duel.SetLP(tp,100,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002737.lua b/unofficial/c511002737.lua index 3b8208450a..d48f4ab33f 100644 --- a/unofficial/c511002737.lua +++ b/unofficial/c511002737.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -42,4 +42,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002749.lua b/unofficial/c511002749.lua index 7774d0aceb..b1a1ba14f9 100644 --- a/unofficial/c511002749.lua +++ b/unofficial/c511002749.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --desrep local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/unofficial/c511002762.lua b/unofficial/c511002762.lua index 9b7e67e6cd..c8e21e8c96 100644 --- a/unofficial/c511002762.lua +++ b/unofficial/c511002762.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_START) e2:SetCost(s.cost) e2:SetOperation(s.op) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -37,4 +37,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e) return Duel.GetLP(e:GetHandlerPlayer())>500 -end \ No newline at end of file +end diff --git a/unofficial/c511002763.lua b/unofficial/c511002763.lua index c3ba900c7b..f71e52a68f 100644 --- a/unofficial/c511002763.lua +++ b/unofficial/c511002763.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) @@ -45,4 +45,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511002764.lua b/unofficial/c511002764.lua index 39d25cf594..1b9da64166 100644 --- a/unofficial/c511002764.lua +++ b/unofficial/c511002764.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.retcost) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end @@ -37,4 +37,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,ct1*500,REASON_EFFECT,true) Duel.Damage(1-tp,ct2*500,REASON_EFFECT,true) Duel.RDComplete() -end \ No newline at end of file +end diff --git a/unofficial/c511002778.lua b/unofficial/c511002778.lua index faf71ab0e0..aebbd28f28 100644 --- a/unofficial/c511002778.lua +++ b/unofficial/c511002778.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(96470883,1)) @@ -84,4 +84,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,atk,REASON_EFFECT,true) Duel.RDComplete() end -end \ No newline at end of file +end diff --git a/unofficial/c511002829.lua b/unofficial/c511002829.lua index 4eb9c6178b..8acfeaff74 100644 --- a/unofficial/c511002829.lua +++ b/unofficial/c511002829.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) g:AddCard(tc2) Duel.SendtoGrave(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002830.lua b/unofficial/c511002830.lua index 8476c34d44..708e43beed 100644 --- a/unofficial/c511002830.lua +++ b/unofficial/c511002830.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.ctcost) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy & damage local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(75433814,1)) @@ -84,4 +84,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002839.lua b/unofficial/c511002839.lua index 5afdd13383..8ed0fc9251 100644 --- a/unofficial/c511002839.lua +++ b/unofficial/c511002839.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/unofficial/c511002855.lua b/unofficial/c511002855.lua index 0c74702e77..e7217c27c5 100644 --- a/unofficial/c511002855.lua +++ b/unofficial/c511002855.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_RANKUP_EFFECT) e3:SetLabelObject(e2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={30741334} function s.uncon(e,tp,eg,ep,ev,re,r,rp) @@ -132,4 +132,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.BreakEffect() Duel.SendtoGrave(sg,REASON_EFFECT) Duel.ShuffleHand(1-tp) -end \ No newline at end of file +end diff --git a/unofficial/c511002858.lua b/unofficial/c511002858.lua index ad84c9b2d7..07e53ec77b 100644 --- a/unofficial/c511002858.lua +++ b/unofficial/c511002858.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(s.descost) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp @@ -65,4 +65,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002864.lua b/unofficial/c511002864.lua index 9b9fff94db..9b3b705eba 100644 --- a/unofficial/c511002864.lua +++ b/unofficial/c511002864.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/unofficial/c511002866.lua b/unofficial/c511002866.lua index f87e938e14..d7fe1f1146 100644 --- a/unofficial/c511002866.lua +++ b/unofficial/c511002866.lua @@ -41,10 +41,10 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) local e5=e4:Clone() e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_series={SET_NUMBER} s.listed_names={2407234} @@ -86,4 +86,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002870.lua b/unofficial/c511002870.lua index f3d0c76533..3927cf4589 100644 --- a/unofficial/c511002870.lua +++ b/unofficial/c511002870.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.disatkchtg) e2:SetOperation(s.disatkchop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Detach all materials from this to prevent this card's destruction (Battle) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -137,4 +137,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) end c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511002871.lua b/unofficial/c511002871.lua index 98d53206bf..0c3ef577bd 100644 --- a/unofficial/c511002871.lua +++ b/unofficial/c511002871.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.listed_names={2061963} @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) end end -end \ No newline at end of file +end diff --git a/unofficial/c511002872.lua b/unofficial/c511002872.lua index 264e0e5eac..a2186fcbd2 100644 --- a/unofficial/c511002872.lua +++ b/unofficial/c511002872.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.listed_names={59627393} @@ -73,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then Duel.Damage(1-tp,g:GetFirst():GetPreviousAttackOnField(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002873.lua b/unofficial/c511002873.lua index 6bf2fb912b..4fbd672b55 100644 --- a/unofficial/c511002873.lua +++ b/unofficial/c511002873.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.eqcost) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --direct local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -96,4 +96,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002896.lua b/unofficial/c511002896.lua index 3986a57fc4..d4660e9fbe 100644 --- a/unofficial/c511002896.lua +++ b/unofficial/c511002896.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Draw 1 card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -77,4 +77,4 @@ 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 +end diff --git a/unofficial/c511002912.lua b/unofficial/c511002912.lua index 34cfcc9ffe..d4adb04c09 100644 --- a/unofficial/c511002912.lua +++ b/unofficial/c511002912.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511002913.lua b/unofficial/c511002913.lua index 85fe32df51..d94b30cbd5 100644 --- a/unofficial/c511002913.lua +++ b/unofficial/c511002913.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511003224.lua b/unofficial/c511003224.lua index 5cf80dc9b5..624c9112aa 100644 --- a/unofficial/c511003224.lua +++ b/unofficial/c511003224.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.xyzcheck(g,tp,xyz) local mg=g:Filter(Card.IsAttribute,nil,ATTRIBUTE_EARTH) @@ -70,4 +70,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) bc:RegisterEffect(e1) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) end -end \ No newline at end of file +end diff --git a/unofficial/c511003236.lua b/unofficial/c511003236.lua index f25e5d7d91..bd3602b7b5 100644 --- a/unofficial/c511003236.lua +++ b/unofficial/c511003236.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Always Battle Destroy local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -60,4 +60,4 @@ function s.tg(e,c) end function s.val(e,re,c) return re:GetOwnerPlayer()~=e:GetHandlerPlayer() -end \ No newline at end of file +end diff --git a/unofficial/c511009002.lua b/unofficial/c511009002.lua index 7ed30c9097..44bfa814bb 100644 --- a/unofficial/c511009002.lua +++ b/unofficial/c511009002.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCost(s.btcost) e2:SetTarget(s.bttg) e2:SetOperation(s.btop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.filter(c) return c:IsSpecialSummoned() and c:HasNonZeroAttack() @@ -115,4 +115,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511009026.lua b/unofficial/c511009026.lua index 8ee800bf40..f62fc418e0 100644 --- a/unofficial/c511009026.lua +++ b/unofficial/c511009026.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.tgfilter(c) return c:IsRace(RACE_MACHINE) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) and c:IsFaceup() diff --git a/unofficial/c511009062.lua b/unofficial/c511009062.lua index a7afc28519..45eee02058 100644 --- a/unofficial/c511009062.lua +++ b/unofficial/c511009062.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()==PHASE_MAIN1 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511009074.lua b/unofficial/c511009074.lua index bc77583387..1cd352f824 100644 --- a/unofficial/c511009074.lua +++ b/unofficial/c511009074.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.efcon) e2:SetTarget(s.eftg) e2:SetLabelObject(e1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --negate local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetOperation(s.disop) local e4=e2:Clone() e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Double Snare local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) @@ -112,4 +112,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.NegateEffect(ev) end -end \ No newline at end of file +end diff --git a/unofficial/c511009136.lua b/unofficial/c511009136.lua index 62e8706216..b89ba93130 100644 --- a/unofficial/c511009136.lua +++ b/unofficial/c511009136.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.efcon) e2:SetTarget(s.eftg) e2:SetLabelObject(e1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_MATERIAL_CHECK) @@ -136,4 +136,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) else e:GetLabelObject():SetLabel(0) end -end \ No newline at end of file +end diff --git a/unofficial/c511009321.lua b/unofficial/c511009321.lua index 28bba89dc6..57bf6189c5 100644 --- a/unofficial/c511009321.lua +++ b/unofficial/c511009321.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/unofficial/c511009340.lua b/unofficial/c511009340.lua index 3a9458def2..7e668424ce 100644 --- a/unofficial/c511009340.lua +++ b/unofficial/c511009340.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) --To Pendulum local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(id,2)) @@ -150,4 +150,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511009387.lua b/unofficial/c511009387.lua index d03c569588..0719c10070 100644 --- a/unofficial/c511009387.lua +++ b/unofficial/c511009387.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --pendulum local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(90036274,0)) @@ -91,4 +91,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511009462.lua b/unofficial/c511009462.lua index f70756e465..6b9c84d8d1 100644 --- a/unofficial/c511009462.lua +++ b/unofficial/c511009462.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index a15393e23b..cdd8f2c453 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -192,4 +192,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end end -end \ No newline at end of file +end diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index cb3074ca07..0a87b8b98b 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.indcon) e1:SetCost(s.indcost) e1:SetOperation(s.indop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -80,7 +80,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -127,4 +127,4 @@ function s.dirregop(e,tp,eg,ep,ev,re,r,rp) end function s.dircon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 -end \ No newline at end of file +end diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index 551392e609..234901353a 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rtgtg) e1:SetOperation(s.rtgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Allow 1 "Raidraptor" monster to attack multiple times in a row local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -106,4 +106,4 @@ function s.chainatkop(c,ac) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ac:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/unofficial/c511009951.lua b/unofficial/c511009951.lua index c34495ce27..99df687dd7 100644 --- a/unofficial/c511009951.lua +++ b/unofficial/c511009951.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,alias) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(alias,1)) @@ -83,4 +83,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.cfilter,1,nil,tp) then e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010007.lua b/unofficial/c511010007.lua index 4297d020fc..b49e8e2706 100644 --- a/unofficial/c511010007.lua +++ b/unofficial/c511010007.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=7 s.roll_dice=true @@ -50,4 +50,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010009.lua b/unofficial/c511010009.lua index 2e02693b48..ef1bf8f6a2 100644 --- a/unofficial/c511010009.lua +++ b/unofficial/c511010009.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCondition(s.dacon) e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.daop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Cannot be destroyed by battle, except by "Number" monsters local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) @@ -90,4 +90,4 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010010.lua b/unofficial/c511010010.lua index 52b04f36b9..1d4b0db55d 100644 --- a/unofficial/c511010010.lua +++ b/unofficial/c511010010.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010011.lua b/unofficial/c511010011.lua index cddc6fa48d..2fa0243f6f 100644 --- a/unofficial/c511010011.lua +++ b/unofficial/c511010011.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010020.lua b/unofficial/c511010020.lua index 8ef5e133ea..52e23d964b 100644 --- a/unofficial/c511010020.lua +++ b/unofficial/c511010020.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010021.lua b/unofficial/c511010021.lua index c37b6d0af3..918f1f6455 100644 --- a/unofficial/c511010021.lua +++ b/unofficial/c511010021.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -52,4 +52,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010025.lua b/unofficial/c511010025.lua index 8aea3553d6..69d422e329 100644 --- a/unofficial/c511010025.lua +++ b/unofficial/c511010025.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle, except with "Number" monsters local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -63,4 +63,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010032.lua b/unofficial/c511010032.lua index d2b61a0af7..ddd6ff25ec 100644 --- a/unofficial/c511010032.lua +++ b/unofficial/c511010032.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.atcost) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -61,4 +61,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010034.lua b/unofficial/c511010034.lua index 8421d4cd99..e2f5db3e81 100644 --- a/unofficial/c511010034.lua +++ b/unofficial/c511010034.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010039.lua b/unofficial/c511010039.lua index e14df67fac..89fe409e34 100644 --- a/unofficial/c511010039.lua +++ b/unofficial/c511010039.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -68,4 +68,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010047.lua b/unofficial/c511010047.lua index 6193298cb2..2466bb953b 100644 --- a/unofficial/c511010047.lua +++ b/unofficial/c511010047.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(s.indes) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=47 function s.matfilter(c) @@ -87,4 +87,4 @@ function s.ftarget(e,c) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010053.lua b/unofficial/c511010053.lua index 990773ff78..b5b85679ff 100644 --- a/unofficial/c511010053.lua +++ b/unofficial/c511010053.lua @@ -60,7 +60,7 @@ function s.initial_effect(c) e6:SetCost(s.bdcost) e6:SetTarget(s.rectg) e6:SetOperation(s.recop) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) --battle damage local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(93730230,0)) @@ -74,7 +74,7 @@ function s.initial_effect(c) e7:SetCost(s.bdcost) e7:SetTarget(s.bdtg) e7:SetOperation(s.bdop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) --93 Summon local e8=Effect.CreateEffect(c) e8:SetDescription(aux.Stringid(64414267,0)) @@ -211,4 +211,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end \ No newline at end of file +end diff --git a/unofficial/c511010056.lua b/unofficial/c511010056.lua index ab6caf1384..c2cfe47837 100644 --- a/unofficial/c511010056.lua +++ b/unofficial/c511010056.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.drcost) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -45,4 +45,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010064.lua b/unofficial/c511010064.lua index 1b96bc9da5..0eb0026ed4 100644 --- a/unofficial/c511010064.lua +++ b/unofficial/c511010064.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -63,4 +63,4 @@ function s.ifilter(c) end function s.indcon(e) return Duel.IsExistingMatchingCard(s.ifilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end \ No newline at end of file +end diff --git a/unofficial/c511010065.lua b/unofficial/c511010065.lua index 42876fec53..e0d8a5a584 100644 --- a/unofficial/c511010065.lua +++ b/unofficial/c511010065.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.negdamtg) e2:SetOperation(s.negdamop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=65 diff --git a/unofficial/c511010083.lua b/unofficial/c511010083.lua index f4b68d9643..e00217e3df 100644 --- a/unofficial/c511010083.lua +++ b/unofficial/c511010083.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010096.lua b/unofficial/c511010096.lua index eca92322ea..a13643fc5f 100644 --- a/unofficial/c511010096.lua +++ b/unofficial/c511010096.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) @@ -56,4 +56,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010103.lua b/unofficial/c511010103.lua index ffd345a68f..ceaf19e90e 100644 --- a/unofficial/c511010103.lua +++ b/unofficial/c511010103.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=103 @@ -47,4 +47,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010104.lua b/unofficial/c511010104.lua index ee564cdf40..114946911b 100644 --- a/unofficial/c511010104.lua +++ b/unofficial/c511010104.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) -- local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(2061963,1)) @@ -82,4 +82,4 @@ function s.deckop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010105.lua b/unofficial/c511010105.lua index 53441635d7..8d2b0daa19 100644 --- a/unofficial/c511010105.lua +++ b/unofficial/c511010105.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=105 @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e3=e1:Clone() e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) -end \ No newline at end of file +end diff --git a/unofficial/c511010107.lua b/unofficial/c511010107.lua index d6c40c5929..0403dda427 100644 --- a/unofficial/c511010107.lua +++ b/unofficial/c511010107.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Workaround to make the extra attack part work on your turn local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCountLimit(1) e3:SetCondition(s.discon) e3:SetCost(s.discost) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Global effects to keep track of total effect resolutions and the last attacker aux.GlobalCheck(s,function() --Keep track of how many effects have resolved during each Battle Phase @@ -175,4 +175,4 @@ function s.endbpop(e,tp,eg,ep,ev,re,r,rp) e2:SetOperation(function(e) e:Reset() Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end) e2:SetReset(RESET_PHASE|PHASE_END|PHASE_BATTLE) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/unofficial/c511010132.lua b/unofficial/c511010132.lua index 85faa979ba..903f8df1fb 100644 --- a/unofficial/c511010132.lua +++ b/unofficial/c511010132.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --selfdes local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -94,4 +94,4 @@ function s.descon(e) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010139.lua b/unofficial/c511010139.lua index 17115ef34f..2955c66b53 100644 --- a/unofficial/c511010139.lua +++ b/unofficial/c511010139.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --selfdes local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -91,4 +91,4 @@ function s.descon(e) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010165.lua b/unofficial/c511010165.lua index aec31d9676..50786c17b4 100644 --- a/unofficial/c511010165.lua +++ b/unofficial/c511010165.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Prevent the activation of effects local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -63,4 +63,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010173.lua b/unofficial/c511010173.lua index fd28ad468c..87aa92efc2 100644 --- a/unofficial/c511010173.lua +++ b/unofficial/c511010173.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) @@ -46,4 +46,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(bc:GetAttack()) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010192.lua b/unofficial/c511010192.lua index 5d11b0670a..b2b3b6f44e 100644 --- a/unofficial/c511010192.lua +++ b/unofficial/c511010192.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) aux.DoubleSnareValidity(c,LOCATION_MZONE) aux.GlobalCheck(s,function() s[0]=0 @@ -122,4 +122,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010196.lua b/unofficial/c511010196.lua index e6aedbc553..4feea34ce9 100644 --- a/unofficial/c511010196.lua +++ b/unofficial/c511010196.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.listed_names={55727845} @@ -124,4 +124,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangeBattleDamage(1-ep,ev,false) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010205.lua b/unofficial/c511010205.lua index 9e723f2f46..f1492b97e3 100644 --- a/unofficial/c511010205.lua +++ b/unofficial/c511010205.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetCondition(s.atkcon) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --halve atk local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -205,4 +205,4 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/unofficial/c511010207.lua b/unofficial/c511010207.lua index d83653061a..67866bd859 100644 --- a/unofficial/c511010207.lua +++ b/unofficial/c511010207.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Double Snare aux.DoubleSnareValidity(c,LOCATION_MZONE) --Three attacks @@ -184,4 +184,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010238.lua b/unofficial/c511010238.lua index 88e17a870c..f8b765bdc6 100644 --- a/unofficial/c511010238.lua +++ b/unofficial/c511010238.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_RANKUP_EFFECT) e3:SetLabelObject(e2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_NUMBER} s.listed_names={92365601} @@ -54,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010239.lua b/unofficial/c511010239.lua index a15225479c..11fdd0c334 100644 --- a/unofficial/c511010239.lua +++ b/unofficial/c511010239.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) local e5=e4:Clone() e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_series={SET_NUMBER} s.listed_names={84013237} @@ -92,4 +92,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010504.lua b/unofficial/c511010504.lua index 6dd5b2180a..e27b340371 100644 --- a/unofficial/c511010504.lua +++ b/unofficial/c511010504.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -65,4 +65,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e5) end -end \ No newline at end of file +end diff --git a/unofficial/c511010515.lua b/unofficial/c511010515.lua index c8d74ce7a8..61bb3d112b 100644 --- a/unofficial/c511010515.lua +++ b/unofficial/c511010515.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e7:SetCost(s.descost) e7:SetTarget(s.destg) e7:SetOperation(s.desop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) end s.listed_series={0x10af} s.listed_names={47198668} @@ -109,4 +109,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetTargetCards(e) Duel.Destroy(dg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511015129.lua b/unofficial/c511015129.lua index 33242c0c62..6699c03a34 100644 --- a/unofficial/c511015129.lua +++ b/unofficial/c511015129.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) @@ -40,4 +40,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil,e:GetHandler():GetSequence(),e:GetHandler():GetFlagEffect(id+1)) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511020000.lua b/unofficial/c511020000.lua index fa915a7488..bc311bb472 100644 --- a/unofficial/c511020000.lua +++ b/unofficial/c511020000.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk/def local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) @@ -109,4 +109,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511023000.lua b/unofficial/c511023000.lua index 92b08aae37..0a076f0d88 100644 --- a/unofficial/c511023000.lua +++ b/unofficial/c511023000.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.copycost) e1:SetTarget(s.copytg) e1:SetOperation(s.copyop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -38,4 +38,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then c:CopyEffect(tc:GetCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) end -end \ No newline at end of file +end diff --git a/unofficial/c511027117.lua b/unofficial/c511027117.lua index 5cd7078597..d101afc7a4 100644 --- a/unofficial/c511027117.lua +++ b/unofficial/c511027117.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.diszatg) e2:SetOperation(s.diszaop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.desfilter(c,e) return c:GetAttack()==0 and c:IsPosition(POS_FACEUP) and c:IsDestructable(e) and not c:IsImmuneToEffect(e) @@ -57,4 +57,4 @@ function s.diszaop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511600284.lua b/unofficial/c511600284.lua index 7df3073087..bee226a4fc 100644 --- a/unofficial/c511600284.lua +++ b/unofficial/c511600284.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_RANKUP_EFFECT) e2:SetLabelObject(e1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={15914410} function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -48,4 +48,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511600298.lua b/unofficial/c511600298.lua index 09c734f2f9..d3a62b334a 100644 --- a/unofficial/c511600298.lua +++ b/unofficial/c511600298.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(alias,1)) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511600369.lua b/unofficial/c511600369.lua index 6a35853857..102dfc5b31 100644 --- a/unofficial/c511600369.lua +++ b/unofficial/c511600369.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.atcost) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --change target local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -67,4 +67,4 @@ function s.cbop(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(at,c) end end -end \ No newline at end of file +end diff --git a/unofficial/c511600384.lua b/unofficial/c511600384.lua index 1d00c0cb3e..949d236664 100644 --- a/unofficial/c511600384.lua +++ b/unofficial/c511600384.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c513000017.lua b/unofficial/c513000017.lua index 3a77ca90a8..12b6b65898 100644 --- a/unofficial/c513000017.lua +++ b/unofficial/c513000017.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -62,4 +62,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/unofficial/c513000018.lua b/unofficial/c513000018.lua index a6c5f69b49..82b0530ba1 100644 --- a/unofficial/c513000018.lua +++ b/unofficial/c513000018.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -82,4 +82,4 @@ function s.disoperation(e,tp,eg,ep,ev,re,r,rp) if re:IsActiveType(type) and re:GetHandler():IsControler(1-tp) then Duel.NegateEffect(ev) end -end \ No newline at end of file +end diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index 025557e546..d3a38eff89 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_RANKUP_EFFECT) e5:SetLabelObject(e4) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_series={SET_NUMBER} s.listed_names={48739166} @@ -110,4 +110,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c513000060.lua b/unofficial/c513000060.lua index 3f43bf4efc..b0df726ff8 100644 --- a/unofficial/c513000060.lua +++ b/unofficial/c513000060.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) end s.listed_series={SET_NUMBER} s.listed_names={84013237} @@ -96,4 +96,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,g2:GetFirst():GetAttack()/2,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c513000061.lua b/unofficial/c513000061.lua index dcc2f67dbe..b5c8408c43 100644 --- a/unofficial/c513000061.lua +++ b/unofficial/c513000061.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCondition(s.negcon) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -101,4 +101,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local sum=dg:GetSum(Card.GetAttack) Duel.Damage(1-tp,sum,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c513000062.lua b/unofficial/c513000062.lua index 294790f6a8..8945781a41 100644 --- a/unofficial/c513000062.lua +++ b/unofficial/c513000062.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(s.rmcost) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -207,4 +207,4 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) -end \ No newline at end of file +end diff --git a/unofficial/c513000063.lua b/unofficial/c513000063.lua index b42356bef4..e3616e8f79 100644 --- a/unofficial/c513000063.lua +++ b/unofficial/c513000063.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Equip to a monster you control local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -205,4 +205,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local op=Duel.SelectEffect(tp,{b1,1002},{b2,1003}) local bg=sg:Filter(Card.IsLocation,nil,op==1 and LOCATION_MZONE or LOCATION_STZONE) Duel.Remove(bg,POS_FACEUP,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c700000026.lua b/unofficial/c700000026.lua index 55ac674968..692738b650 100644 --- a/unofficial/c700000026.lua +++ b/unofficial/c700000026.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -42,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c700000027.lua b/unofficial/c700000027.lua index 8f718d6a2b..2ed3869b30 100644 --- a/unofficial/c700000027.lua +++ b/unofficial/c700000027.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,ep,eg,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -56,4 +56,4 @@ function s.operation(e,tp,ep,eg,ev,re,r,rp) ct=g:GetNext() until rc<=0 or not Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil,e) or not Duel.SelectYesNo(tp,210) -end \ No newline at end of file +end diff --git a/unofficial/c810000081.lua b/unofficial/c810000081.lua index 1e63982f65..b65813fa3a 100644 --- a/unofficial/c810000081.lua +++ b/unofficial/c810000081.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCondition(s.discon) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -67,4 +67,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end From 3c31f0441ba9291c415a6063a260e4d3d48c7576 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 18:12:27 +0800 Subject: [PATCH 005/165] update "Ultimate Full Burst" * use new function for checking effects with a detach cost * modernization --- unofficial/c511003038.lua | 193 ++++++++++++++------------------------ 1 file changed, 68 insertions(+), 125 deletions(-) diff --git a/unofficial/c511003038.lua b/unofficial/c511003038.lua index e4b2dc9b05..594ed7ff1b 100644 --- a/unofficial/c511003038.lua +++ b/unofficial/c511003038.lua @@ -2,168 +2,111 @@ --Ultimate Full Burst local s,id=GetID() function s.initial_effect(c) - --Activate + --Activate an Xyz monster's effect that is activated by detaching its own Xyz Material(s) local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(s.acttg) + e1:SetOperation(s.actop) c:RegisterEffect(e1) end -s.listed_series={0x95} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() -end -function s.cfilter(c,tp) +s.listed_series={SET_RANK_UP_MAGIC} +function s.actfilter(c,tp) local re=c:GetReasonEffect() return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsType(TYPE_XYZ) and c:IsXyzSummoned() - and re and re:GetHandler():IsSetCard(SET_RANK_UP_MAGIC) and re:IsActiveType(TYPE_SPELL) + and re and re:GetHandler():IsSetCard(SET_RANK_UP_MAGIC) and re:IsSpellEffect() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=eg:Filter(s.cfilter,nil,tp) +function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=eg:Filter(s.actfilter,nil,tp) if chkc then return g:IsContains(chkc) end if chk==0 then return g:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local tc=g:FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e) Duel.SetTargetCard(tc) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) +function s.actop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(51103038,RESET_EVENT+RESETS_STANDARD,0,1,fid) + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + local c=e:GetHandler() + local fid=c:GetFieldID() + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) if Duel.GetCurrentChain()==1 then - local e1=Effect.CreateEffect(e:GetHandler()) + --Activate that monster's effect immediately after this effect resolves + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) + e1:SetTarget(s.efftg) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) tc:RegisterEffect(e1,true) end - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetLabel(fid) - e2:SetLabelObject(tc) - e2:SetCondition(s.descon) - e2:SetOperation(s.desop) - Duel.RegisterEffect(e2,tp) + --During the End Phase, destroy that monster + aux.DelayedOperation(tc,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0) end end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then - if not c:IsHasEffect(id) then return false end - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==ev then return tge:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - end - return false + local effs={} + for _,eff in ipairs({c:GetOwnEffects(id)}) do + if eff:HasDetachCost() then table.insert(effs,eff) end end - if chk==0 then - if not c:IsHasEffect(511002571) then return false end - local effs={c:GetCardEffect(511002571)} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - return true - end + if chkc then + for _,eff in ipairs(effs) do + if eff:GetLabel()==ev then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end - local effs={c:GetCardEffect(511002571)} - local acd={} - local ac={} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) + local options={} + local has_option=false + for _,eff in ipairs(effs) do + e:SetCategory(eff:GetCategory()) + e:SetProperty(eff:GetProperty()) + local con=eff:GetCondition() + local cost=eff:GetCost() + local tg=eff:GetTarget() + local eff_chk=(not con or con(e,tp,eg,ep,ev,re,r,rp)) and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end - end - local te=nil - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(acd))+1 - te=ac[op] + and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) + if eff_chk then has_option=true end + table.insert(options,{eff_chk,eff:GetDescription()}) end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end + e:SetCategory(0) + e:SetProperty(0) + if chk==0 then return has_option end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() if cost then cost(e,tp,eg,ep,ev,re,r,rp,1) end local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1,chkc) end + if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end te:UseCountLimit(tp) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(id) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetLabel(Duel.GetCurrentChain()) - e1:SetLabelObject(te) - e1:SetReset(RESET_CHAIN) - c:RegisterEffect(e1) + e:SetOperation(s.effop(te:GetOperation())) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(id) then - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==Duel.GetCurrentChain() then - local te=tge:GetLabelObject() - local operation=te:GetOperation() - if operation then operation(e,tp,eg,ep,ev,re,r,rp) end - end +function s.effop(fn) + return function(e,...) + fn(e,...) + local c=e:GetHandler() + if c:IsFaceup() and c:IsRelateToEffect(e) then + Duel.BreakEffect() + --That monster must attack all monsters your opponent controls, once each, during each Battle Phase this turn + local e1=Effect.CreateEffect(e:GetOwner()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_MUST_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_ATTACK_ALL) + e2:SetValue(1) + c:RegisterEffect(e2) end - end - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.BreakEffect() - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetOwner()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - end - e:Reset() -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffectLabel(51103038)==e:GetLabel() then - return true - else e:Reset() - return false end end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Destroy(tc,REASON_EFFECT) -end \ No newline at end of file From a213d8afb0da7e6da97c6166d5b37ff791464975 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 1 Jul 2025 13:23:15 +0300 Subject: [PATCH 006/165] "Allure Queen" updates --- official/c23756165.lua | 2 +- official/c87257460.lua | 2 +- unofficial/c511310036.lua | 170 +++++++++++++++++++------------------- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/official/c23756165.lua b/official/c23756165.lua index 77906be217..f7554355aa 100644 --- a/official/c23756165.lua +++ b/official/c23756165.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e1) - c:RegisterEffect(e3,false,EFFECT_MARKER_ALLURE_LVUP) + c:RegisterEffect(e3) end s.listed_names={87257460,50140163} --"Allure Queen LV3", "Allure Queen LV7" s.LVnum=5 diff --git a/official/c87257460.lua b/official/c87257460.lua index 8e188d9faa..7d5c261f97 100644 --- a/official/c87257460.lua +++ b/official/c87257460.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e1) - c:RegisterEffect(e3,false,EFFECT_MARKER_ALLURE_LVUP) + c:RegisterEffect(e3) end s.listed_names={23756165} --"Allure Queen LV5" s.LVnum=3 diff --git a/unofficial/c511310036.lua b/unofficial/c511310036.lua index ebdc08da10..48d947dc79 100644 --- a/unofficial/c511310036.lua +++ b/unofficial/c511310036.lua @@ -2,109 +2,109 @@ --Allure Palace --Scripted by AlphaKretin local s,id=GetID() +local EFFECT_ALLURE_PALACE_ANIME=511310036 function s.initial_effect(c) - --workaround for e4 + --Activate local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e0:SetCode(EVENT_ADJUST) - e0:SetCountLimit(1) - e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_NO_TURN_RESET) - e0:SetRange(LOCATION_ALL) - e0:SetOperation(s.regop) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk&def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ALLURE_QUEEN)) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e3) - --become ignition - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(511310036) --hardcode - e4:SetRange(LOCATION_FZONE) - e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ALLURE_QUEEN)) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(122520,0)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetRange(LOCATION_FZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCondition(s.spcon) - e5:SetTarget(s.sptg) - e5:SetOperation(s.spop) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e6) + --All "Allure Queen" monsters you control gain 500 ATK/DEF + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_FZONE) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ALLURE_QUEEN)) + e1a:SetValue(500) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --Also, you can activate their effects that activate by sending themselves to the GY during your Main Phase + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2a:SetCode(EFFECT_ALLURE_PALACE_ANIME) + e2a:SetRange(LOCATION_FZONE) + e2a:SetTargetRange(1,0) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2b:SetCode(EVENT_ADJUST) + e2b:SetRange(LOCATION_FZONE) + e2b:SetOperation(s.regop) + c:RegisterEffect(e2b) + --Special Summon to your opponent's field, 1 monster with the same name as an "Allure Queen" monster that was Normal or Special Summoned to your field + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,0)) + e3a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetRange(LOCATION_FZONE) + e3a:SetCondition(s.spcon) + e3a:SetTarget(s.sptg) + e3a:SetOperation(s.spop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) end s.listed_series={SET_ALLURE_QUEEN} -function s.regop(e) - if s.global_check then return end - s.global_check = true - local g=Duel.GetMatchingGroup(Card.IsOriginalSetCard,0,LOCATION_ALL,LOCATION_ALL,nil,SET_ALLURE_QUEEN) - for tc in g:Iter() do - local effs={tc:GetCardEffect(511310036)} - for _,teh in ipairs(effs) do - local eff=teh:GetLabelObject() - local e1=eff:Clone() - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCode(0) - e1:SetCondition(s.igcon) - tc:RegisterEffect(e1) +function s.regop(e,tp) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ALLURE_QUEEN),tp,LOCATION_MZONE,0,nil):Match(aux.NOT(Card.HasFlagEffect),nil,id) + if #g==0 then return end + for allure_card in g:Iter() do + local effs={allure_card:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCost()==Cost.SelfToGrave and eff:GetCode()&(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)>0 then + allure_card:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) + local condition=eff:GetCondition() + --Ignition Effect version of the "Allure Queen" monster's Trigger Effect + local e1=eff:Clone() + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCode(0) + e1:SetCondition(function(e,tp) return Duel.IsPlayerAffectedByEffect(tp,EFFECT_ALLURE_PALACE_ANIME) and condition(e,tp) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + allure_card:RegisterEffect(e1) + end end end end -function s.eqfilter(c,code) - return c:GetFlagEffect(code)~=0 -end -function s.igcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsHasEffect(511310036) and #c:GetEquipGroup():Filter(s.eqfilter,nil,c:GetOriginalCode())>0 -end -function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(SET_ALLURE_QUEEN) and c:IsControler(tp) +function s.spconfilter(c,tp) + return c:IsSetCard(SET_ALLURE_QUEEN) and c:IsControler(tp) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.tgfilter(c,e,tp) + return c:IsCanBeEffectTarget(e) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end -function s.tgfilter(c,e,tp,eg) - return c:IsFaceup() and eg:IsContains(c) and - Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp,eg) end - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and - Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,eg) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,eg) + local g=eg:Filter(s.spconfilter,nil,tp):Match(s.tgfilter,nil,e,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and g:IsContains(chkc) and s.tgfilter(chkc,e,tp) end + if chk==0 then return #g>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 end + local tg=nil + if #g==1 then + tg=g + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + tg=g:Select(tp,1,1,nil) + end + Duel.SetTargetCard(tg) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not tc:IsFaceup() or not tc:IsRelateToEffect(e) or - Duel.GetLocationCount(1-tp,LOCATION_MZONE)<1 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,tc:GetCode()) - if #g>0 then - Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP) + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(1-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,tc:GetCode()) + if #g>0 then + Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP) + end end end \ No newline at end of file From 6dae8257a08455535ae5bb7e4cca494aecb5b292 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 1 Jul 2025 13:48:30 +0300 Subject: [PATCH 007/165] "Constellar" updates --- official/c14759024.lua | 28 ++++++++++++++-------------- official/c15871676.lua | 12 ++++++------ official/c16906241.lua | 10 +++++----- official/c40143123.lua | 12 ++++++------ official/c41269771.lua | 12 ++++++------ official/c42391240.lua | 37 ++++++++++++++++++------------------- official/c43513897.lua | 24 ++++++++++++------------ official/c78486968.lua | 20 ++++++++++---------- 8 files changed, 77 insertions(+), 78 deletions(-) diff --git a/official/c14759024.lua b/official/c14759024.lua index 2c282b6f3d..22e1f9a61c 100644 --- a/official/c14759024.lua +++ b/official/c14759024.lua @@ -2,29 +2,29 @@ --Constellar Zubeneschamali local s,id=GetID() function s.initial_effect(c) - --Add 1 "Constellar" monster from the Deck to the 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) + --Add 1 "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:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) end s.listed_series={SET_CONSTELLAR} function s.thfilter(c) return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thtg(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.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +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 diff --git a/official/c15871676.lua b/official/c15871676.lua index 009c80f4da..847ad7eada 100644 --- a/official/c15871676.lua +++ b/official/c15871676.lua @@ -2,7 +2,7 @@ --Constellar Aldebaran local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 Level 3 "Constellar" monster from the hand + --Special Summon 1 Level 3 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) - return c:IsSetCard(SET_CONSTELLAR) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsLevel(3) and c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c16906241.lua b/official/c16906241.lua index 8ee72dd27f..75e85f7db0 100644 --- a/official/c16906241.lua +++ b/official/c16906241.lua @@ -2,7 +2,7 @@ --Constellar Alrescha local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 "Constellar" monster from the hand + --Special Summon 1 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + 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 diff --git a/official/c40143123.lua b/official/c40143123.lua index 45b433b416..d19a2eba99 100644 --- a/official/c40143123.lua +++ b/official/c40143123.lua @@ -2,7 +2,7 @@ --Constellar Virgo local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 Level 5 "Constellar" monster from the hand + --Special Summon 1 Level 5 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) - return c:IsSetCard(SET_CONSTELLAR) and c:IsLevel(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +function s.spfilter(c,e,tp) + return c:IsLevel(5) and c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + 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 diff --git a/official/c41269771.lua b/official/c41269771.lua index c150745133..fc3b48c2e9 100644 --- a/official/c41269771.lua +++ b/official/c41269771.lua @@ -2,7 +2,7 @@ --Constellar Algiedi local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 Level 4 monster from the hand + --Special Summon 1 Level 4 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) - return c:IsSetCard(SET_CONSTELLAR) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsLevel(4) and c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c42391240.lua b/official/c42391240.lua index 210ce0c81b..6b6cacec72 100644 --- a/official/c42391240.lua +++ b/official/c42391240.lua @@ -2,35 +2,34 @@ --Constellar Antares local s,id=GetID() function s.initial_effect(c) - --Add 1 "Constellar" monster from the GY to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) + --Add 1 "Constellar" monster from your GY to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) end s.listed_series={SET_CONSTELLAR} -function s.tgfilter(c) +function s.thfilter(c) return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() 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.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end + 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.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + 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) - Duel.ConfirmCards(1-tp,tc) end end \ No newline at end of file diff --git a/official/c43513897.lua b/official/c43513897.lua index 3faf4a55c5..21fd574dfc 100644 --- a/official/c43513897.lua +++ b/official/c43513897.lua @@ -2,17 +2,17 @@ --Constellar Acubens local s,id=GetID() function s.initial_effect(c) - --Increase the ATK of all "Constellar" monsters you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) + --Make all "Constellar" monsters you currently control gain 500 ATK + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_ATKCHANGE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetOperation(s.atkop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) end s.listed_series={SET_CONSTELLAR} function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -20,7 +20,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local c=e:GetHandler() for tc in g:Iter() do - --Increase ATK + --All "Constellar" monsters you currently control gain 500 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) diff --git a/official/c78486968.lua b/official/c78486968.lua index 38381d5dc5..714f64d178 100644 --- a/official/c78486968.lua +++ b/official/c78486968.lua @@ -2,28 +2,28 @@ --Constellar Sheratan local s,id=GetID() function s.initial_effect(c) - --Add 1 "Constellar" monster from the Deck to the hand + --Add 1 "Constellar" monster from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToHand() end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thtg(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.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.op(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + 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) From 463128f5719d926f5b2b4d8de8624d8923d3b5e2 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 21:05:53 +0800 Subject: [PATCH 008/165] update "Utopia Rising" --- unofficial/c511004123.lua | 119 ++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 69 deletions(-) diff --git a/unofficial/c511004123.lua b/unofficial/c511004123.lua index 541af4a192..9673e2e090 100644 --- a/unofficial/c511004123.lua +++ b/unofficial/c511004123.lua @@ -1,18 +1,18 @@ --ライジング・ホープ --Utopia Rising ---Scripted by urielkama, fixed by ML, updated by the Razgriz local s,id=GetID() function s.initial_effect(c) - --Special Summon N39 Utopia from GY and equip with this card + --Special Summon 1 "Number 39: Utopia" from your Graveyard and equip it with this card local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCost(aux.RemainFieldCost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Destroy Summoned monster if this card leaves the field + --When this card leaves the field, destroy the equipped monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetCode(EVENT_LEAVE_FIELD) @@ -23,96 +23,77 @@ s.listed_names={84013237} function s.spfilter(c,e,tp) return c:IsCode(84013237) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end -function s.eqlimit(e,c) - return e:GetOwner()==c -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end 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) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end - Duel.HintSelection(g,true) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 + and c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then + Duel.HintSelection(tc,true) Duel.Equip(tp,c,tc) + local eff_id=e:GetFieldID() + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,eff_id) --Equip Limit local e0=Effect.CreateEffect(tc) e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetReset(RESET_EVENT+RESETS_STANDARD) - e0:SetValue(s.eqlimit) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(function(e,c) return e:GetOwner()==c end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e0) - --Equipped monster gains effects of all other Xyz monsters on your field + --Equipped monster gains the effects of all Xyz Monsters you control that are activated by detaching their own Xyz Material(s) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ADJUST) - e1:SetRange(LOCATION_MZONE) + e1:SetLabelObject({}) + e1:SetLabel(eff_id) e1:SetOperation(s.copyop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - tc:RegisterEffect(e1) + Duel.RegisterEffect(e1,tp) end end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end +function s.src_check(src_eff) + if src_eff:IsDeleted() or not src_eff:HasDetachCost() then return false end + local src_c=src_eff:GetHandler() + return src_c:IsFaceup() and src_c:IsType(TYPE_XYZ) end function s.copyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:GetEquipGroup():IsContains(e:GetOwner()) then e:Reset() return end - if c:IsDisabled() then return end - local map={} - for _,eff in ipairs({c:GetCardEffect(511002571)}) do - map[eff:GetLabel()]=true + local c=e:GetOwner() + local tc=c:GetEquipTarget() + local effs=e:GetLabelObject() + --it the card is no longer equipped, reset everything including this effect + if not tc or tc:GetFlagEffectLabel(id)~=e:GetLabel() then + for src_eff,eff in pairs(effs) do eff:Reset() end + return e:Reset() end - for tc in Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,e:GetHandler()):Iter() do - local code=tc:GetOriginalCode() - if not map[code] then - for _,te in ipairs({tc:GetCardEffect(511002571)}) do - if te:GetLabel()==code then - local teh=te:GetLabelObject() - if teh:GetCode()&511001822==511001822 or teh:GetLabel()==511001822 then teh=teh:GetLabelObject() end - local tec2=teh:Clone() - c:RegisterEffect(tec2) - local tec=te:Clone() - c:RegisterEffect(tec) - local rste=Effect.CreateEffect(e:GetOwner()) - rste:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - rste:SetCode(EVENT_ADJUST) - rste:SetLabelObject({tec2,tec}) - rste:SetLabel(code) - rste:SetOperation(s.resetop) - Duel.RegisterEffect(rste,tp) - end + --reset copied effects that are no longer applicable, or if the equip card is currently negated + for src_eff,eff in pairs(effs) do + if c:IsDisabled() or not tc:IsCode(84013237) or not s.src_check(src_eff) then + eff:Reset() + effs[src_eff]=nil + end + end + --copy effects that have not been copied already + local xg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,tc) + for xc in xg:Iter() do + for _,eff in ipairs({xc:GetOwnEffects()}) do + if not effs[eff] and eff:HasDetachCost() then + local ce=eff:Clone() + tc:RegisterEffect(ce) + effs[eff]=ce end end end end -function s.codechk(c,code) - if not c:IsFaceup() or not c:IsType(TYPE_XYZ) then return false end - for _,te in ipairs({c:GetCardEffect(511002571)}) do - if te:GetLabel()==code then return true end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=e:GetHandler():GetFirstCardTarget() + if tc and tc:IsLocation(LOCATION_MZONE) then + Duel.Destroy(tc,REASON_EFFECT) end - return false end -function s.resetop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetOwner():GetEquipTarget() - if not tc or tc:IsDisabled() or e:GetOwner():IsDisabled() - or not Duel.IsExistingMatchingCard(s.codechk,tp,LOCATION_MZONE,0,1,tc,e:GetLabel()) then - for _,eff in ipairs(e:GetLabelObject()) do - if eff then - eff:Reset() - end - end - e:Reset() - end -end \ No newline at end of file From 24daba4b10ad0f4a3b4ac81cc20c9dd871c065d5 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:50:06 +0800 Subject: [PATCH 009/165] update "XYZ Wings" --- unofficial/c511600191.lua | 138 +++++++++++--------------------------- 1 file changed, 38 insertions(+), 100 deletions(-) diff --git a/unofficial/c511600191.lua b/unofficial/c511600191.lua index f3f07b04fe..6a3742577c 100644 --- a/unofficial/c511600191.lua +++ b/unofficial/c511600191.lua @@ -1,18 +1,21 @@ --エクシーズ・ウイング --XYZ Wings ---Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsType,TYPE_XYZ)) - --twice per turn + --You can activate the equipped monster's "once per turn" effects that are activated by detaching its own Xyz Material(s) once again per turn local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ADJUST) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipTarget():GetFlagEffect(id)>0 end) - e1:SetOperation(s.tptop) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(id) c:RegisterEffect(e1) - --damage + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_ADJUST) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) + --Inflict 500 damage to your opponent local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DAMAGE) @@ -23,104 +26,43 @@ function s.initial_effect(c) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) - --Halve Battle Damage + --Any battle damage you take becomes halved local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_LEAVE_FIELD) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e3:SetCode(EVENT_LEAVE_FIELD) e3:SetOperation(s.bdop) c:RegisterEffect(e3) - aux.GlobalCheck(s,function() - OPTEffs={} - AffectedEffs={} - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_CHAINING) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_ADJUST) - ge2:SetCountLimit(1) - ge2:SetOperation(s.clear) - Duel.RegisterEffect(ge2,0) - end) end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if not rc:IsHasEffect(511002571) or re:IsHasProperty(EFFECT_FLAG_NO_TURN_RESET) then return end - local effs={rc:GetCardEffect(511002571)} - local chk=true - for _,eff in ipairs(effs) do - local temp=eff:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - if temp==re then - chk=false - end - end - if chk then return end - local _,ctmax,_,ctflag=re:GetCountLimit() - if ctflag&~EFFECT_COUNT_CODE_SINGLE>0 or ctmax~=1 then return end - if rc:GetFlagEffect(id)==0 then - OPTEffs[rc]={} - AffectedEffs[rc]={} - rc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END,0,1) - end - for _,te in ipairs(OPTEffs[rc]) do - if te==re then return end - end - table.insert(OPTEffs[rc],re) - if ctflag&EFFECT_COUNT_CODE_SINGLE>0 then - for _,eff in ipairs(effs) do - local te=eff:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local _,_,_,ctlflag=te:GetCountLimit() - if ctlflag&EFFECT_COUNT_CODE_SINGLE>0 then - local chk=true - for _,te2 in ipairs(OPTEffs[rc]) do - if te==te2 then chk=false end - end - if chk then - table.insert(OPTEffs[rc],te) - end - end - end - end +s.affected_effects={} +function s.xyzfilter(c) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsHasEffect(id) end -function s.clear(e,tp,eg,ep,ev,re,r,rp) - OPTEffs={} - for _,c in pairs(AffectedEffs) do - for _,te in ipairs(c) do - local _,_,ctcode,ctflag,hopt=te:GetCountLimit() - if ctflag&EFFECT_COUNT_CODE_SINGLE>0 then - te:SetCountLimit(1,{ctcode,hopt},ctflag) +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + --affect the effects of Xyz monsters that are equipped + local xg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + for xc in xg:Iter() do + for _,eff in ipairs({xc:GetOwnEffects()}) do + local usect,ctmax,ctcode,ctflag,hopt=eff:GetCountLimit() + if eff:HasDetachCost() and not eff:IsHasProperty(EFFECT_FLAG_NO_TURN_RESET) + and ctmax==1 and (ctflag&~EFFECT_COUNT_CODE_SINGLE)==0 + and not s.affected_effects[eff] then + eff:SetCountLimit(2,{ctcode,hopt},ctflag) + if usect==0 then eff:UseCountLimit(eff:GetHandlerPlayer()) end + s.affected_effects[eff]=true end end end - AffectedEffs={} -end -function s.tptop(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - for _,te in ipairs(OPTEffs[eqc]) do - local chk=true - for _,te2 in ipairs(AffectedEffs[eqc]) do - if te2==te then chk=false end - end - if chk then - local _,ctmax,ctcode,ctflag,hopt=te:GetCountLimit() - if ctflag&EFFECT_COUNT_CODE_SINGLE>0 then - te:SetCountLimit(ctmax+1,{ctcode,hopt},ctflag) - else - te:SetCountLimit(ctmax,{ctcode,hopt},ctflag) - end - table.insert(AffectedEffs[eqc],te) + --stop affecting effects that are no longer applicable + for eff in pairs(s.affected_effects) do + if not eff:HasDetachCost() or not xg:IsContains(eff:GetHandler()) then + local usect,_,ctcode,ctflag,hopt=eff:GetCountLimit() + eff:SetCountLimit(1,{ctcode,hopt},ctflag) + if usect<2 then eff:UseCountLimit(eff:GetHandlerPlayer()) end + s.affected_effects[eff]=nil end end end -function s.filter(c,eqc) - return c:GetPreviousTypeOnField()&TYPE_MONSTER==TYPE_MONSTER - and (c:GetReasonCard()==eqc or c:GetReasonEffect() and c:GetReasonEffect():GetHandler()==eqc) -end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() return ec and eg:IsContains(ec) @@ -136,18 +78,14 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.bdop(e,tp,eg,ep,ev,re,r,rp) + --For the rest of this turn, any battle damage you take becomes halved local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetTargetRange(1,0) - e1:SetValue(s.val) + e1:SetValue(function(_,_,dam,r) return (r&REASON_BATTLE)~=0 and (dam//2) or dam end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -function s.val(e,re,dam,r,rp,rc) - if (r&REASON_BATTLE)~=0 then - return math.floor(dam/2) - else return dam end -end \ No newline at end of file From e812b939486ac7cfcdaa624d58f008b6ba102b94 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:57:36 +0800 Subject: [PATCH 010/165] Update c511004123.lua --- unofficial/c511004123.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/unofficial/c511004123.lua b/unofficial/c511004123.lua index 9673e2e090..2857aab27b 100644 --- a/unofficial/c511004123.lua +++ b/unofficial/c511004123.lua @@ -58,29 +58,26 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e1,tp) end end -function s.src_check(src_eff) - if src_eff:IsDeleted() or not src_eff:HasDetachCost() then return false end - local src_c=src_eff:GetHandler() - return src_c:IsFaceup() and src_c:IsType(TYPE_XYZ) -end function s.copyop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetOwner() local tc=c:GetEquipTarget() local effs=e:GetLabelObject() --it the card is no longer equipped, reset everything including this effect if not tc or tc:GetFlagEffectLabel(id)~=e:GetLabel() then - for src_eff,eff in pairs(effs) do eff:Reset() end + for _,eff in pairs(effs) do eff:Reset() end return e:Reset() end --reset copied effects that are no longer applicable, or if the equip card is currently negated + local xg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,tc) for src_eff,eff in pairs(effs) do - if c:IsDisabled() or not tc:IsCode(84013237) or not s.src_check(src_eff) then + if c:IsDisabled() or not tc:IsCode(84013237) + or src_eff:IsDeleted() or not src_eff:HasDetachCost() + or not xg:IsContains(src_eff:GetHandler()) then eff:Reset() effs[src_eff]=nil end end --copy effects that have not been copied already - local xg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,tc) for xc in xg:Iter() do for _,eff in ipairs({xc:GetOwnEffects()}) do if not effs[eff] and eff:HasDetachCost() then From 4a824cb4845c8f3ff5bb5edf7b8be32e358e7ceb Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 00:29:43 +0800 Subject: [PATCH 011/165] update "Rank-Up-Magic Cipher Pursuit" --- unofficial/c511018510.lua | 171 ++++++++++++++------------------------ 1 file changed, 64 insertions(+), 107 deletions(-) diff --git a/unofficial/c511018510.lua b/unofficial/c511018510.lua index d6b6cef483..7ee90f3f01 100644 --- a/unofficial/c511018510.lua +++ b/unofficial/c511018510.lua @@ -1,148 +1,105 @@ --RUM-光波追撃 --Rank-Up-Magic Cipher Pursuit ---cleaned up by MLD local s,id=GetID() function s.initial_effect(c) - --Activate - local re1=Effect.CreateEffect(c) - re1:SetDescription(aux.Stringid(41201386,0)) - re1:SetCategory(CATEGORY_SPECIAL_SUMMON) - re1:SetType(EFFECT_TYPE_ACTIVATE) - re1:SetCode(EVENT_FREE_CHAIN) - re1:SetProperty(EFFECT_FLAG_CARD_TARGET) - re1:SetCondition(s.condition) - re1:SetTarget(s.target) - re1:SetOperation(s.activate) - c:RegisterEffect(re1) -end -s.listed_series={0xe5} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))>=2000 -end -function s.filter1(c,e,tp) - local rk=c:GetRank() - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return #pg<=1 and c:IsFaceup() and c:IsSetCard(SET_CIPHER) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,pg) + --Special Summon from your Extra Deck, 1 "Cipher" Xyz Monster that is 1 Rank higher than 1 "Cipher" Xyz Monster you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(41201386,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCondition(function() return math.abs(Duel.GetLP(0)-Duel.GetLP(1))>=2000 end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) end -function s.filter2(c,e,tp,mc,rk,pg) +s.listed_series={SET_CIPHER} +function s.spfilter(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return c:IsType(TYPE_XYZ) and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(SET_CIPHER) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ) and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) + and c:IsRank(rk) and c:IsSetCard(SET_CIPHER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and (#pg<=0 or pg:IsContains(mc)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end +function s.matfilter(c,e,tp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return #pg<=1 and c:IsFaceup() and c:IsSetCard(SET_CIPHER) and c:HasRank() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,pg) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.matfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.matfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SelectTarget(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end +function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not tc or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end + if tc:IsFacedown() or not tc:IsRelateToEffect(e) + or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) + or not tc:HasRank() then return end local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,pg) - local sc=g:GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,pg):GetFirst() if sc then sc:SetMaterial(tc) Duel.Overlay(sc,tc) + --You can activate that Xyz Monster's effect that is activated by detaching its own Xyz Material(s) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) + e1:SetTarget(s.acttg) + e1:SetOperation(s.actop) e1:SetReset(RESETS_STANDARD&~RESET_TOFIELD) sc:RegisterEffect(e1,true) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then - if not c:IsHasEffect(id) then return false end - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==ev then return tge:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - end - return false + local effs={} + for _,eff in ipairs({c:GetOwnEffects(id)}) do + if eff:HasDetachCost() then table.insert(effs,eff) end end - if chk==0 then - if not c:IsHasEffect(511002571) then return false end - local effs={c:GetCardEffect(511002571)} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - return true - end + if chkc then + for _,eff in ipairs(effs) do + if eff:GetFieldID()==e:GetLabel() then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end - local effs={c:GetCardEffect(511002571)} - local acd={} - local ac={} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) + local options={} + local has_option=false + for _,eff in ipairs(effs) do + e:SetCategory(eff:GetCategory()) + e:SetProperty(eff:GetProperty()) + local con=eff:GetCondition() + local cost=eff:GetCost() + local tg=eff:GetTarget() + local eff_chk=(not con or con(e,tp,eg,ep,ev,re,r,rp)) and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end + and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) + if eff_chk then has_option=true end + table.insert(options,{eff_chk,eff:GetDescription()}) end - local te=nil - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(acd))+1 - te=ac[op] - end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end + e:SetCategory(0) + e:SetProperty(0) + if chk==0 then return has_option end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end + e:SetLabel(te:GetFieldID()) e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() if cost then cost(e,tp,eg,ep,ev,re,r,rp,1) end local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1,chkc) end + if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end te:UseCountLimit(tp) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(id) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetLabel(Duel.GetCurrentChain()) - e1:SetLabelObject(te) - e1:SetReset(RESET_CHAIN) - c:RegisterEffect(e1) + e:SetOperation(function(e,...) + te:GetOperation()(e,...) + e:Reset() + end) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(id) then - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==Duel.GetCurrentChain() then - local te=tge:GetLabelObject() - local operation=te:GetOperation() - if operation then operation(e,tp,eg,ep,ev,re,r,rp) end - end - end - end - e:Reset() -end \ No newline at end of file From 2d0318c173c40f408e8f62dc4dcb152445a9c9b1 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 00:30:20 +0800 Subject: [PATCH 012/165] Update c511003038.lua --- unofficial/c511003038.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unofficial/c511003038.lua b/unofficial/c511003038.lua index 594ed7ff1b..76b21f1ef2 100644 --- a/unofficial/c511003038.lua +++ b/unofficial/c511003038.lua @@ -56,7 +56,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end if chkc then for _,eff in ipairs(effs) do - if eff:GetLabel()==ev then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end + if eff:GetFieldID()==e:GetLabel() then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end @@ -81,6 +81,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if not op then return end local te=effs[op] if not te then return end + e:SetLabel(te:GetFieldID()) e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() From 2661ef77e38694024c49da20ad58d5de764bcd20 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 00:50:41 +0800 Subject: [PATCH 013/165] update "Raidraptor - Rapid Xyz" --- unofficial/c511002868.lua | 133 ++++++++++++-------------------------- 1 file changed, 41 insertions(+), 92 deletions(-) diff --git a/unofficial/c511002868.lua b/unofficial/c511002868.lua index ccbbabb36b..d8af97368e 100644 --- a/unofficial/c511002868.lua +++ b/unofficial/c511002868.lua @@ -2,24 +2,19 @@ --Raidraptor - Rapid Xyz local s,id=GetID() function s.initial_effect(c) - --Activate + --Immediately after this effect resolves, Xyz Summon 1 "Raidraptor" Xyz Monster using monsters you control local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e1:SetCondition(s.xyzcon) + e1:SetCondition(function(_,tp) return Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(Card.IsSpecialSummoned,tp,0,LOCATION_MZONE,1,nil) end) e1:SetTarget(s.xyztg) e1:SetOperation(s.xyzop) c:RegisterEffect(e1) end -s.listed_series={0xba} -function s.cfilter(c) - return c:IsSpecialSummoned() -end -function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil) -end +s.listed_series={SET_RAIDRAPTOR} function s.xyzfilter(c) return c:IsXyzSummonable() and c:IsSetCard(SET_RAIDRAPTOR) end @@ -31,107 +26,61 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() if tc then + --The Summoned monster can activate its effects that activate by detaching an Xyz Material(s) local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) - e1:SetReset(RESET_EVENT+RESETS_STANDARD&~RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(s.acttg) + e1:SetOperation(s.actop) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1,true) Duel.XyzSummon(tp,tc) end end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - e:SetCategory(0) - e:SetProperty(0) - if chkc then - if not c:IsHasEffect(id) then return false end - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==ev then return tge:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - end - return false + local effs={} + for _,eff in ipairs({c:GetOwnEffects(id)}) do + if eff:HasDetachCost() then table.insert(effs,eff) end end - if chk==0 then - if not c:IsHasEffect(511002571) or not Duel.IsBattlePhase() then return false end - local effs={c:GetCardEffect(511002571)} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - if temp:IsHasType(EFFECT_TYPE_IGNITION) then - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or co(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - return true - end - end + if chkc then + for _,eff in ipairs(effs) do + if eff:GetFieldID()==e:GetLabel() then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end - local effs={c:GetCardEffect(511002571)} - local acd={} - local ac={} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - if temp:IsHasType(EFFECT_TYPE_IGNITION) then - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end - end + local options={} + local has_option=false + for _,eff in ipairs(effs) do + e:SetCategory(eff:GetCategory()) + e:SetProperty(eff:GetProperty()) + local con=eff:GetCondition() + local cost=eff:GetCost() + local tg=eff:GetTarget() + local eff_chk=eff:GetCountLimit()>0 + and (not con or con(e,tp,eg,ep,ev,re,r,rp)) + and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) + and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) + if eff_chk then has_option=true end + table.insert(options,{eff_chk,eff:GetDescription()}) end - local te=nil - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(acd))+1 - te=ac[op] - end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end + e:SetCategory(0) + e:SetProperty(0) + if chk==0 then return has_option end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end + e:SetLabel(te:GetFieldID()) e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() if cost then cost(e,tp,eg,ep,ev,re,r,rp,1) end local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1,chkc) end + if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end te:UseCountLimit(tp) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(id) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetLabel(Duel.GetCurrentChain()) - e1:SetLabelObject(te) - e1:SetReset(RESET_CHAIN) - c:RegisterEffect(e1) + e:SetOperation(te:GetOperation()) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(id) then - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==Duel.GetCurrentChain() then - local te=tge:GetLabelObject() - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - local operation=te:GetOperation() - if operation then operation(e,tp,eg,ep,ev,re,r,rp) end - end - end - end -end \ No newline at end of file From d19e67ecfe59aca47da8c5e2e1cbfa8ae6c885b8 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 01:04:16 +0800 Subject: [PATCH 014/165] update "Overlay Wedge" --- unofficial/c511027118.lua | 41 ++++++++++++++------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/unofficial/c511027118.lua b/unofficial/c511027118.lua index d001aaaf93..0e3f7c6598 100644 --- a/unofficial/c511027118.lua +++ b/unofficial/c511027118.lua @@ -3,19 +3,18 @@ --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) - --Activate + --Negate an effect that was activated by detaching an Xyz Monster's own Xyz Material(s) local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetCondition(s.discon) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) c:RegisterEffect(e1) --Check for effects that detach material aux.GlobalCheck(s,function() - s[0]=nil local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetCode(EVENT_DETACH_MATERIAL) @@ -29,37 +28,27 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) s[0]=Duel.GetChainInfo(cid,CHAININFO_CHAIN_ID) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==s[0] and re:GetHandler():IsType(TYPE_XYZ) and Duel.IsChainDisablable(ev) +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==s[0] and re:GetHandler():IsType(TYPE_XYZ) and Duel.IsChainDisablable(ev) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) --Cannot detach for the rest of this turn local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) - e2:SetCondition(s.accon) e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end -function s.accon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end function s.aclimit(e,re) - local g=Duel.GetMatchingGroup(s.acfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - if not re:IsActiveType(TYPE_XYZ) or g:GetMaxGroup(Card.GetRank):IsContains(re:GetHandler()) then return false end - local eff={re:GetHandler():GetCardEffect(511002571)} - for _,ree in ipairs(eff) do - local te=ree:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - if re==te then return true end - end - return false -end \ No newline at end of file + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),0,LOCATION_MZONE,LOCATION_MZONE,nil) + return g:GetMaxGroup(Card.GetRank):IsContains(re:GetHandler()) or not re:HasDetachCost() +end From dd3c4ca9763c10bea64b0a049312d20990519907 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:48:18 +0300 Subject: [PATCH 015/165] "tellarknight" updates --- official/c1050186.lua | 44 ++++++++--------- official/c13851202.lua | 82 +++++++++++++++---------------- official/c22617205.lua | 77 ++++++++++++++--------------- official/c2273734.lua | 60 +++++++++++------------ official/c26057276.lua | 59 ++++++++++++----------- official/c38667773.lua | 40 +++++++-------- official/c42822433.lua | 89 +++++++++++++++++----------------- official/c58858807.lua | 107 ++++++++++++++++++++++++----------------- official/c63274863.lua | 63 ++++++++++++------------ official/c65056481.lua | 34 ++++++------- official/c75878039.lua | 44 ++++++++--------- official/c79210531.lua | 44 ++++++++--------- official/c86466163.lua | 69 ++++++++++++-------------- official/c96223501.lua | 75 +++++++++++++---------------- official/c99668578.lua | 48 +++++++++--------- 15 files changed, 461 insertions(+), 474 deletions(-) diff --git a/official/c1050186.lua b/official/c1050186.lua index 39891e0234..fc327aa1a0 100644 --- a/official/c1050186.lua +++ b/official/c1050186.lua @@ -2,36 +2,36 @@ --Satellarknight Unukalhai local s,id=GetID() function s.initial_effect(c) - --Send 1 "tellarknight" card to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Send 1 "tellarknight" card from your Deck to the GY, except "Satellarknight Unukalhai" + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOGRAVE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.tgtg) + e1a:SetOperation(s.tgop) + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c) +function s.tgfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) and c:IsAbleToGrave() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end diff --git a/official/c13851202.lua b/official/c13851202.lua index cf7ecbb31c..cf6f2a946b 100644 --- a/official/c13851202.lua +++ b/official/c13851202.lua @@ -2,53 +2,47 @@ --Satellarknight Rigel local s,id=GetID() function s.initial_effect(c) - --Increase the ATK of a "tellarknight" monster by 500 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Make 1 "tellarknight" monster on the field gain 500 ATK, but send it to the GY during the End Phase + 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+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.atktg) + e1a:SetOperation(s.atkop) + 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) end s.listed_series={SET_TELLARKNIGHT} -function s.filter(c) - return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT) +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_TELLARKNIGHT) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_TELLARKNIGHT),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_TELLARKNIGHT),tp,LOCATION_MZONE,LOCATION_MZONE,1,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 s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCountLimit(1) - e2:SetOperation(s.tgop) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e2) + if tc:IsRelateToEffect(e) then + if 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 + --Send it to the GY during the End Phase + aux.DelayedOperation(tc,PHASE_END,id,e,tp, + function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, + nil,0,1,aux.Stringid(id,1),aux.Stringid(id,2) + ) end -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end \ No newline at end of file diff --git a/official/c22617205.lua b/official/c22617205.lua index 1b798c0a71..aa7d423f96 100644 --- a/official/c22617205.lua +++ b/official/c22617205.lua @@ -2,58 +2,51 @@ --Stellarknight Zefraxciton local s,id=GetID() function s.initial_effect(c) - --Pendulum Summon procedure Pendulum.AddProcedure(c) - --You cannot Pendulum Summon, except "tellarknight" and "Zefra" monsters + --You cannot Pendulum Summon monsters, except "tellarknight" and "Zefra" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_PZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c,sump,sumtype) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) end) c:RegisterEffect(e1) - --Destroy 1 card you control and 1 Set card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_TELLAR) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - c:RegisterEffect(e4) + --Destroy 1 other "tellarknight" or "Zefra" card in your Monster Zone or Pendulum Zone and 1 Set card your opponent controls + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_DESTROY) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + e2c:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + c:RegisterEffect(e2c) end s.listed_series={SET_TELLARKNIGHT,SET_ZEFRA} -function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) then return false end - return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function s.filter1(c) - return c:IsFaceup() and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) +function s.desfilter(c,e,tp) + return ((c:IsControler(tp) and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) and c:IsFaceup()) or (c:IsControler(1-tp) and c:IsFacedown())) + and c:IsCanBeEffectTarget(e) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.destg(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_MZONE|LOCATION_PZONE,0,1,e:GetHandler()) - and Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE|LOCATION_PZONE,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,#g1,0,0) + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,LOCATION_ONFIELD,e:GetHandler(),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_DESTROY) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,2,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetTargetCards(e) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c2273734.lua b/official/c2273734.lua index 15b0e1dd49..7632a489ec 100644 --- a/official/c2273734.lua +++ b/official/c2273734.lua @@ -2,52 +2,50 @@ --Satellarknight Altair local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 "tellarknight" monster from the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Special Summon 1 "tellarknight" monster from your GY in Defense Position, except "Satellarknight Altair" + 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+EFFECT_FLAG_CARD_TARGET) + 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) end -s.listed_names={id} s.listed_series={SET_TELLARKNIGHT} -function s.filter(c,e,tp) - return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) 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.filter(chkc,e,tp) end + 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.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + 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.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) + 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 - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) + --Monsters you control cannot attack for the rest of this turn, except "tellarknight" monsters + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.atktg) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_TELLARKNIGHT) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) -end -function s.atktg(e,c) - return not c:IsSetCard(SET_TELLARKNIGHT) end \ No newline at end of file diff --git a/official/c26057276.lua b/official/c26057276.lua index 10868e1e29..e2012421e1 100644 --- a/official/c26057276.lua +++ b/official/c26057276.lua @@ -2,42 +2,43 @@ --Satellarknight Betelgeuse local s,id=GetID() function s.initial_effect(c) - --Send itself to the GY and add 1 "tellarknight" monster from the GY to the 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Send this card to the GY, and if you do, add 1 "tellarknight" card from your GY to your hand, except "Satellarknight Betelgeuse" + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) 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 + local c=e:GetHandler() + if chk==0 then return c:IsAbleToGrave() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)>0 and c:IsLocation(LOCATION_GRAVE) + and tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c38667773.lua b/official/c38667773.lua index 262ec89bc0..8915d95d87 100644 --- a/official/c38667773.lua +++ b/official/c38667773.lua @@ -2,38 +2,38 @@ --Satellarknight Vega local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 "tellarknight" monster from the hand - 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Special Summon 1 "tellarknight" monster from your hand, except "Satellarknight Vega" + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end + 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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c42822433.lua b/official/c42822433.lua index 817964ef22..dbb4a6dd2b 100644 --- a/official/c42822433.lua +++ b/official/c42822433.lua @@ -3,62 +3,61 @@ --Scripted by Satella local s,id=GetID() function s.initial_effect(c) - --Destroy cards on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + --Destroy cards on the field up to the number of LIGHT and DARK Xyz Monsters you control + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DESTROY) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.destg) + e1a:SetOperation(s.desop) + 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) + --Special Summon this card from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --Special Summon itself from the GY - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.spcon) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +s.listed_series={SET_CONSTELLAR,SET_TELLARKNIGHT} s.listed_names={id} -function s.cfilter(c) - return c:IsType(TYPE_XYZ) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) +function s.ctfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsFaceup() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return ct>0 and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetTargetCards(e) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) end end -function s.spcfilter(c,tp) - return c:IsFaceup() and c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsControler(tp) and not c:IsCode(id) +function s.spconfilter(c,tp) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsControler(tp) and c:IsFaceup() and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spcfilter,1,nil,tp) + return eg:IsExists(s.spconfilter,1,nil,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -71,14 +70,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end - --Cannot declare attack with non-Xyz monsters + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil) + --You cannot declare attacks for the rest of this turn, except with Xyz Monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(_,c) return not c:IsType(TYPE_XYZ) end) + e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil) end \ No newline at end of file diff --git a/official/c58858807.lua b/official/c58858807.lua index f28dd90670..f085798945 100644 --- a/official/c58858807.lua +++ b/official/c58858807.lua @@ -4,27 +4,27 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure + --Xyz Summon procedure: 2+ Level 4 monsters Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) - --Add 1 "tellarknight" and/or 1 "Constellar" card from the GY to the hand + --Add 1 "tellarknight" and/or 1 "Constellar" card from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Apply the effect of 1 "tellarknight" or "Constellar" monster + --This effect becomes the effect of the banished "tellarknight" or "Constellar" monster that activates when it is Normal Summoned local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.applycost) + e2:SetCost(Cost.AND(s.applycost,Cost.Detach(1))) e2:SetTarget(s.applytg) e2:SetOperation(s.applyop) c:RegisterEffect(e2) @@ -33,7 +33,7 @@ s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} function s.thfilter(c,e) return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end -function s.rescon(sg) +function s.rescon(sg,e,tp,mg) return #sg==1 or (sg:IsExists(Card.IsSetCard,1,nil,SET_TELLARKNIGHT) and sg:IsExists(Card.IsSetCard,1,nil,SET_CONSTELLAR)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -49,61 +49,78 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) end end -function s.rmvfilter(c,tp) - if not (c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsAbleToRemoveAsCost() - and c:IsHasEffect(id)) then - return false - end - local eff=c:GetCardEffect(id) - local te=eff:GetLabelObject() - local con=te:GetCondition() - local tg=te:GetTarget() - if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) - and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) then - return true +function s.rmfilter(c,e,tp) + if not (c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsMonster() and c:IsAbleToRemoveAsCost()) then return false end + local effs={c:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCode()==EVENT_SUMMON_SUCCESS then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (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.applycost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.rmvfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sc=Duel.SelectMatchingCard(tp,s.rmvfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() - Duel.Remove(sc,POS_FACEUP,REASON_COST) - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - e:SetLabelObject(sc:GetCardEffect(id):GetLabelObject()) - c:RemoveOverlayCard(tp,1,1,REASON_COST) + local rc=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + Duel.Remove(rc,POS_FACEUP,REASON_COST) + local available_effs={} + local effs={rc:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCode()==EVENT_SUMMON_SUCCESS then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (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 + e:SetLabelObject(available_effs) end function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local te=e:GetLabelObject() - local tg=te and te:GetTarget() or nil - if chkc then return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end + if chkc then + local eff=e:GetLabelObject() + return eff and eff:GetTarget() and eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) + end if chk==0 then return true end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + local eff=nil + local available_effs=e:GetLabelObject() + 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()) + e:SetLabel(eff:GetLabel()) + e:SetLabelObject(eff:GetLabelObject()) + e:SetProperty(eff:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + local tg=eff:GetTarget() if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end - e:SetLabelObject(te) + e:SetLabelObject(eff) Duel.ClearOperationInfo(0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if not te then return end - local sc=te:GetHandler() - if sc:GetFlagEffect(id)==0 then - e:SetLabel(0) - e:SetLabelObject(nil) - return - end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - local op=te:GetOperation() + local eff=e:GetLabelObject() + if not eff 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 +end \ No newline at end of file diff --git a/official/c63274863.lua b/official/c63274863.lua index 03ec5dd5f1..e30d108f94 100644 --- a/official/c63274863.lua +++ b/official/c63274863.lua @@ -2,46 +2,45 @@ --Satellarknight Sirius local s,id=GetID() function s.initial_effect(c) - --Shuffle 5 "tellarknight" monsters into the Deck and draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Shuffle 5 "tellarknight" monsters from your GY into the Deck, then draw 1 card + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.tdtg) + e1a:SetOperation(s.tdop) + 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) end s.listed_series={SET_TELLARKNIGHT} -function s.filter(c) +function s.tdfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and c:IsAbleToDeck() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,5,nil) end + and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,5,5,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) - if #tg~=5 then return end - Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) - if ct==5 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) + if #tg==5 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 + and tg:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA)==5 then + if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end end end \ No newline at end of file diff --git a/official/c65056481.lua b/official/c65056481.lua index ff8864a47e..6d51bd3f27 100644 --- a/official/c65056481.lua +++ b/official/c65056481.lua @@ -2,23 +2,23 @@ --Satellarknight Alsahm local s,id=GetID() function s.initial_effect(c) - --Inflict 1000 damage to the opponent - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Inflict 1000 damage to your opponent + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DAMAGE) + 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.damtg) + e1a:SetOperation(s.damop) + 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) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c75878039.lua b/official/c75878039.lua index 18ab174d99..626217e0eb 100644 --- a/official/c75878039.lua +++ b/official/c75878039.lua @@ -2,36 +2,36 @@ --Satellarknight Deneb local s,id=GetID() function s.initial_effect(c) - --Add 1 "tellarknight" monsters from the Deck to the 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Add 1 "tellarknight" monster from your Deck to your hand, except "Satellarknight Deneb" + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) 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.operation(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + 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) diff --git a/official/c79210531.lua b/official/c79210531.lua index aca1943810..ddfc5b9910 100644 --- a/official/c79210531.lua +++ b/official/c79210531.lua @@ -3,7 +3,7 @@ --scripted by Naim local s,id=GetID() function s.initial_effect(c) - --Special Summon itself from the hand + --Special Summon this card from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,31 +16,31 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Add 1 "tellarknight" Spell from the Deck to the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_TELLAR) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) + --Add 1 "tellarknight" Spell 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_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2c) end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +s.listed_series={SET_CONSTELLAR,SET_TELLARKNIGHT} s.listed_names={id} -function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and not c:IsCode(id) +function s.spconfilter(c,tp) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsControler(tp) and c:IsFaceup() and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) + return eg:IsExists(s.spconfilter,1,nil,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c86466163.lua b/official/c86466163.lua index 27f250b207..f01e9d8049 100644 --- a/official/c86466163.lua +++ b/official/c86466163.lua @@ -2,42 +2,37 @@ --Satellarknight Capella local s,id=GetID() function s.initial_effect(c) - --Treat "tellarknight" monsters as Level 5 for Xyz Summons - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Apply a "You can treat Level 4 or lower "tellarknight" monsters you control as Level 5 when Xyz Summoning using 3 or more monsters as Xyz Materials" effect + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetOperation(s.effop) + c:RegisterEffect(e1a) + local e1ab=e1a:Clone() + e1ab:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e1ab) + local e1ac=e1a:Clone() + e1ac:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1ac) end s.listed_series={SET_TELLARKNIGHT} -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.xyztg) - e1:SetValue(s.xyzlv) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_SATELLARKNIGHT_CAPELLA) - e2:SetLabelObject(e1) - e2:SetValue(0x30003) --0x1 >, 0x2 =, 0x4 <, value == last digit(s) - Duel.RegisterEffect(e2,tp) -end -function s.xyztg(e,c) - return c:IsLevelBelow(4) and c:IsSetCard(SET_TELLARKNIGHT) -end -function s.xyzlv(e,c,rc) - return 0x50000+c:GetLevel() -end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + --For the rest of this turn, you can treat Level 4 or lower "tellarknight" monsters you control as Level 5 when Xyz Summoning using 3 or more monsters as Xyz Materials + local e1a=Effect.CreateEffect(e:GetHandler()) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1a:SetCode(EFFECT_XYZ_LEVEL) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(function(e,c) return c:IsLevelBelow(4) and c:IsSetCard(SET_TELLARKNIGHT) end) + e1a:SetValue(function(e,c,rc) return 0x50000+c:GetLevel() end) + e1a:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1a,tp) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_SATELLARKNIGHT_CAPELLA) + e1b:SetLabelObject(e1a) + e1b:SetValue(0x30003) --0x1 >, 0x2 =, 0x4 <, value == last digit(s) + Duel.RegisterEffect(e1b,tp) +end \ No newline at end of file diff --git a/official/c96223501.lua b/official/c96223501.lua index e7f19c6e05..64b1b899a1 100644 --- a/official/c96223501.lua +++ b/official/c96223501.lua @@ -2,58 +2,51 @@ --Satellarknight Zefrathuban local s,id=GetID() function s.initial_effect(c) - --Pendulum Summon procedure Pendulum.AddProcedure(c) - --You cannot Pendulum Summon, except "tellarknight" and "Zefra" monsters + --You cannot Pendulum Summon monsters, except "tellarknight" and "Zefra" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c,sump,sumtype) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) end) c:RegisterEffect(e1) - --Destroy 1 card you control and 1 face-up card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_TELLAR) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - c:RegisterEffect(e4) + --Destroy 1 other "tellarknight" or "Zefra" card in your Monster Zone or Pendulum Zone and 1 face-up card your opponent controls + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_DESTROY) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + e2c:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + c:RegisterEffect(e2c) end s.listed_series={SET_TELLARKNIGHT,SET_ZEFRA} -function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(SET_TELLARKNIGHT) or c:IsSetCard(SET_ZEFRA) then return false end - return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function s.filter1(c) - return c:IsFaceup() and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) +function s.desfilter(c,e,tp) + return ((c:IsControler(tp) and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA})) or c:IsControler(1-tp)) and c:IsFaceup() + and c:IsCanBeEffectTarget(e) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.destg(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_MZONE|LOCATION_PZONE,0,1,e:GetHandler()) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE|LOCATION_PZONE,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,LOCATION_ONFIELD,e:GetHandler(),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_DESTROY) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,2,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetTargetCards(e) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c99668578.lua b/official/c99668578.lua index a04e757a25..3b7c5c512d 100644 --- a/official/c99668578.lua +++ b/official/c99668578.lua @@ -2,39 +2,37 @@ --Satellarknight Procyon local s,id=GetID() function s.initial_effect(c) - --Send 1 "tellarknight" monster to the GY and draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Send 1 "tellarknight" monster from your hand to the GY, and if you do, draw 1 card + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) + 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.drtg) + e1a:SetOperation(s.drop) + 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) end s.listed_series={SET_TELLARKNIGHT} -function s.filter(c) - return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() +function s.tgfilter(c) + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and c:IsAbleToGrave() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(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.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,s.filter,1,1,REASON_EFFECT)==0 then return end - local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) - if ct>0 then +function s.drop(e,tp,eg,ep,ev,re,r,rp) + if Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_EFFECT)>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Draw(tp,1,REASON_EFFECT) end end \ No newline at end of file From fe1a088d4a6198290741329e34298601deac1c49 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 21:23:21 +0800 Subject: [PATCH 016/165] update "Number C65: King Overfiend" --- official/c49195710.lua | 61 +++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/official/c49195710.lua b/official/c49195710.lua index a3a35fe37b..e5e99018f6 100644 --- a/official/c49195710.lua +++ b/official/c49195710.lua @@ -1,63 +1,46 @@ ---CNo.65 裁断魔王ジャッジ・デビル +--CNo.65 裁断魔王ジャッジ・デビル --Number C65: King Overfiend local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,3) c:EnableReviveLimit() - --addown + --Xyz Summon procedure: 3 Level 3 DARK monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,3) + --Make 1 face-up monster your opponent controls lose 1000 ATK and DEF local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetTarget(s.atkdeftg) + e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) - --act limit + --Effect Monsters your opponent controls cannot activate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_CANNOT_TRIGGER) + e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(s.accon) + e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3790062) end) c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e3:SetCode(511002571) - e3:SetLabelObject(e1) - e3:SetLabel(c:GetOriginalCode()) - c:RegisterEffect(e3) end s.xyz_number=65 s.listed_names={3790062} -function s.filter(c) - return c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end +function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,tc,1,tp,-1000) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() +function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - tc:RegisterEffect(e2) + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + tc:UpdateAttack(-1000,nil,c) + tc:UpdateDefense(-1000,nil,c) end end -function s.accon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3790062) -end \ No newline at end of file From 6523cd452a7ed726a5e963a725a10c6795ee5b93 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 21:23:34 +0800 Subject: [PATCH 017/165] update "Number F0: Utopic Future Slash" --- official/c43490025.lua | 56 ++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/official/c43490025.lua b/official/c43490025.lua index 2c35d39524..807cec93dd 100644 --- a/official/c43490025.lua +++ b/official/c43490025.lua @@ -2,42 +2,34 @@ --Number F0: Utopic Future Slash local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz summon procedure: 2 Xyz Monsters with the same Rank, except "Number" monsters Xyz.AddProcedure(c,s.xyzfilter,nil,2,s.ovfilter,aux.Stringid(id,1),nil,nil,false,s.xyzcheck) --Gains 500 ATK per "Number" Xyz monsters in the GYs + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 end) + c:RegisterEffect(e1) + --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.atkval) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) c:RegisterEffect(e2) - --Cannot be destroyed by battle + --Make this card able to make a second attack local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCondition(function() return Duel.IsAbleToEnterBP() end) + e3:SetCost(Cost.Detach(1)) + e3:SetTarget(s.atktg) + e3:SetOperation(s.atkop) c:RegisterEffect(e3) - --Make itself be able to make a second attack - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(s.atkcon) - e4:SetCost(Cost.Detach(1)) - e4:SetTarget(s.atktg) - e4:SetOperation(s.atkop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e5:SetCode(511002571) - e5:SetLabelObject(e4) - e5:SetLabel(c:GetOriginalCode()) - c:RegisterEffect(e5) end s.listed_series={SET_NUMBER,SET_UTOPIA} s.xyz_number=0 @@ -55,19 +47,13 @@ end function s.atkfilter(c) return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - --Can make a second attack + --This card can make a second attack during each Battle Phase this turn local e1=Effect.CreateEffect(c) e1:SetDescription(3201) e1:SetType(EFFECT_TYPE_SINGLE) From 772dcafeea2f568633a371e32b89a277d932b2d8 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 3 Jul 2025 00:53:18 +0300 Subject: [PATCH 018/165] Updated some Xyz Monsters that weren't using the "Cost.Detach" function --- official/c10000030.lua | 20 ++++------ official/c65301952.lua | 38 +++++++------------ official/c73445448.lua | 85 +++++++++++++++--------------------------- official/c83531441.lua | 70 +++++++++++++--------------------- official/c86532744.lua | 68 +++++++++++++++------------------ 5 files changed, 107 insertions(+), 174 deletions(-) diff --git a/official/c10000030.lua b/official/c10000030.lua index 12fe23edd7..e7dcd3c0c9 100644 --- a/official/c10000030.lua +++ b/official/c10000030.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure + --Xyz Summon procedure: 2 Level 6 Spellcaster monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),6,2) --Activate 1 of these effects local e1=Effect.CreateEffect(c) @@ -12,23 +12,17 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.effcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.effcost)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) end function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then if not chkc:IsControler(1-tp) then return false end @@ -36,12 +30,12 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if op==1 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControlerCanBeChanged() elseif op==2 then - return chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) + return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end end local b1=Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) + and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) if chk==0 then return b1 or b2 end local op=Duel.SelectEffect(tp, {b1,aux.Stringid(id,1)}, @@ -55,7 +49,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) elseif op==2 then e:SetCategory(CATEGORY_SPECIAL_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) end end @@ -70,4 +64,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Special Summon 1 monster from your opponent's GY Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65301952.lua b/official/c65301952.lua index 23158a467f..42078326d3 100644 --- a/official/c65301952.lua +++ b/official/c65301952.lua @@ -2,56 +2,46 @@ --Alchemic Magician local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,3) c:EnableReviveLimit() - --atkup + --Xyz Summon procedure: 3 Level 4 Spellcaster monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,3) + --This card gains 200 ATK for each Spell in your GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(s.atkval) + e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(Card.IsSpell,c:GetControler(),LOCATION_GRAVE,0,nil)*200 end) c:RegisterEffect(e1) - --set + --Set 1 Spell from your Deck to your Spell & Trap Zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCondition(s.setcon) - e2:SetCost(s.setcost) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetCost(Cost.AND(Cost.Detach(1),s.setcost)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsSpell,c:GetControler(),LOCATION_GRAVE,0,nil)*200 -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) -end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end -function s.filter(c) - return c:IsSpell() and not c:IsType(TYPE_FIELD) and c:IsSSetable() +function s.setfilter(c) + return c:IsSpell() and not c:IsFieldSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end + 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) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then - Duel.SSet(tp,g:GetFirst()) + Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c73445448.lua b/official/c73445448.lua index 6654992832..8603d878c4 100644 --- a/official/c73445448.lua +++ b/official/c73445448.lua @@ -1,71 +1,48 @@ ---No.22 不乱健 +--No.22 不乱健 --Number 22: Zombiestein local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),8,2) c:EnableReviveLimit() - --spsummon limit + --Xyz Summon procedure: 2 Level 8 DARK monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),8,2) + c:AddMustBeXyzSummoned() + --Change this card to Defense Position, and if you do, negate the effects of 1 face-up card your opponent controls until the end of this turn local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.xyzlimit) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(Cost.AND(Cost.Detach(1),s.discost)) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(s.cost) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) end s.xyz_number=22 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end - if chk==0 then return e:GetHandler():IsAttackPos() + local c=e:GetHandler() + if chk==0 then return c:IsAttackPos() and c:IsCanChangePosition() and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,POS_DEFENSE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsDefensePos() then return end - Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0) local tc=Duel.GetFirstTarget() - if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e3) - end + if c:IsRelateToEffect(e) and c:IsAttackPos() and c:IsCanChangePosition() + and Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)>0 + and tc:IsRelateToEffect(e) and tc:IsFaceup()then + --Negate that targeted card's effects, until the end of this turn + tc:NegateEffects(c,RESET_PHASE|PHASE_END,true) end -end +end \ No newline at end of file diff --git a/official/c83531441.lua b/official/c83531441.lua index 6cd6496569..28f89fac09 100644 --- a/official/c83531441.lua +++ b/official/c83531441.lua @@ -2,34 +2,34 @@ --Dante, Traveler of the Burning Abyss local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,2) c:EnableReviveLimit() - --atkup + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) + --This card gains 500 ATK for each sent to the GY for the cost local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.atkcost)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - --to defense + --If this card attacks, it is changed to Defense Position at the end of the Battle Phase local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE|PHASE_BATTLE) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCondition(s.poscon) - e2:SetOperation(s.posop) + e2:SetCondition(function(e) return e:GetHandler():GetAttackedCount()>0 end) + e2:SetOperation(function(e) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) end) c:RegisterEffect(e2) - --to hand + --Add 1 other "Burning Abyss" card from your GY to your hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_TO_GRAVE) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) @@ -37,58 +37,38 @@ function s.initial_effect(c) end s.listed_series={SET_BURNING_ABYSS} function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local ct={} - for i=3,1,-1 do - if Duel.IsPlayerCanDiscardDeckAsCost(tp,i) then - table.insert(ct,i) - end - end - if #ct==1 then - Duel.DiscardDeck(tp,ct[1],REASON_COST) - e:SetLabel(1) - else - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local ac=Duel.AnnounceNumber(tp,table.unpack(ct)) - Duel.DiscardDeck(tp,ac,REASON_COST) - e:SetLabel(ac) - end + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end + local max_ct=math.min(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0),3) + local op=max_ct==1 and 1 or Duel.AnnounceNumberRange(tp,1,max_ct) + e:SetLabel(op) + Duel.DiscardDeck(tp,op,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=e:GetLabel() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --Until the end of this turn, this card gains 500 ATK for each card sent to the GY this way local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(e:GetLabel()*500) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - e1:SetValue(ct*500) c:RegisterEffect(e1) end end -function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENSE) - end -end -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_BURNING_ABYSS) 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.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc~=c and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) + 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 +end \ No newline at end of file diff --git a/official/c86532744.lua b/official/c86532744.lua index ff52d9499b..7ff3ca8027 100644 --- a/official/c86532744.lua +++ b/official/c86532744.lua @@ -1,55 +1,47 @@ ---SNo.39 希望皇ホープONE +--SNo.39 希望皇ホープONE --Number S39: Utopia Prime local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3,s.ovfilter,aux.Stringid(id,1)) - --Destroy Special Summoned monsters and inflict damage + --Xyz Summon procedure: 3 Level 4 LIGHT monsters OR 1 "Number 39: Utopia" you control + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3,s.ovfilter,aux.Stringid(id,0)) + --Destroy as many Special Summoned monsters your opponent controls as possible, and if you do, banish them, then inflict 300 damage to your opponent for each monster banished local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCondition(function(e,tp) return Duel.GetLP(1-tp)>=Duel.GetLP(tp)+3000 end) + e1:SetCost(Cost.AND(Cost.Detach(3),Cost.PayLP(10,true))) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) c:RegisterEffect(e1) end s.xyz_number=39 -s.listed_names={84013237} --Number 39: Utopia +s.listed_names={84013237} --"Number 39: Utopia" function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) + return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) and c:IsFaceup() end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 +function s.desfilter(c) + return c:IsSpecialSummoned() and c:IsAbleToRemove() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLP(tp)>10 and e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) - Duel.PayLPCost(tp,Duel.GetLP(tp)-10) +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*300) end -function s.filter(c) - return c:IsAbleToRemove() - and (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -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(1-tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#sg*300) -end -function s.ctfilter(c) +function s.rmctfilter(c) return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED) - local ct=Duel.GetOperatedGroup():FilterCount(s.ctfilter,nil) - if ct>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,ct*300,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED)>0 then + local ct=Duel.GetOperatedGroup():FilterCount(s.rmctfilter,nil) + if ct>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,ct*300,REASON_EFFECT) + end end -end +end \ No newline at end of file From 1ca3b3a5bcffbbbd2df25d475dba491cf3fc6587 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 3 Jul 2025 17:28:51 +0800 Subject: [PATCH 019/165] Update utility.lua track functions created by SelfDiscard and SelfDiscardToGrave --- utility.lua | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/utility.lua b/utility.lua index 8125c07dcc..3bb4819e6a 100644 --- a/utility.lua +++ b/utility.lua @@ -1481,22 +1481,27 @@ function Cost.SelfToExtra(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c:IsAbleToExtraAsCost() end Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) end +function Cost.SelfReveal(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + Duel.ConfirmCards(1-tp,c) + Duel.ShuffleHand(tp) +end + +local self_discard_costs={} function Cost.SelfDiscard(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() end Duel.SendtoGrave(c,REASON_DISCARD|REASON_COST) end +self_discard_costs[Cost.SelfDiscard]=true function Cost.SelfDiscardToGrave(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() end Duel.SendtoGrave(c,REASON_DISCARD|REASON_COST) end -function Cost.SelfReveal(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsPublic() end - Duel.ConfirmCards(1-tp,c) - Duel.ShuffleHand(tp) -end +self_discard_costs[Cost.SelfDiscardToGrave]=true + --Aliases for historical reasons: Cost.SelfRelease=Cost.SelfTribute Auxiliary.bfgcost=Cost.SelfBanish @@ -1552,10 +1557,13 @@ function Cost.Detach(min,max,op) return cost_func end -function Effect.HasDetachCost(e) - return detach_costs[e:GetCost()] +local function cost_table_check(t) + return function(eff) return t[eff:GetCost()] end end +Effect.HasSelfDiscardCost=cost_table_check(self_discard_costs) +Effect.HasDetachCost=cost_table_check(detach_costs) + --Default cost for "You can pay X LP;" function Cost.PayLP(lp_value,pay_until) if not pay_until then @@ -1616,6 +1624,7 @@ function Cost.AND(...) for _,fn in ipairs(fns) do if detach_costs[fn] then detach_costs[full_cost]=true end + if self_discard_costs[fn] then self_discard_costs[full_cost]=true end end return full_cost end From c5b7f1132dae3f61c22ec46a82fe2f6252596115 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 3 Jul 2025 17:29:11 +0800 Subject: [PATCH 020/165] update "Thunder Dragon" monsters --- goat/c504700054.lua | 27 ++++++++----------- official/c12081875.lua | 25 ++++++++++-------- official/c20318029.lua | 44 ++++++++++++------------------- official/c29596581.lua | 41 +++++++---------------------- official/c31786629.lua | 20 +++++++------- official/c56713174.lua | 59 +++++++++++++++++------------------------- official/c83107873.lua | 41 ++++++++++++++--------------- 7 files changed, 106 insertions(+), 151 deletions(-) diff --git a/goat/c504700054.lua b/goat/c504700054.lua index d2803998cd..206a321bf6 100644 --- a/goat/c504700054.lua +++ b/goat/c504700054.lua @@ -3,37 +3,32 @@ --"“Thunder Dragon” may be discarded to search for 0 “Thunder Dragons” in the player’s deck." netrep ruling local s,id=GetID() function s.initial_effect(c) - --search + --Add up to 2 "Thunder Dragon" cards from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) end s.listed_names={31786629} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function s.filter(c) +function s.thfilter(c) return c:IsCode(31786629) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,0,2,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,0,2,nil) if g and #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) - else - if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) then Duel.GoatConfirm(tp,LOCATION_DECK) end + elseif not Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then + Duel.GoatConfirm(tp,LOCATION_DECK) end end diff --git a/official/c12081875.lua b/official/c12081875.lua index dbd9dcb1ff..71a9310800 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -34,11 +34,11 @@ end function s.applyfilter(c,e,tp) if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) - and c:IsHasEffect(EFFECT_MARKER_THUNDRA) and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()) then + and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()) then return false end - for _,eff in ipairs(c:GetMarkedEffects(EFFECT_MARKER_THUNDRA)) do - if s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end + for _,eff in ipairs({c:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end end function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -51,24 +51,27 @@ end function s.applyop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end - local effs=tc:GetMarkedEffects(EFFECT_MARKER_THUNDRA) + local effs={} local options={} - for _,eff in ipairs(effs) do - local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) - table.insert(options,{eff_chk,eff:GetDescription()}) + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) + end end local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) if not op then return end local te=effs[op] if not te then return end Duel.ClearTargetCard() - s.runfn(te:GetTarget(),te,tp) + s.runfn(te:GetTarget(),te,tp,1) Duel.BreakEffect() tc:CreateEffectRelation(te) Duel.BreakEffect() - local tg=Duel.GetTargetCards(te) + local tg=Duel.GetTargetCards(e) tg:ForEach(Card.CreateEffectRelation,te) - s.runfn(te:GetOperation(),te,tp,1) + s.runfn(te:GetOperation(),te,tp) tg:ForEach(Card.ReleaseEffectRelation,te) local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) @@ -88,4 +91,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c20318029.lua b/official/c20318029.lua index 6c0a56f37d..30c2d5a5d4 100644 --- a/official/c20318029.lua +++ b/official/c20318029.lua @@ -3,12 +3,12 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --atk + --Make 1 Thunder monster you control gain 500 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) 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:SetHintTiming(TIMING_DAMAGE_STEP) @@ -16,8 +16,8 @@ function s.initial_effect(c) e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --to hand + c:RegisterEffect(e1) + --You can add 1 "Thunder Dragonmatrix" from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -30,28 +30,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(s.thcon) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) c:RegisterEffect(e3) end -s.listed_names={20318029} -function s.atkfilter(c) - return c:IsFaceup() and c:IsRace(RACE_THUNDER) -end +s.listed_names={id} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsRace(RACE_THUNDER) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsRace,RACE_THUNDER),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsRace,RACE_THUNDER),tp,LOCATION_MZONE,0,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - e1:SetValue(500) - tc:RegisterEffect(e1) + tc:UpdateAttack(500,nil,e:GetHandler()) end end function s.thfilter(c) @@ -59,15 +51,13 @@ function s.thfilter(c) 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.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) +function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) + 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.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end \ No newline at end of file diff --git a/official/c29596581.lua b/official/c29596581.lua index e0cd66ebe8..3007c9ab40 100644 --- a/official/c29596581.lua +++ b/official/c29596581.lua @@ -3,7 +3,7 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Add 1 "Thunder Dragon" card to hand + --Add to your hand, 1 of your "Thunder Dragon" cards that is banished or in your GY, except "Thunder Dragonroar" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -13,8 +13,8 @@ function s.initial_effect(c) e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --Special summon 1 "Thunder Dragon" monster + c:RegisterEffect(e1) + --Special Summon 1 "Thunder Dragon" monster from your Deck in Defense Position, but return it to the hand during the End Phase local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -33,7 +33,8 @@ end s.listed_series={SET_THUNDER_DRAGON} s.listed_names={id} function s.thfilter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_THUNDER_DRAGON) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_THUNDER_DRAGON) and c:IsAbleToHand() and not c:IsCode(id) + and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end @@ -41,10 +42,10 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #tc>0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,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) @@ -56,33 +57,11 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) 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 Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(tc) - e1:SetCondition(s.thcon2) - e1:SetOperation(s.thop2) - Duel.RegisterEffect(e1,tp) + aux.DelayedOperation(tc,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end,nil,0) end Duel.SpecialSummonComplete() end -function s.thcon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffectLabel(id)~=e:GetLabel() then - e:Reset() - return false - else return true end -end -function s.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end \ No newline at end of file diff --git a/official/c31786629.lua b/official/c31786629.lua index 8f907ac25b..2eb3f889da 100644 --- a/official/c31786629.lua +++ b/official/c31786629.lua @@ -2,30 +2,30 @@ --Thunder Dragon local s,id=GetID() function s.initial_effect(c) - --search + --Add up to 2 "Thunder Dragon" from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) end s.listed_names={id} -function s.filter(c) +function s.thfilter(c) return c:IsCode(id) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,2,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,2,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c56713174.lua b/official/c56713174.lua index aff01402ba..bcc5298b34 100644 --- a/official/c56713174.lua +++ b/official/c56713174.lua @@ -3,7 +3,7 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Discard itself to dd to hand + --Add 1 "Thunder Dragondark" from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --Add to hand when banished or sent to the GY + e1:SetTarget(s.thtg(s.dragondarkfilter)) + e1:SetOperation(s.thop(s.dragondarkfilter)) + c:RegisterEffect(e1) + --Add 1 "Thunder Dragon" card from your Deck to your hand, except "Thunder Dragondark" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -23,46 +23,35 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_REMOVE) e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg2) - e2:SetOperation(s.thop2) + e2:SetTarget(s.thtg(s.thundrafilter)) + e2:SetOperation(s.thop(s.thundrafilter)) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(s.thcon) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) c:RegisterEffect(e3) end s.listed_series={SET_THUNDER_DRAGON} s.listed_names={id} -function s.thfilter(c) +function s.dragondarkfilter(c) return 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 tc=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function s.thfilter2(c) +function s.thundrafilter(c) return c:IsSetCard(SET_THUNDER_DRAGON) and not c:IsCode(id) and c:IsAbleToHand() end -function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +function s.thtg(filter) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end end -function s.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil) - if #tc>0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) +function s.thop(filter) + return function(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end end -end \ No newline at end of file +end diff --git a/official/c83107873.lua b/official/c83107873.lua index 18edeec8e9..419c860bef 100644 --- a/official/c83107873.lua +++ b/official/c83107873.lua @@ -3,7 +3,7 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --special summon + --Special Summon 1 of your "Thunder Dragon" monsters that is banished or in your GY, except "Thunder Dragonhawk" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -13,8 +13,8 @@ function s.initial_effect(c) e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --to deck + c:RegisterEffect(e1) + --Shuffle any number of cards from your hand into the Deck, then draw the same number of cards local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) @@ -27,13 +27,14 @@ function s.initial_effect(c) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(s.tdcon) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) c:RegisterEffect(e3) end s.listed_names={id} s.listed_series={SET_THUNDER_DRAGON} function s.spfilter(c,e,tp) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_THUNDER_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THUNDER_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -44,27 +45,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,63,nil) - if #g==0 then return end - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,#g,REASON_EFFECT) -end \ No newline at end of file + local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil) + if #hg==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=hg:Select(tp,1,#hg,nil) + if #g==0 or Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK) + if ct>0 then + Duel.ShuffleDeck(tp) + Duel.BreakEffect() + Duel.Draw(tp,ct,REASON_EFFECT) + end +end From 799ae70a54c8636968c3a975b2fba9f132d3a976 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 3 Jul 2025 20:53:05 +0800 Subject: [PATCH 021/165] update "Thunder Dragon Thunderstormech" --- official/c12081875.lua | 73 +++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index 71a9310800..3bb987515e 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -15,8 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.applytg) - e1:SetOperation(s.applyop) + e1:SetTarget(s.applytg(nil)) c:RegisterEffect(e1) --If a Thunder monster(s) you control would be destroyed by battle or card effect, you can banish 3 cards from your GY instead local e2=Effect.CreateEffect(c) @@ -41,40 +40,48 @@ function s.applyfilter(c,e,tp) if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end end -function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.applyfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) +function s.applytg(chkc_tg) + return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return not chkc_tg or chkc_tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end + if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) + local effs={} + local options={} + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) + end + end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + local te=effs[op] + Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + local targ_fn=te:GetTarget() + if targ_fn then + Duel.ClearTargetCard() + tc:CreateEffectRelation(e) + s.runfn(targ_fn,te,tp,1) + end + e:SetTarget(s.applytg(targ_fn)) + e:SetOperation(s.applyop(tc,te:GetOperation())) + end end -function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local effs={} - local options={} - for _,eff in ipairs({tc:GetOwnEffects()}) do - if eff:HasSelfDiscardCost() then - table.insert(effs,eff) - local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) - table.insert(options,{eff_chk,eff:GetDescription()}) +function s.applyop(tc,op) + return function(e,tp,eg,ep,ev,re,r,rp) + if tc:IsRelateToEffect(e) then + if op then op(e,tp,eg,ep,ev,re,r,rp) end + if tc:IsAbleToDeck() then + local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + Duel.BreakEffect() + Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) + end end + e:SetTarget(s.applytg(nil)) + e:SetOperation(nil) end - local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) - if not op then return end - local te=effs[op] - if not te then return end - Duel.ClearTargetCard() - s.runfn(te:GetTarget(),te,tp,1) - Duel.BreakEffect() - tc:CreateEffectRelation(te) - Duel.BreakEffect() - local tg=Duel.GetTargetCards(e) - tg:ForEach(Card.CreateEffectRelation,te) - s.runfn(te:GetOperation(),te,tp) - tg:ForEach(Card.ReleaseEffectRelation,te) - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_THUNDER) From 2ee5694aa0af90222968752c7b798c2b0a5ec33b Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 00:03:23 +0800 Subject: [PATCH 022/165] Update c12081875.lua --- official/c12081875.lua | 89 +++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index 3bb987515e..d07ca49fc7 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -15,7 +15,8 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.applytg(nil)) + e1:SetTarget(s.applytg) + e1:SetOperation(s.applyop) c:RegisterEffect(e1) --If a Thunder monster(s) you control would be destroyed by battle or card effect, you can banish 3 cards from your GY instead local e2=Effect.CreateEffect(c) @@ -31,56 +32,56 @@ function s.runfn(fn,eff,tp,chk) return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,nil,REASON_EFFECT,PLAYER_NONE,chk) end function s.applyfilter(c,e,tp) - if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() - and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) - and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()) then - return false - end + if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() and c:IsAbleToDeck() + and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))) then return false end for _,eff in ipairs({c:GetOwnEffects()}) do if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end end -function s.applytg(chkc_tg) - return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return not chkc_tg or chkc_tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) - local effs={} - local options={} - for _,eff in ipairs({tc:GetOwnEffects()}) do - if eff:HasSelfDiscardCost() then - table.insert(effs,eff) - local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) - table.insert(options,{eff_chk,eff:GetDescription()}) - end - end - local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) - local te=effs[op] - Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) - local targ_fn=te:GetTarget() - if targ_fn then - Duel.ClearTargetCard() - tc:CreateEffectRelation(e) - s.runfn(targ_fn,te,tp,1) +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|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + local effs={} + local options={} + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) end - e:SetTarget(s.applytg(targ_fn)) - e:SetOperation(s.applyop(tc,te:GetOperation())) end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + local te=effs[op] + Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + local tg=te:GetTarget() + if tg then + e:SetLabel(0) + e:SetLabelObject(nil) + Duel.ClearTargetCard() + tc:CreateEffectRelation(e) + s.runfn(tg,e,tp,1) + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + Duel.ClearOperationInfo(0) + end + e:SetLabelObject({tc,te}) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end -function s.applyop(tc,op) - return function(e,tp,eg,ep,ev,re,r,rp) - if tc:IsRelateToEffect(e) then - if op then op(e,tp,eg,ep,ev,re,r,rp) end - if tc:IsAbleToDeck() then - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) - end - end - e:SetTarget(s.applytg(nil)) - e:SetOperation(nil) +function s.applyop(e,tp,eg,ep,ev,re,r,rp) + local tc,te=table.unpack(e:GetLabelObject()) + if not tc:IsRelateToEffect(e) then return end + local op=te:GetOperation() + if op then + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + op(e,tp,eg,ep,ev,re,r,rp) + end + if tc:IsAbleToDeck() then + local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + Duel.BreakEffect() + Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end end function s.repfilter(c,tp) From 5ebd336dafecc5e97514c5e9c05fe90b6b70c2fd Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:30:33 +0800 Subject: [PATCH 023/165] add "Dragon Ruler" cost helper functions --- cards_specific_functions.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/cards_specific_functions.lua b/cards_specific_functions.lua index 4f11526299..87f943428d 100644 --- a/cards_specific_functions.lua +++ b/cards_specific_functions.lua @@ -1239,3 +1239,30 @@ function Infernoid.RegisterSummonProcedure(c,monstersToBanish) e2:SetOperation(InfernoidInt.summonOperation) c:RegisterEffect(e2) end + +DragonRuler={} +do + local function discard_with_other_cost(filter) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_HAND,0,1,1,c) + Duel.SendtoGrave(g+c,REASON_COST|REASON_DISCARD) + end + end + --For Level 7 monsters (can only discard to GY, and does not allow Dragons) + function DragonRuler.SelfDiscardToGraveCost(attr) + local function other_discard_to_grave_filter(c) + return c:IsAttribute(attr) and c:IsDiscardable() and c:IsAbleToGraveAsCost() + end + return Cost.AND(discard_with_other_cost(other_discard_to_grave_filter),Cost.SelfDiscardToGrave) + end + --For lower Level monsters (not limited to discarding to GY, and allows Dragons) + function DragonRuler.SelfDiscardCost(attr) + local function other_discard_filter(c) + return (c:IsAttribute(attr) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() + end + return Cost.AND(discard_with_other_cost(other_discard_filter),Cost.SelfDiscardToGrave) + end +end From 4688780153d2e67115870eb0ccfef999b3f9ae44 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:31:20 +0800 Subject: [PATCH 024/165] update "Chasma, Dragon Ruler of Auroras" --- official/c4965193.lua | 73 +++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/official/c4965193.lua b/official/c4965193.lua index 2b38a9740e..f175128800 100644 --- a/official/c4965193.lua +++ b/official/c4965193.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.applycost) + e1:SetCost(Cost.AND(s.applycost,Cost.Detach(1))) e1:SetTarget(s.applytg) e1:SetOperation(s.applyop) c:RegisterEffect(e1) @@ -32,62 +32,59 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_DRAGON_RULER} -function s.tgfilter(c,tp) - if not (c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsAbleToGraveAsCost() and c:IsHasEffect(id)) then - return false - end - local eff=c:GetCardEffect(id) - local te=eff:GetLabelObject() - local con=te:GetCondition() - local tg=te:GetTarget() - if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) - and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) then - return true +function s.runfn(fn,eff,tp,chk) + return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,nil,REASON_EFFECT,PLAYER_NONE,chk) +end +function s.applyfilter(c,tp) + if not (c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsAbleToGraveAsCost()) then return false end + for _,eff in ipairs({c:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end return false end function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + local effs={} + local options={} + for _,eff in ipairs({sc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) + end + end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + local te=effs[op] + e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + e:SetLabelObject(te) Duel.SendtoGrave(sc,REASON_COST) - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - e:SetLabelObject(sc:GetCardEffect(id):GetLabelObject()) - c:RemoveOverlayCard(tp,1,1,REASON_COST) end function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local te=e:GetLabelObject() - local tg=te and te:GetTarget() or nil - if chkc then return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end + if chkc then return te and te:GetTarget() and te:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) end if chk==0 then return true end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + e:SetLabel(0) + e:SetLabelObject(nil) + local tg=te:GetTarget() if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + Duel.ClearOperationInfo(0) end e:SetLabelObject(te) - Duel.ClearOperationInfo(0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() - if not te then return end - local sc=te:GetHandler() - if sc:GetFlagEffect(id)==0 then - e:SetLabel(0) - e:SetLabelObject(nil) - return - end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() if op then - op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + op(e,tp,eg,ep,ev,re,r,rp) end - e:SetLabel(0) - e:SetLabelObject(nil) + e:SetProperty(0) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -108,4 +105,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end From abcbcd2b2dc80505a033837d6178dacd62f7aa23 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:31:44 +0800 Subject: [PATCH 025/165] update "Dragon Ruler" monsters that discard themselves --- official/c26400609.lua | 63 ++++++++++++-------------------- official/c27415516.lua | 24 +++--------- official/c53797637.lua | 26 ++++--------- official/c53804307.lua | 55 ++++++++++------------------ official/c58201062.lua | 17 ++------- official/c89185742.lua | 26 ++++--------- official/c89399912.lua | 83 +++++++++++++++++------------------------- official/c90411554.lua | 68 +++++++++++++--------------------- official/c91020571.lua | 26 ++++--------- official/c94655777.lua | 17 ++------- 10 files changed, 135 insertions(+), 270 deletions(-) diff --git a/official/c26400609.lua b/official/c26400609.lua index 9b0d63a5b0..6b4966e1f8 100644 --- a/official/c26400609.lua +++ b/official/c26400609.lua @@ -2,41 +2,41 @@ --Tidal, Dragon Ruler of Waterfalls local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) - --Send 1 monster from your Deck to the Graveyard + --Send 1 monster from your Deck to the GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.tgcost) + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_WATER)) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) - --Add 1 WATER Dragon-Type monster from your Deck to your hand + c:RegisterEffect(e3) + --Add 1 FIRE Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -48,62 +48,45 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.tgfilter(c) - return c:IsMonster() and c:IsAbleToGrave() -end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) --Excluding itself for a correct interaction with "Chasmatis, Dragon Ruler of Poles" - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end @@ -122,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c27415516.lua b/official/c27415516.lua index c0b8cdd6b5..3f3482c665 100644 --- a/official/c27415516.lua +++ b/official/c27415516.lua @@ -2,31 +2,19 @@ --Stream, Dragon Ruler of Droplets local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Tidal, Dragon Ruler of Waterfalls" from deck + --Special Summon 1 "Tidal, Dragon Ruler of Waterfalls" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_WATER)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) end s.listed_names={26400609} --"Tidal, Dragon Ruler of Waterfalls" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsCode(26400609) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c53797637.lua b/official/c53797637.lua index d6ce3a4bc2..d11b4cf571 100644 --- a/official/c53797637.lua +++ b/official/c53797637.lua @@ -2,31 +2,19 @@ --Burner, Dragon Ruler of Sparks local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Blaster, Dragon Ruler of Infernos" from deck + --Special Summon 1 "Blaster, Dragon Ruler of Infernos" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_FIRE)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) end s.listed_names={53804307}--"Blaster, Dragon Ruler of Infernos" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsCode(53804307) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Cannot attack + --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c53804307.lua b/official/c53804307.lua index 51886831e3..b216c6506b 100644 --- a/official/c53804307.lua +++ b/official/c53804307.lua @@ -2,41 +2,41 @@ --Blaster, Dragon Ruler of Infernos local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) --Destroy 1 card on the field local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.descost) + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_FIRE)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e3) --Add 1 FIRE Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) @@ -49,52 +49,37 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -122,4 +107,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c58201062.lua b/official/c58201062.lua index 5f7d68c1d4..9ce96afc02 100644 --- a/official/c58201062.lua +++ b/official/c58201062.lua @@ -10,10 +10,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_LIGHT)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) --Special Summon 1 "Chasmatis, Dragon Ruler of Auroras" from your GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,17 +29,6 @@ function s.initial_effect(c) end s.listed_series={SET_DRAGON_RULER} s.listed_names={id,4965193} --"Chasmatis, Dragon Ruler of Auroras" -function s.thcostfilter(c) - return (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.thfilter(c) return c:IsSetCard(SET_DRAGON_RULER) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end @@ -84,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c89185742.lua b/official/c89185742.lua index 1f1851f3c9..20a7e4bec9 100644 --- a/official/c89185742.lua +++ b/official/c89185742.lua @@ -2,31 +2,19 @@ --Lightning, Dragon Ruler of Drafts local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Tempest, Dragon Ruler of Storms" from deck + --Special Summon 1 "Tempest, Dragon Ruler of Storms" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_WIND)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) end s.listed_names={89399912} --"Tempest, Dragon Ruler of Storms" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsCode(89399912) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Cannot attack + --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c89399912.lua b/official/c89399912.lua index 224811ab18..24a2174d53 100644 --- a/official/c89399912.lua +++ b/official/c89399912.lua @@ -2,28 +2,28 @@ --Tempest, Dragon Ruler of Storms local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) --Add 1 Dragon monster from your Deck to your hand local e3=Effect.CreateEffect(c) @@ -32,11 +32,11 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.thdrgncost) - e3:SetTarget(s.thdrgntg) - e3:SetOperation(s.thdrgnop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) - --Add 1 WIND Dragon monster from your Deck to your hand + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_WIND)) + e3:SetTarget(s.dthtg) + e3:SetOperation(s.dthop) + c:RegisterEffect(e3) + --Add 1 WIND Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -44,83 +44,68 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_REMOVE) e4:SetCountLimit(1,id) - e4:SetTarget(s.thwindtg) - e4:SetOperation(s.thwindop) + e4:SetTarget(s.wdthtg) + e4:SetOperation(s.wdthop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.thdrgncost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.thdrgnfilter(c) +function s.dthfilter(c) return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end -function s.thdrgntg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thdrgnfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end +function s.dthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.dthfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.thdrgnop(e,tp,eg,ep,ev,re,r,rp) +function s.dthop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thdrgnfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.dthfilter,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.thwindfilter(c) +function s.wdthfilter(c) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand() end -function s.thwindtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thwindfilter,tp,LOCATION_DECK,0,1,nil) end +function s.wdthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.wdthfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.thwindop(e,tp,eg,ep,ev,re,r,rp) +function s.wdthop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thwindfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.wdthfilter,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 +end diff --git a/official/c90411554.lua b/official/c90411554.lua index 9e93950e7e..02397030cf 100644 --- a/official/c90411554.lua +++ b/official/c90411554.lua @@ -2,42 +2,42 @@ --Redox, Dragon Ruler of Boulders local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) - --Special Summon 1 monster from the GY + --Special Summon 1 monster from your GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.spcost) + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_EARTH)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) - --Add 1 EARTH Dragon-Type monster from your Deck to your hand + c:RegisterEffect(e3) + --Add 1 FIRE Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -49,61 +49,43 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + 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(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + 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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + 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.spop(e,tp,eg,ep,ev,re,r,rp) @@ -126,4 +108,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c91020571.lua b/official/c91020571.lua index 06f83e8178..42f71e4828 100644 --- a/official/c91020571.lua +++ b/official/c91020571.lua @@ -2,31 +2,19 @@ --Reactan, Dragon Ruler of Pebbles local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Redox, Dragon Ruler of Boulders" from deck + --Special Summon 1 "Redox, Dragon Ruler of Boulders" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_EARTH)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) -end -s.listed_names={90411554} --"Redox, Dragon Ruler of Boulders" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) + c:RegisterEffect(e1) end +s.listed_names={90411554} --"Redox, Dragon Ruler of Boulders" function s.spfilter(c,e,tp) return c:IsCode(90411554) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c94655777.lua b/official/c94655777.lua index 83b66ddc4e..5c1365b41f 100644 --- a/official/c94655777.lua +++ b/official/c94655777.lua @@ -11,10 +11,10 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.rmspcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_DARK)) e1:SetTarget(s.rmsptg) e1:SetOperation(s.rmspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) --Special Summon 1 "Eclepsis, Dragon Ruler of Woes" from your GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -30,17 +30,6 @@ function s.initial_effect(c) end s.listed_series={SET_DRAGON_RULER} s.listed_names={id,30350202} --"Eclepsis, Dragon Ruler of Woes" -function s.rmcostfilter(c) - return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() -end -function s.rmspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.rmspfilter(c,e,tp) return c:IsSetCard(SET_DRAGON_RULER) and c:IsFaceup() and c:IsCanBeEffectTarget(e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -109,4 +98,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end From fdb8792ee8f66bdc8f8757e6097451b07fb3cd33 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:47:51 +0800 Subject: [PATCH 026/165] Update c12081875.lua --- official/c12081875.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index d07ca49fc7..c31afc7014 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -32,7 +32,8 @@ function s.runfn(fn,eff,tp,chk) return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,nil,REASON_EFFECT,PLAYER_NONE,chk) end function s.applyfilter(c,e,tp) - if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() and c:IsAbleToDeck() + if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() + and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))) then return false end for _,eff in ipairs({c:GetOwnEffects()}) do if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end @@ -42,7 +43,7 @@ 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|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() local effs={} local options={} for _,eff in ipairs({tc:GetOwnEffects()}) do @@ -55,27 +56,28 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) - local tg=te:GetTarget() - if tg then + local targ_fn=te:GetTarget() + if targ_fn then e:SetLabel(0) e:SetLabelObject(nil) - Duel.ClearTargetCard() - tc:CreateEffectRelation(e) - s.runfn(tg,e,tp,1) + s.runfn(targ_fn,e,tp,1) te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) Duel.ClearOperationInfo(0) end - e:SetLabelObject({tc,te}) + local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + e:SetLabelObject({tc,te,tg and tg:Clone() or nil}) + Duel.SetTargetCard(tc) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc,te=table.unpack(e:GetLabelObject()) + local tc,te,tg=table.unpack(e:GetLabelObject()) if not tc:IsRelateToEffect(e) then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) + if tg then Duel.ChangeTargetCard(ev,tg) end op(e,tp,eg,ep,ev,re,r,rp) end if tc:IsAbleToDeck() then From f26fc51e334131e37b3243253db1fb4302da6ccf Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 13:24:04 +0300 Subject: [PATCH 027/165] "Tellarknight Constellar Caduceus" label fix + "Number C32: Shark Drake Veiss" update --- official/c49221191.lua | 66 ++++++++++++++++++------------------------ official/c58858807.lua | 2 ++ 2 files changed, 30 insertions(+), 38 deletions(-) diff --git a/official/c49221191.lua b/official/c49221191.lua index f2d9520071..fbd2fb0e8e 100644 --- a/official/c49221191.lua +++ b/official/c49221191.lua @@ -1,70 +1,60 @@ ---CNo.32 海咬龍シャーク・ドレイク・バイス +--CNo.32 海咬龍シャーク・ドレイク・バイス --Number C32: Shark Drake Veiss local s,id=GetID() function s.initial_effect(c) - --xyz summon c:EnableReviveLimit() + --Xyz Summon procedure: 4 Level 4 WATER monsters OR 1 "Number 32: Shark Drake" you control Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),4,4,s.ovfilter,aux.Stringid(id,0)) - --atk/def + --Make the ATK/DEF of 1 face-up monster on the field become 0 until the end of your turn local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(function(e,tp) return Duel.GetLP(tp)<=1000 and aux.StatChangeDamageStepCondition() end) + e1:SetCost(Cost.AND(s.atkdefcost,Cost.Detach(1))) + e1:SetTarget(s.atkdeftg) + e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) end s.xyz_number=32 -s.listed_names={65676461} +s.listed_names={65676461} --"Number 32: Shark Drake" function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65676461) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=1000 and aux.StatChangeDamageStepCondition() + return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65676461) and c:IsFaceup() end -function s.rfilter(c) +function s.atkdefcostfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) - and Duel.IsExistingTarget(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,c) + and Duel.IsExistingTarget(aux.OR(Card.HasNonZeroAttack,Card.HasNonZeroDefense),0,LOCATION_MZONE,LOCATION_MZONE,1,c) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) +function s.atkdefcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.atkdefcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.atkdefcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.filter(c) - return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0) +function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and (chkc:HasNonZeroAttack() or chkc:HasNonZeroDefense()) end + if chk==0 then return Duel.IsExistingTarget(aux.OR(Card.HasNonZeroAttack,Card.HasNonZeroDefense),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.OR(Card.HasNonZeroAttack,Card.HasNonZeroDefense),tp,LOCATION_MZONE,LOCATION_MZONE,1,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 s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local ct=Duel.IsTurnPlayer(1-tp) and 2 or 1 + --Its ATK/DEF become 0 until the end of your turn 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) - if Duel.IsTurnPlayer(1-tp) then - e1:SetReset(RESETS_STANDARD_PHASE_END,2) - else - e1:SetReset(RESETS_STANDARD_PHASE_END,1) - end + e1:SetReset(RESETS_STANDARD_PHASE_END,ct) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c58858807.lua b/official/c58858807.lua index f085798945..454b7ed686 100644 --- a/official/c58858807.lua +++ b/official/c58858807.lua @@ -109,6 +109,8 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end + eff:SetLabel(e:GetLabel()) + eff:SetLabelObject(e:GetLabelObject()) e:SetLabelObject(eff) Duel.ClearOperationInfo(0) end From ef42f936247068e94278b79a6d31099679a8a2f4 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 13:31:53 +0300 Subject: [PATCH 028/165] Update "Allure Palace (Anime)" to also use a cost table --- unofficial/c511310036.lua | 2 +- utility.lua | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/unofficial/c511310036.lua b/unofficial/c511310036.lua index 48d947dc79..61fbaeb6dc 100644 --- a/unofficial/c511310036.lua +++ b/unofficial/c511310036.lua @@ -58,7 +58,7 @@ function s.regop(e,tp) for allure_card in g:Iter() do local effs={allure_card:GetOwnEffects()} for _,eff in ipairs(effs) do - if eff:GetCost()==Cost.SelfToGrave and eff:GetCode()&(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)>0 then + if eff:HasSelfToGraveCost() and eff:GetCode()&(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)>0 then allure_card:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local condition=eff:GetCondition() --Ignition Effect version of the "Allure Queen" monster's Trigger Effect diff --git a/utility.lua b/utility.lua index 3bb4819e6a..81405ad330 100644 --- a/utility.lua +++ b/utility.lua @@ -1461,11 +1461,13 @@ function Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c:IsReleasable() end Duel.Release(c,REASON_COST) end +local self_tograve_costs={} function Cost.SelfToGrave(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToGraveAsCost() end Duel.SendtoGrave(c,REASON_COST) end +self_tograve_costs[Cost.SelfToGrave]=true function Cost.SelfToHand(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToHandAsCost() end @@ -1561,6 +1563,7 @@ local function cost_table_check(t) return function(eff) return t[eff:GetCost()] end end +Effect.HasSelfToGraveCost=cost_table_check(self_tograve_costs) Effect.HasSelfDiscardCost=cost_table_check(self_discard_costs) Effect.HasDetachCost=cost_table_check(detach_costs) @@ -1625,6 +1628,7 @@ function Cost.AND(...) for _,fn in ipairs(fns) do if detach_costs[fn] then detach_costs[full_cost]=true end if self_discard_costs[fn] then self_discard_costs[full_cost]=true end + if self_tograve_costs[fn] then self_tograve_costs[full_cost]=true end end return full_cost end @@ -2729,4 +2733,4 @@ Duel.LoadScript("proc_gemini.lua") Duel.LoadScript("proc_spirit.lua") Duel.LoadScript("proc_unofficial.lua") Duel.LoadScript("deprecated_functions.lua") -pcall(dofile,"init.lua") +pcall(dofile,"init.lua") \ No newline at end of file From 8229018f488318bf7006b822c1b8bb9825180ee4 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 14:12:27 +0300 Subject: [PATCH 029/165] "Thunder Dragon Thunderstormech" updates --- official/c12081875.lua | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index c31afc7014..85544ab975 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -33,8 +33,7 @@ function s.runfn(fn,eff,tp,chk) end function s.applyfilter(c,e,tp) if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() - and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) - and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))) then return false end + and c:IsAbleToDeck() and c:IsFaceup()) then return false end for _,eff in ipairs({c:GetOwnEffects()}) do if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end @@ -43,7 +42,7 @@ 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|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() local effs={} local options={} for _,eff in ipairs({tc:GetOwnEffects()}) do @@ -56,49 +55,50 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) local targ_fn=te:GetTarget() if targ_fn then - e:SetLabel(0) - e:SetLabelObject(nil) s.runfn(targ_fn,e,tp,1) te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) Duel.ClearOperationInfo(0) end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - e:SetLabelObject({tc,te,tg and tg:Clone() or nil}) - Duel.SetTargetCard(tc) + e:SetLabelObject({tc,te}) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc,te,tg=table.unpack(e:GetLabelObject()) - if not tc:IsRelateToEffect(e) then return end + local tc,te=table.unpack(e:GetLabelObject()) + if not (tc:IsRelateToEffect(e) and te) then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) - if tg then Duel.ChangeTargetCard(ev,tg) end + local tg=Duel.GetTargetCards(e)-tc + if #tg>0 then Duel.ChangeTargetCard(ev,tg) end op(e,tp,eg,ep,ev,re,r,rp) end if tc:IsAbleToDeck() then - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + local opt=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) or 0 Duel.BreakEffect() Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end + e:SetLabel(0) + e:SetLabelObject(nil) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_THUNDER) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) + return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.repcostfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_GRAVE,0,3,nil) end + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,nil) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,s.repcfilter,tp,LOCATION_GRAVE,0,3,3,nil) + local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,3,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file From 1916a91d953e8d55cbcc7488818250e8645f7399 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 14:59:57 +0300 Subject: [PATCH 030/165] baby ruler cost should be "Cost.SelfDiscard" --- cards_specific_functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cards_specific_functions.lua b/cards_specific_functions.lua index 87f943428d..fe9950a261 100644 --- a/cards_specific_functions.lua +++ b/cards_specific_functions.lua @@ -1263,6 +1263,6 @@ do local function other_discard_filter(c) return (c:IsAttribute(attr) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() end - return Cost.AND(discard_with_other_cost(other_discard_filter),Cost.SelfDiscardToGrave) + return Cost.AND(discard_with_other_cost(other_discard_filter),Cost.SelfDiscard) end end From 8a7f3a7a11b53bee9e7d051fbee322f8a57b6659 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 15:22:53 +0300 Subject: [PATCH 031/165] DRulers smol updates --- official/c26400609.lua | 6 +++--- official/c4965193.lua | 11 +++++++---- official/c53804307.lua | 4 ++-- official/c89399912.lua | 5 +++-- official/c90411554.lua | 4 ++-- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/official/c26400609.lua b/official/c26400609.lua index 6b4966e1f8..d37cc9c166 100644 --- a/official/c26400609.lua +++ b/official/c26400609.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) c:RegisterEffect(e3) - --Add 1 FIRE Dragon monster from your Deck to your han + --Add 1 WATER Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -80,7 +80,7 @@ function s.rthop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - --Excluding itself for a correct interaction with "Chasmatis, Dragon Ruler of Poles" + --Excluding itself for a correct interaction with "Chasma, Dragon Ruler of Auroras" [04965193] if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end @@ -105,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c4965193.lua b/official/c4965193.lua index f175128800..407193bba3 100644 --- a/official/c4965193.lua +++ b/official/c4965193.lua @@ -57,7 +57,6 @@ function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) end local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] - e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) e:SetLabelObject(te) Duel.SendtoGrave(sc,REASON_COST) end @@ -65,8 +64,9 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local te=e:GetLabelObject() if chkc then return te and te:GetTarget() and te:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) end if chk==0 then return true end - e:SetLabel(0) - e:SetLabelObject(nil) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) local tg=te:GetTarget() if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) @@ -78,6 +78,7 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() + if not te then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) @@ -85,6 +86,8 @@ function s.applyop(e,tp,eg,ep,ev,re,r,rp) op(e,tp,eg,ep,ev,re,r,rp) end e:SetProperty(0) + e:SetLabel(0) + e:SetLabelObject(nil) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -105,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) 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/c53804307.lua b/official/c53804307.lua index b216c6506b..1ccf780970 100644 --- a/official/c53804307.lua +++ b/official/c53804307.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) - --Add 1 FIRE Dragon monster from your Deck to your han + --Add 1 FIRE Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -107,4 +107,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c89399912.lua b/official/c89399912.lua index 24a2174d53..dcbbe53d9a 100644 --- a/official/c89399912.lua +++ b/official/c89399912.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetTarget(s.dthtg) e3:SetOperation(s.dthop) c:RegisterEffect(e3) - --Add 1 WIND Dragon monster from your Deck to your han + --Add 1 WIND Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -83,6 +83,7 @@ function s.dthfilter(c) return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end function s.dthtg(e,tp,eg,ep,ev,re,r,rp,chk) + --Excluding itself for a correct interaction with "Chasma, Dragon Ruler of Auroras" [04965193] if chk==0 then return Duel.IsExistingMatchingCard(s.dthfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end @@ -108,4 +109,4 @@ function s.wdthop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c90411554.lua b/official/c90411554.lua index 02397030cf..c14362518a 100644 --- a/official/c90411554.lua +++ b/official/c90411554.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) - --Add 1 FIRE Dragon monster from your Deck to your han + --Add 1 EARTH Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -108,4 +108,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file From 4efb323987971b110423abf41da8c6e442644489 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 01:20:55 +0300 Subject: [PATCH 032/165] Updated "Numeron Network" to use "EFFECT_OVERLAY_REMOVE_REPLACE" --- official/c41418852.lua | 71 +++++++++++++++++++++++++----------------- utility.lua | 21 +++++-------- 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/official/c41418852.lua b/official/c41418852.lua index d32298c8ec..b4a0f3ec74 100644 --- a/official/c41418852.lua +++ b/official/c41418852.lua @@ -4,60 +4,75 @@ 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) + --This effect becomes the effect of 1 "Numeron" Normal Spell when that card is activated local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.applycost) + e1:SetTarget(s.applytg) + e1:SetOperation(s.applyop) c:RegisterEffect(e1) - --Copy spell + --"Numeron" Xyz Monsters you control can activate effects without detaching material(s) local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,id) - e2:SetCost(s.cpcost) - e2:SetTarget(s.cptg) - e2:SetOperation(s.cpop) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + return (r&REASON_COST)>0 and re:IsActivated() + and re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(SET_NUMERON) + and ep==e:GetOwnerPlayer() and ev>=1 and rc:GetOverlayCount()>=ev-1 + end) + e2:SetOperation(function() Duel.Hint(HINT_CARD,0,id) return true end) c:RegisterEffect(e2) - --Make detaching cost optional for "Numeron" Xyz Monsters - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(id) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(1,0) - c:RegisterEffect(e3) end s.listed_series={SET_NUMERON} -function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end -function s.filter(c) - return c:IsNormalSpell() and c:IsSetCard(SET_NUMERON) and c:IsAbleToGraveAsCost() +function s.applyfilter(c) + return c:IsSetCard(SET_NUMERON) and c:IsNormalSpell() and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,false)~=nil end -function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) + return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) - local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) - Duel.SendtoGrave(g,REASON_COST) + local sc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + local te,ceg,cep,cev,cre,cr,crp=sc:CheckActivateEffect(false,true,true) + Duel.SendtoGrave(sc,REASON_COST) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) e:SetProperty(te:GetProperty()) local tg=te:GetTarget() - if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end + if tg then + tg(e,tp,ceg,cep,cev,cre,cr,crp,1) + end + te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) e:SetLabelObject(te) Duel.ClearOperationInfo(0) end -function s.cpop(e,tp,eg,ep,ev,re,r,rp) +function s.applyop(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() if not te then return end + 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 + if op then + op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) + end + e:SetLabel(0) + e:SetLabelObject(nil) end \ No newline at end of file diff --git a/utility.lua b/utility.lua index 81405ad330..de2069cb7d 100644 --- a/utility.lua +++ b/utility.lua @@ -1521,10 +1521,11 @@ end local detach_costs={} function Cost.Detach(min,max,op) max=max or min + + local min_type=type(min) + local max_type=type(max) do --Perform some sanity checks, simplifies debugging - local min_type=type(min) - local max_type=type(max) local op_type=type(op) if min_type~="number" and min_type~="function" then error("Parameter 1 should be an Integer|function",2) @@ -1538,19 +1539,11 @@ function Cost.Detach(min,max,op) end local function cost_func(e,tp,eg,ep,ev,re,r,rp,chk) - if min_type=="function" then min=min(e,tp) end - if max_type=="function" then max=max(e,tp) end - local c=e:GetHandler() - local nn=c:IsSetCard(SET_NUMERON) and c:IsType(TYPE_XYZ) and Duel.IsPlayerAffectedByEffect(tp,CARD_NUMERON_NETWORK) - local crm=c:CheckRemoveOverlayCard(tp,min,REASON_COST) - if chk==0 then return (nn and c:IsLocation(LOCATION_MZONE)) or crm end - if nn and (not crm or Duel.SelectYesNo(tp,aux.Stringid(CARD_NUMERON_NETWORK,1))) then - --Do not execute `op`, hint at "Numeron Network" being applied - return Duel.Hint(HINT_CARD,tp,CARD_NUMERON_NETWORK) - end - - if c:RemoveOverlayCard(tp,min,max,REASON_COST)>0 and op then + local min_count=min_type=="function" and min(e,tp) or min + local max_count=max_type=="function" and max(e,tp) or max + if chk==0 then return min_count>0 and c:CheckRemoveOverlayCard(tp,min_count,REASON_COST) end + if c:RemoveOverlayCard(tp,min_count,max_count,REASON_COST)>0 and op then op(e,Duel.GetOperatedGroup()) end end From bced37520b1419f1ea00c8e9c0563f7ed65f899d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 01:28:28 +0300 Subject: [PATCH 033/165] Update some anime cards to use "Cost.Detach" --- official/c41418852.lua | 10 +- unofficial/c511001363.lua | 213 ++++++++++++++++++++------------------ unofficial/c511001429.lua | 15 ++- unofficial/c511001659.lua | 66 +++++------- unofficial/c511002001.lua | 51 ++++----- unofficial/c511002762.lua | 34 +++--- unofficial/c511002855.lua | 39 +++---- unofficial/c511002873.lua | 87 ++++++++-------- unofficial/c511003219.lua | 12 +-- unofficial/c511009340.lua | 21 ++-- unofficial/c511009480.lua | 28 ++--- unofficial/c511009567.lua | 14 +-- unofficial/c511600284.lua | 23 ++-- unofficial/c513000059.lua | 25 ++--- 14 files changed, 302 insertions(+), 336 deletions(-) diff --git a/official/c41418852.lua b/official/c41418852.lua index b4a0f3ec74..93d411afcf 100644 --- a/official/c41418852.lua +++ b/official/c41418852.lua @@ -24,11 +24,11 @@ function s.initial_effect(c) e2:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) e2:SetRange(LOCATION_FZONE) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return (r&REASON_COST)>0 and re:IsActivated() - and re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(SET_NUMERON) - and ep==e:GetOwnerPlayer() and ev>=1 and rc:GetOverlayCount()>=ev-1 - end) + local rc=re:GetHandler() + return (r&REASON_COST)>0 and re:IsActivated() + and re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(SET_NUMERON) + and ep==e:GetOwnerPlayer() and ev>=1 and rc:GetOverlayCount()>=ev-1 + end) e2:SetOperation(function() Duel.Hint(HINT_CARD,0,id) return true end) c:RegisterEffect(e2) end diff --git a/unofficial/c511001363.lua b/unofficial/c511001363.lua index 0842a5bbc1..57e7bc497c 100644 --- a/unofficial/c511001363.lua +++ b/unofficial/c511001363.lua @@ -1,123 +1,132 @@ ---CX 冀望皇バリアン (Anime) +--CX 冀望皇バリアン (Anime) --CXyz Barian Hope (Anime) --Rescripted by Larry126 local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,3,nil,nil,Xyz.InfiniteMats) c:EnableReviveLimit() + --Xyz Summon procedure: 3+ Level 7 monsters + Xyz.AddProcedure(c,nil,7,3,nil,nil,Xyz.InfiniteMats) + --For this card's Xyz Summon, you can treat all "Number C10X" Xyz Monsters on the field as Level 7 + local e0a=Effect.CreateEffect(c) + e0a:SetType(EFFECT_TYPE_FIELD) + e0a:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e0a:SetCode(EFFECT_XYZ_MATERIAL) + e0a:SetRange(0xff&~LOCATION_MZONE) + e0a:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e0a:SetTarget(s.xyztg) + e0a:SetValue(function(e,ec,rc,tp) return rc==e:GetHandler() end) + c:RegisterEffect(e0a) + local e0b=e0a:Clone() + e0b:SetCode(EFFECT_XYZ_LEVEL) + e0b:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) + c:RegisterEffect(e0b) + --This card's ATK is equal to the number of Xyz Materials attached to it x 1000 local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_XYZ_MATERIAL) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(0xff&~LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.xyztg) - e1:SetValue(function(e,ec,rc,tp) return rc==e:GetHandler() end) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,ec) return ec:GetOverlayCount()*1000 end) c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_XYZ_LEVEL) - e2:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) + --Activate the effect of 1 Xyz Monster attached to this card that activates by detaching its own Xyz Material(s) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(s.copycost) + e2:SetTarget(s.copytg) + e2:SetOperation(s.copyop) c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(function(e,ec) return ec:GetOverlayCount()*1000 end) - c:RegisterEffect(e3) - --copy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(id) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - c:RegisterEffect(e4) - aux.GlobalCheck(s,function() - --Copy - local ge1=Effect.GlobalEffect() - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ADJUST) - ge1:SetCondition(s.con) - ge1:SetOperation(s.op) - Duel.RegisterEffect(ge1,0) - end) end s.listed_series={SET_NUMBER_C} -function s.cfilter(c) - return c:IsHasEffect(511002571) and c:GetFlagEffect(5110013630)==0 -end -function s.con(e) - return Duel.IsExistingMatchingCard(s.cfilter,0,LOCATION_ALL,LOCATION_ALL,1,nil) +function s.xyztg(e,c) + local no=c.xyz_number + return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(SET_NUMBER_C) end -function s.op(e) - local g=Duel.GetMatchingGroup(s.cfilter,0,LOCATION_ALL,LOCATION_ALL,nil) - for c in aux.Next(g) do - local effs={c:GetCardEffect(511002571)} - for _,eff in ipairs(effs) do - local te=eff:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local resetflag,resetcount=te:GetReset() - local rm,max,code,flag,hopt=te:GetCountLimit() - local prop1,prop2=te:GetProperty() - local e1=Effect.CreateEffect(c) - if te:GetDescription() then - e1:SetDescription(te:GetDescription()) - end - e1:SetLabelObject(te) - e1:SetType(EFFECT_TYPE_XMATERIAL+te:GetType()&(~EFFECT_TYPE_SINGLE)) - if te:GetCode()>0 then - e1:SetCode(te:GetCode()) - end - e1:SetProperty(prop1|EFFECT_FLAG_CARD_TARGET,prop2) - e1:SetCondition(s.copycon(c)) - e1:SetCost(s.copycost(c)) - if max>0 then - e1:SetCountLimit(max,{code,hopt},flag) - end - if te:GetTarget() then - e1:SetTarget(te:GetTarget()) - end - if te:GetOperation() then - e1:SetOperation(te:GetOperation()) +function s.copyfilter(c,e,tp) + if not c:IsType(TYPE_XYZ) or c:HasFlagEffect(id) then return false end + local effs={c:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:HasDetachCost() then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (tg==nil or tg(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) then + return true end - if resetflag>0 and resetcount>0 then - e1:SetReset(resetflag,resetcount) - elseif resetflag>0 then - e1:SetReset(resetflag) - end - c:RegisterEffect(e1,true) - c:RegisterFlagEffect(5110013630,resetflag,prop1,resetcount) end end + return false end -function s.copycon(oc) - return function(e,tp,eg,ep,ev,re,r,rp) - local con=e:GetLabelObject():GetCondition() - return e:GetHandler():IsHasEffect(id) and Duel.IsTurnPlayer(tp) - and oc:GetFlagEffect(id)==0 and (not con or con(e,tp,eg,ep,ev,re,r,rp)) +function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local b1=c:CheckRemoveOverlayCard(tp,1,REASON_COST) + local b2=Duel.CheckLPCost(tp,400) + if chk==0 then return (b1 or b2) and c:GetOverlayGroup():IsExists(s.copyfilter,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) + local sc=c:GetOverlayGroup():FilterSelect(tp,s.copyfilter,1,1,nil,e,tp):GetFirst() + Duel.Hint(HINT_CARD,0,sc:GetOriginalCodeRule()) + sc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + local op=Duel.SelectEffect(tp,{b1,aux.Stringid(id,2)},{b2,aux.Stringid(id,3)}) + if op==1 then + Duel.SendtoGrave(sc,REASON_COST) + else + Duel.PayLPCost(tp,400) end + local available_effs={} + local effs={sc:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:HasDetachCost() then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (tg==nil or tg(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) then + table.insert(available_effs,eff) + end + end + end + e:SetLabelObject(available_effs) end -function s.copycost(oc) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local a=c:CheckRemoveOverlayCard(tp,1,REASON_COST) - local b=Duel.CheckLPCost(tp,400) - if chk==0 then return a or b end - Duel.Hint(HINT_CARD,0,oc:GetOriginalCode()) - Duel.SetTargetCard(oc) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local op=Duel.SelectEffect(tp,{a,aux.Stringid(id,1)},{b,aux.Stringid(id,2)}) - if op==1 then - Duel.SendtoGrave(oc,REASON_COST) - else - Duel.PayLPCost(tp,400) +function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local eff=e:GetLabelObject() + return eff and eff:GetTarget() and eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) + end + if chk==0 then return true end + local eff=nil + local available_effs=e:GetLabelObject() + if #available_effs>1 then + local available_effs_desc={} + for _,eff in ipairs(available_effs) do + table.insert(available_effs_desc,eff:GetDescription()) end - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + 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()) + e:SetLabel(eff:GetLabel()) + e:SetLabelObject(eff:GetLabelObject()) + e:SetProperty(eff:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + local tg=eff:GetTarget() + if tg then + tg(e,tp,eg,ep,ev,re,r,rp,1) + end + eff:SetLabel(e:GetLabel()) + eff:SetLabelObject(e:GetLabelObject()) + e:SetLabelObject(eff) + Duel.ClearOperationInfo(0) end -function s.xyztg(e,c) - local no=c.xyz_number - return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(SET_NUMBER_C) +function s.copyop(e,tp,eg,ep,ev,re,r,rp) + local eff=e:GetLabelObject() + if not eff 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 \ No newline at end of file diff --git a/unofficial/c511001429.lua b/unofficial/c511001429.lua index 4a0c62be17..d9c213d614 100644 --- a/unofficial/c511001429.lua +++ b/unofficial/c511001429.lua @@ -5,7 +5,7 @@ Duel.LoadCardScript("c67173574.lua") local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 4 Level 5 LIGHT monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,4) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,49678559) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tg) e2:SetOperation(s.op) - --indes + --Make this card unable to be destroyed by that battle or effect and inflict damage to your opponent equal to this card's ATK local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DAMAGE) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(s.indescost) + e3:SetCost(Cost.Detach(s.indescost)) e3:SetTarget(s.indestg) e3:SetOperation(s.indesop) local e4=e3:Clone() @@ -127,11 +127,8 @@ function s.indescon2(e,tp,eg,ep,ev,re,r,rp) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg and tg:IsContains(e:GetHandler()) end -function s.indescost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.indescost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.indestg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -158,4 +155,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,c:GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/unofficial/c511001659.lua b/unofficial/c511001659.lua index 8a90fc4844..1a4fa73788 100644 --- a/unofficial/c511001659.lua +++ b/unofficial/c511001659.lua @@ -3,18 +3,18 @@ Duel.LoadCardScript("c32559361.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,10,3) c:EnableReviveLimit() + --Xyz Summon: 3 Level 10 monsters + Xyz.AddProcedure(c,nil,10,3) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,1992816) - --battle indestructable + --Cannot be destroyed by battle except with "Number" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) c:RegisterEffect(e1) - --damage + --Inflict 500 damage to your opponent for each Xyz Material attached to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DAMAGE) @@ -25,32 +25,32 @@ function s.initial_effect(c) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) - --damage2 + --Inflict 800 damage to your opponent for each Xyz Material detached to activate this effect local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.damcost) + e3:SetCost(Cost.Detach(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) e3:SetTarget(s.damtg2) e3:SetOperation(s.damop2) c:RegisterEffect(e3) - --material + --Attach an opponent's monster this card battles to it as material local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_BATTLED) - e4:SetTarget(s.target) - e4:SetOperation(s.operation) - --atk limit + e4:SetTarget(s.attachtg) + e4:SetOperation(s.attachop) + --While this card has Xyz Material, your opponent cannot target monsters for attacks, except this one local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD) e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e5:SetRange(LOCATION_MZONE) e5:SetTargetRange(0,LOCATION_MZONE) - e5:SetCondition(s.atcon) - e5:SetValue(s.atlimit) + e5:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e5:SetValue(function(e,c) return c~=e:GetHandler() end) local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_RANKUP_EFFECT) @@ -61,24 +61,11 @@ function s.initial_effect(c) c:RegisterEffect(e7) end s.listed_series={SET_NUMBER} -s.listed_names={1992816} +s.listed_names={1992816} --"Number 9: Dyson Sphere" s.xyz_number=9 -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() - and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsOnField() end -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then - Duel.Overlay(c,tc,true) - end -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetOverlayCount()>0 end local ct=e:GetHandler():GetOverlayCount() + if chk==0 then return ct>0 end Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) end @@ -87,12 +74,8 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetHandler():GetOverlayCount() Duel.Damage(p,ct*500,REASON_EFFECT) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=e:GetHandler():GetOverlayGroup() - local ct=#g - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(ct) +function s.damcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -105,9 +88,16 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) end -function s.atcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function s.atlimit(e,c) - return c~=e:GetHandler() +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local tc=c:GetBattleTarget() + if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() + and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsOnField() end end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=c:GetBattleTarget() + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then + Duel.Overlay(c,tc,true) + end +end \ No newline at end of file diff --git a/unofficial/c511002001.lua b/unofficial/c511002001.lua index abd75423f7..fba675a47d 100644 --- a/unofficial/c511002001.lua +++ b/unofficial/c511002001.lua @@ -1,51 +1,52 @@ ---SNo.39 希望皇ホープONE +--SNo.39 希望皇ホープONE (Manga) +--Number S39: Utopia Prime (Manga) Duel.LoadCardScript("c86532744.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(86532744,1)) c:EnableReviveLimit() - --Banish + --Xyz Summon procedure: 3 Level 4 monsters OR 1 "Number 39: Utopia" you control + Xyz.AddProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(id,0)) + --Cannot be destroyed by battle except with "Number" monsters + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(function(e,c) return not c:IsSetCard(SET_NUMBER) end) + c:RegisterEffect(e2) + --Banish all monsters your opponent controls, and if you do, inflict damage to your opponent equal to the combined ATK of the banished monsters local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(95100063,0)) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCost(Cost.AND(Cost.Detach(s.detachcost),s.lpcost)) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(s.indes) - c:RegisterEffect(e2) end s.xyz_number=39 +s.listed_names={84013237} --"Number 39: Utopia" +s.listed_series={SET_NUMBER} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) + return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) and c:IsFaceup() +end +function s.detachcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetLP(tp)>1 end - Duel.SendtoGrave(c:GetOverlayGroup(),REASON_COST) +function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLP(tp)>1 end Duel.SetLP(tp,1) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,#sg,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.rmop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 then local sum=Duel.GetOperatedGroup():GetSum(Card.GetAttack) Duel.Damage(1-tp,sum,REASON_EFFECT) end -end -function s.indes(e,c) - return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511002762.lua b/unofficial/c511002762.lua index c8e21e8c96..eb0d36e6f2 100644 --- a/unofficial/c511002762.lua +++ b/unofficial/c511002762.lua @@ -1,40 +1,38 @@ --H-C エクスカリバー +--Heroic Champion - Excalibur (Anime) local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) c:EnableReviveLimit() - -- + --Xyz Summon procedure: 2 Level 4 Warrior monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) + --This card cannot declare an attack unless your LP are 500 or less local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetCondition(s.atkcon) + e1:SetCondition(function(e) return Duel.GetLP(e:GetHandlerPlayer())>500 end) c:RegisterEffect(e1) - --atkup + --Double this card's ATK until the end of the Battle Phase local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95486586,0)) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) - e2:SetCost(s.cost) - e2:SetOperation(s.op) + e2:SetCost(Cost.Detach(s.atkcost)) + e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=e:GetHandler():GetOverlayGroup() - Duel.SendtoGrave(g,REASON_COST) +function s.atkcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end -function s.op(e,tp,eg,ep,ev,re,r,rp) +function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card's ATK is doubled, until the end of the Battle Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end -function s.atkcon(e) - return Duel.GetLP(e:GetHandlerPlayer())>500 -end +end \ No newline at end of file diff --git a/unofficial/c511002855.lua b/unofficial/c511002855.lua index e7217c27c5..aadeadc7e0 100644 --- a/unofficial/c511002855.lua +++ b/unofficial/c511002855.lua @@ -2,30 +2,31 @@ --CXyz Coach Lord Ultimatrainer (Anime) local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,9,4) c:EnableReviveLimit() + --Xyz Summon procedure: 4 Level 9 monsters + Xyz.AddProcedure(c,nil,9,4) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,30741334) - --negate + --Make this card become unaffected by a monster effect local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.uncon) e1:SetOperation(s.unop) c:RegisterEffect(e1) - --draw + --Your opponent draws cards equal to the number of Xyz Materials detached local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE) - e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCondition(aux.bdocon) + e2:SetCost(Cost.Detach(1,s.cost,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) local e3=Effect.CreateEffect(c) @@ -34,7 +35,7 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_names={30741334} +s.listed_names={30741334} --"Coach King Giantrainer" function s.uncon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not re:IsActiveType(TYPE_MONSTER) then return false end @@ -86,26 +87,16 @@ function s.unop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetValue(function(e,te) return te:IsMonsterEffect() end) e2:SetReset(RESET_CHAIN) - e2:SetValue(s.efilter) c:RegisterEffect(e2) end end -function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST) - local ct=Duel.GetOperatedGroup():GetCount() - e:SetLabel(ct) +function s.cost(e,tp) + return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(e:GetLabel()) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel()) @@ -132,4 +123,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.BreakEffect() Duel.SendtoGrave(sg,REASON_EFFECT) Duel.ShuffleHand(1-tp) -end +end \ No newline at end of file diff --git a/unofficial/c511002873.lua b/unofficial/c511002873.lua index 4fbd672b55..89bc5b45f6 100644 --- a/unofficial/c511002873.lua +++ b/unofficial/c511002873.lua @@ -1,50 +1,50 @@ ---No.58 Burner visor +--No.58 炎圧鬼バーナー・バイサー (Anime) +--Number 58: Burner Visor (Anime) Duel.LoadCardScript("c93108839.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,2) c:EnableReviveLimit() - --equip + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Cannot be destroyed by battle except with "Number" monsters local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93108839,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.eqcost) - e1:SetTarget(s.eqtg) - e1:SetOperation(s.eqop) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(function(e,c) return not c:IsSetCard(SET_NUMBER) end) c:RegisterEffect(e1) - --direct + --Equip this card to 1 face-up monster you control local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.Detach(s.eqcost)) + e2:SetTarget(s.eqtg) + e2:SetOperation(s.eqop) c:RegisterEffect(e2) - --damage + --The equipped monster can attack directly local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93108839,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(s.damcon) - e3:SetCost(s.damcost) - e3:SetTarget(s.damtg) - e3:SetOperation(s.damop) + e3:SetType(EFFECT_TYPE_EQUIP) + e3:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e3) - --battle indestructable + --Inflict 500 damage to your opponent local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetValue(s.indes) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e4:SetRange(LOCATION_SZONE) + e4:SetCondition(s.damcon) + e4:SetCost(s.damcost) + e4:SetTarget(s.damtg) + e4:SetOperation(s.damop) c:RegisterEffect(e4) end s.xyz_number=58 -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=e:GetHandler():GetOverlayGroup() - Duel.SendtoGrave(g,REASON_COST) +s.listed_series={SET_NUMBER} +function s.eqcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end @@ -64,14 +64,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end if not Duel.Equip(tp,c,tc,false) then return end --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(s.eqlimit) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) - e4:SetLabelObject(tc) - c:RegisterEffect(e4) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetValue(s.eqlimit) + e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetLabelObject(tc) + c:RegisterEffect(e1) end function s.eqlimit(e,c) return c==e:GetLabelObject() @@ -93,7 +93,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end -function s.indes(e,c) - return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511003219.lua b/unofficial/c511003219.lua index a11dc2d5da..fa7d788190 100644 --- a/unofficial/c511003219.lua +++ b/unofficial/c511003219.lua @@ -3,9 +3,9 @@ --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,2) c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) --Change battle position/attack target local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_CONFIRM) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(s.cost)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -56,10 +56,8 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()~=c and Duel.GetAttackTarget() and Duel.GetAttackTarget()~=c end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.SendtoGrave(c:GetOverlayGroup(),REASON_COST) +function s.cost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end diff --git a/unofficial/c511009340.lua b/unofficial/c511009340.lua index 7e668424ce..505f69fcbe 100644 --- a/unofficial/c511009340.lua +++ b/unofficial/c511009340.lua @@ -4,8 +4,9 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) + --Xyz Summon procedure: 2 Level 7 Dragon monstes Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),7,2) - --pendulum set + --Place 1 Pendulum Monster from your Deck in your Pendulum Zone local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -14,26 +15,26 @@ function s.initial_effect(c) e1:SetTarget(s.pctg) e1:SetOperation(s.pcop) c:RegisterEffect(e1) - --material check + --Material check local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_MATERIAL_CHECK) e2:SetValue(s.valcheck) e2:SetLabelObject(e2) c:RegisterEffect(e2) - --extra att + --This card can make a second attack during each Battle Phase local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_EXTRA_ATTACK) e3:SetValue(1) - --destroy + --Negate the effects of all face-up Spells/Traps on the field, and if you do, destroy as many other cards on the field as possible, then this card gains 200 ATK for each card destroyed until the end of this turn local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.descost) + e4:SetCost(Cost.Detach(s.descost)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) local e5=Effect.CreateEffect(c) @@ -48,7 +49,7 @@ function s.initial_effect(c) local e6=e5:Clone() e6:SetLabelObject(e4) c:RegisterEffect(e6) - --To Pendulum + --Destroy as many cards in your Pendulum Zones as possible (min. 1), and if you do, place this card in your Pendulum Zone local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(id,2)) e7:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) @@ -75,10 +76,8 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetOverlayCount() - if chk==0 then return ct>0 and e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.descost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.negfilter(c) return c:IsSpellTrap() and c:IsFaceup() and not c:IsDisabled() @@ -150,4 +149,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index cdd8f2c453..fc3b116b58 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -1,36 +1,37 @@ --ギャラクシーアイズ FA・フォトン・ドラゴン (Manga) ---Galaxy Eyes Full Armor Photon Dragon (Manga) +--Galaxy-Eyes Full Armor Photon Dragon (Manga) Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) local s,id=GetID() function s.initial_effect(c) - Xyz.AddProcedure(c,nil,8,3) c:EnableReviveLimit() - --xyz summon + --Xyz Summon procedure: 3 Level 8 monsters + Xyz.AddProcedure(c,nil,8,3) + --You can also Xyz Summon this card by Tributing a "Galaxy-Eyes Photon Dragon" you control that is equipped with 2 Equip Spells and using those Equip Spells as the Xyz Materials local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_EXTRA) e1:SetCondition(s.xyzcon) e1:SetTarget(s.xyztg) e1:SetOperation(s.xyzop) e1:SetValue(SUMMON_TYPE_XYZ) c:RegisterEffect(e1) - --destroy + --Destroy 1 monster your opponent controls local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.descon) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) - --material + --Attach any number of equip cards equipped to this card as materials local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -41,7 +42,7 @@ function s.initial_effect(c) e3:SetTarget(s.mttg) e3:SetOperation(s.mtop) c:RegisterEffect(e3) - --banish + --Banish both that opponent's monster and this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_DISABLE) @@ -50,7 +51,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_CHAINING) e4:SetCondition(s.rmcon) - e4:SetCost(s.rmcost) + e4:SetCost(Cost.Detach(s.rmcost)) e4:SetTarget(s.rmtg) e4:SetOperation(s.rmop) c:RegisterEffect(e4) @@ -135,9 +136,8 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,e:GetHandler():GetOverlayGroup():GetCount(),e:GetHandler():GetOverlayGroup():GetCount(),REASON_COST) +function s.rmcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -192,4 +192,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index 234901353a..c3f6fefb92 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rtgtg) e1:SetOperation(s.rtgop) - c:RegisterEffect(e1) + c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) --Allow 1 "Raidraptor" monster to attack multiple times in a row local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(s.atkcost)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -48,12 +48,8 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ac and ac:IsRelateToBattle() and ac:IsSetCard(SET_RAIDRAPTOR) and ac:IsControler(tp) and ac:CanChainAttack(ac:GetAttackAnnouncedCount()+1,true) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - local g=c:GetOverlayGroup() - Duel.SendtoGrave(g,REASON_COST) +function s.atkcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.rmfilter(c) return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() @@ -106,4 +102,4 @@ function s.chainatkop(c,ac) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ac:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/unofficial/c511600284.lua b/unofficial/c511600284.lua index bee226a4fc..056478a9fb 100644 --- a/unofficial/c511600284.lua +++ b/unofficial/c511600284.lua @@ -4,12 +4,12 @@ Duel.LoadCardScript("c41309158.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,3) c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 4 monsters + Xyz.AddProcedure(c,nil,4,3) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,15914410) - --damage + --Inflict 500 damage to your opponent for each Xyz Material detached local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DAMAGE) @@ -17,8 +17,8 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.damcon) - e1:SetCost(s.damcost) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e1:SetCost(Cost.Detach(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) local e2=Effect.CreateEffect(c) @@ -28,15 +28,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={15914410} -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) - e:SetLabel(ct) +function s.damcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -48,4 +41,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index d3a38eff89..f8ad0392ab 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -4,18 +4,18 @@ Duel.LoadCardScript("c12744567.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,5,3) c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 5 monsters + Xyz.AddProcedure(c,nil,5,3) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,48739166) - --battle indestructable + --Cannot be destroyed by battle except with "Number" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) c:RegisterEffect(e1) - --spsummon + --Special Summon this card from your GY, and if you do, gain LP equal to its original ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - --material + --Attach 1 monster your opponent controls to this card as material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_IGNITION) @@ -34,14 +34,14 @@ function s.initial_effect(c) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) - --spsummon2 + --Special Summon 1 "Number 101: Silent Honor ARK" from your GY local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e4) - e4:SetCost(s.spcost) + e4:SetCost(Cost.Detach(s.spcost) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) local e5=Effect.CreateEffect(c) @@ -88,11 +88,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.spcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.spfilter(c,e,tp) return c:IsCode(48739166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -110,4 +107,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file From 26ac24f87206c48d88b9afdb0ed3d6803e53a560 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 01:42:09 +0300 Subject: [PATCH 034/165] Use "Card.GetOverlayCount" --- unofficial/c511001429.lua | 5 +---- unofficial/c511001659.lua | 2 +- unofficial/c511002001.lua | 5 +---- unofficial/c511002762.lua | 5 +---- unofficial/c511002855.lua | 5 +---- unofficial/c511002873.lua | 5 +---- unofficial/c511003219.lua | 5 +---- unofficial/c511009340.lua | 5 +---- unofficial/c511009480.lua | 5 +---- unofficial/c511009567.lua | 5 +---- unofficial/c511600284.lua | 2 +- unofficial/c513000059.lua | 5 +---- 12 files changed, 12 insertions(+), 42 deletions(-) diff --git a/unofficial/c511001429.lua b/unofficial/c511001429.lua index d9c213d614..1630f90506 100644 --- a/unofficial/c511001429.lua +++ b/unofficial/c511001429.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(Cost.Detach(s.indescost)) + e3:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e3:SetTarget(s.indestg) e3:SetOperation(s.indesop) local e4=e3:Clone() @@ -127,9 +127,6 @@ function s.indescon2(e,tp,eg,ep,ev,re,r,rp) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg and tg:IsContains(e:GetHandler()) end -function s.indescost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.indestg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local atk=e:GetHandler():GetAttack() diff --git a/unofficial/c511001659.lua b/unofficial/c511001659.lua index 1a4fa73788..8333e211ac 100644 --- a/unofficial/c511001659.lua +++ b/unofficial/c511001659.lua @@ -75,7 +75,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,ct*500,REASON_EFFECT) end function s.damcost(e,tp) - return #e:GetHandler():GetOverlayGroup() + return e:GetHandler():GetOverlayCount() end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/unofficial/c511002001.lua b/unofficial/c511002001.lua index fba675a47d..65013443ff 100644 --- a/unofficial/c511002001.lua +++ b/unofficial/c511002001.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(s.detachcost),s.lpcost)) + e1:SetCost(Cost.AND(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end),s.lpcost)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) @@ -30,9 +30,6 @@ s.listed_series={SET_NUMBER} function s.ovfilter(c,tp,lc) return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) and c:IsFaceup() end -function s.detachcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(tp)>1 end Duel.SetLP(tp,1) diff --git a/unofficial/c511002762.lua b/unofficial/c511002762.lua index eb0d36e6f2..3a4b734a55 100644 --- a/unofficial/c511002762.lua +++ b/unofficial/c511002762.lua @@ -17,13 +17,10 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) - e2:SetCost(Cost.Detach(s.atkcost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.atkcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002855.lua b/unofficial/c511002855.lua index aadeadc7e0..6379721e20 100644 --- a/unofficial/c511002855.lua +++ b/unofficial/c511002855.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(aux.bdocon) - e2:SetCost(Cost.Detach(1,s.cost,function(e,og) e:SetLabel(#og) end)) + e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) local e3=Effect.CreateEffect(c) @@ -92,9 +92,6 @@ function s.unop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -function s.cost(e,tp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end Duel.SetTargetPlayer(1-tp) diff --git a/unofficial/c511002873.lua b/unofficial/c511002873.lua index 89bc5b45f6..ff382f99ee 100644 --- a/unofficial/c511002873.lua +++ b/unofficial/c511002873.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(s.eqcost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) @@ -43,9 +43,6 @@ function s.initial_effect(c) end s.xyz_number=58 s.listed_series={SET_NUMBER} -function s.eqcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 diff --git a/unofficial/c511003219.lua b/unofficial/c511003219.lua index fa7d788190..3140a49299 100644 --- a/unofficial/c511003219.lua +++ b/unofficial/c511003219.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_CONFIRM) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(s.cost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -56,9 +56,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()~=c and Duel.GetAttackTarget() and Duel.GetAttackTarget()~=c end -function s.cost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end end diff --git a/unofficial/c511009340.lua b/unofficial/c511009340.lua index 505f69fcbe..4dc483a115 100644 --- a/unofficial/c511009340.lua +++ b/unofficial/c511009340.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(s.descost)) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) local e5=Effect.CreateEffect(c) @@ -76,9 +76,6 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end -function s.descost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.negfilter(c) return c:IsSpellTrap() and c:IsFaceup() and not c:IsDisabled() end diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index fc3b116b58..c46b36e363 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_CHAINING) e4:SetCondition(s.rmcon) - e4:SetCost(Cost.Detach(s.rmcost)) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.rmtg) e4:SetOperation(s.rmop) c:RegisterEffect(e4) @@ -136,9 +136,6 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp end -function s.rmcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end local c=e:GetHandler() diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index c3f6fefb92..4126724546 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) - e2:SetCost(Cost.Detach(s.atkcost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -48,9 +48,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ac and ac:IsRelateToBattle() and ac:IsSetCard(SET_RAIDRAPTOR) and ac:IsControler(tp) and ac:CanChainAttack(ac:GetAttackAnnouncedCount()+1,true) end -function s.atkcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.rmfilter(c) return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() end diff --git a/unofficial/c511600284.lua b/unofficial/c511600284.lua index 056478a9fb..a153e0037d 100644 --- a/unofficial/c511600284.lua +++ b/unofficial/c511600284.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) end s.listed_names={15914410} function s.damcost(e,tp) - return #e:GetHandler():GetOverlayGroup() + return e:GetHandler():GetOverlayCount() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index f8ad0392ab..6ace9e9797 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e4) - e4:SetCost(Cost.Detach(s.spcost) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) local e5=Effect.CreateEffect(c) @@ -88,9 +88,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end end -function s.spcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.spfilter(c,e,tp) return c:IsCode(48739166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end From 1e7502f678bdb71f336ebb12c4f571819ed87ad2 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sat, 5 Jul 2025 07:08:58 +0800 Subject: [PATCH 035/165] Update c511001363.lua --- unofficial/c511001363.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unofficial/c511001363.lua b/unofficial/c511001363.lua index 57e7bc497c..da0cd1cb7e 100644 --- a/unofficial/c511001363.lua +++ b/unofficial/c511001363.lua @@ -18,7 +18,10 @@ function s.initial_effect(c) c:RegisterEffect(e0a) local e0b=e0a:Clone() e0b:SetCode(EFFECT_XYZ_LEVEL) - e0b:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) + e0b:SetValue(function(e,mc,rc) + if rc==e:GetHandler() then return 7,mc:GetLevel() end + return mc:GetLevel() + end) c:RegisterEffect(e0b) --This card's ATK is equal to the number of Xyz Materials attached to it x 1000 local e1=Effect.CreateEffect(c) @@ -129,4 +132,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) end e:SetLabel(0) e:SetLabelObject(nil) -end \ No newline at end of file +end From 84412dd78262bc110f4e1a76e62c87eca04c5a33 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 15:42:48 +0300 Subject: [PATCH 036/165] Update c511009567.lua --- unofficial/c511009567.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index 4126724546..1eabcc82fb 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rtgtg) e1:SetOperation(s.rtgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Allow 1 "Raidraptor" monster to attack multiple times in a row local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -99,4 +99,4 @@ function s.chainatkop(c,ac) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ac:RegisterEffect(e1) -end \ No newline at end of file +end From f6f56e867a284707d679a1b2d2bd80c0eb5c4728 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 15:43:58 +0300 Subject: [PATCH 037/165] Update c511009480.lua --- unofficial/c511009480.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index c46b36e363..525253d9d5 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -98,11 +98,6 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp,c) function s.descon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler()) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end @@ -189,4 +184,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end end -end \ No newline at end of file +end From a18a68b201a68f532524cf60818c69f3876ed4bb Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sat, 5 Jul 2025 22:18:01 +0800 Subject: [PATCH 038/165] Update utility.lua --- utility.lua | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/utility.lua b/utility.lua index de2069cb7d..ae886320c1 100644 --- a/utility.lua +++ b/utility.lua @@ -1502,6 +1502,7 @@ function Cost.SelfDiscardToGrave(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() end Duel.SendtoGrave(c,REASON_DISCARD|REASON_COST) end +self_tograve_costs[Cost.SelfDiscardToGrave]=true self_discard_costs[Cost.SelfDiscardToGrave]=true --Aliases for historical reasons: @@ -1521,7 +1522,7 @@ end local detach_costs={} function Cost.Detach(min,max,op) max=max or min - + local min_type=type(min) local max_type=type(max) @@ -1542,7 +1543,7 @@ function Cost.Detach(min,max,op) local c=e:GetHandler() local min_count=min_type=="function" and min(e,tp) or min local max_count=max_type=="function" and max(e,tp) or max - if chk==0 then return min_count>0 and c:CheckRemoveOverlayCard(tp,min_count,REASON_COST) end + if chk==0 then return min_count>0 and max_count>=min_count and c:CheckRemoveOverlayCard(tp,min_count,REASON_COST) end if c:RemoveOverlayCard(tp,min_count,max_count,REASON_COST)>0 and op then op(e,Duel.GetOperatedGroup()) end @@ -1586,20 +1587,32 @@ function Cost.PayLP(lp_value,pay_until) end end -function Cost.SoftOncePerChain(flag) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:HasFlagEffect(flag) end - c:RegisterFlagEffect(flag,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) +local function use_limit_cost(reset,soft) + return function(flag,ct) + ct=ct or 1 + return function(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return (soft and c:GetFlagEffect(flag) or Duel.GetFlagEffect(tp,flag)) Date: Sat, 5 Jul 2025 22:21:03 +0800 Subject: [PATCH 039/165] update some official cards to use Cost.Detach --- official/c12632096.lua | 42 ++++++++++------------ official/c19369609.lua | 56 ++++++++--------------------- official/c31801517.lua | 77 ++++++++++++++++------------------------ official/c32559361.lua | 62 +++++++++++++++----------------- official/c3989465.lua | 35 +++++++----------- official/c6387204.lua | 80 +++++++++++++++++++----------------------- official/c78876707.lua | 24 ++++++------- official/c96592102.lua | 31 +++++----------- official/c96864105.lua | 47 ++++++++----------------- 9 files changed, 173 insertions(+), 281 deletions(-) diff --git a/official/c12632096.lua b/official/c12632096.lua index 0d5fd1594b..e761cc7160 100644 --- a/official/c12632096.lua +++ b/official/c12632096.lua @@ -3,49 +3,44 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure 3 Level 9 monsters Xyz.AddProcedure(c,nil,9,3) - --Take control of the opponent's monsters + --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card, also for each Material detached, take control of 1 opponent's face-up monster until the End Phase local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.ctcon) - e1:SetCost(s.ctcost) + e1:SetCountLimit(1) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_CIPHER) end) + e1:SetCost(Cost.Detach(1,s.ctcostmax,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) end s.listed_series={SET_CIPHER} s.listed_names={id} -function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_CIPHER) -end -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local rt=math.min(Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,nil),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL),c:GetOverlayCount(),3) - if chk==0 then return rt>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) +function s.ctcostmax(e,tp) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,nil) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL) + return math.min(ct,ft,3) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,e:GetLabel(),0,0) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - --Other monsters cannot attack directly + local fid=c:GetFieldID() + --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.atktg) - e1:SetLabel(c:GetFieldID()) + e1:SetTarget(function(e,c) return fid~=c:GetFieldID() end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - --Take control of the opponent's monsters + --For each Material detached, take control of 1 opponent's face-up monster until the End Phase local ct=math.min(e:GetLabel(),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,ct,ct,nil) @@ -53,8 +48,10 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local og=Duel.GetOperatedGroup() if #og==0 then return end for tc in og:Iter() do - ---Negate their effects - tc:NegateEffects(c,RESET_PHASE|PHASE_END) + if tc:IsNegatableMonster() then + ---Negate their effects + tc:NegateEffects(c,RESET_PHASE|PHASE_END) + end --Their ATK's become 4500 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -71,6 +68,3 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -function s.atktg(e,c) - return e:GetLabel()~=c:GetFieldID() -end diff --git a/official/c19369609.lua b/official/c19369609.lua index 7c8466d729..3e01242f60 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -4,27 +4,27 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2+ Level 1 monsters Xyz.AddProcedure(c,nil,1,2,nil,nil,Xyz.InfiniteMats) --Gains 500 ATK for each material attached to it local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(s.atkval) + e1:SetValue(function(e) return e:GetHandler():GetOverlayCount()*500 end) c:RegisterEffect(e1) - --Shuffle 1 Spell/Trap into the Deck + --Shuffle 1 Spell/Trap your opponent controls into the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TODECK) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) - --ATK gain on battle + --Make 1 monster you control gain 300 ATK for each material detached local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_ATKCHANGE) @@ -32,24 +32,16 @@ function s.initial_effect(c) e3:SetCode(EVENT_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.Detach(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end ---ATK gain -function s.atkval(e,c) - return e:GetHandler():GetOverlayCount()*500 -end ---To Deck -function s.filter(c) - return c:IsSpellTrap() and c:IsAbleToDeck() -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.filter(chkc) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end + if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tc=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,1-tp,tc:GetFirst():GetLocation()) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -57,31 +49,13 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end ---ATK gain on battle function s.atkcon(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetAttacker() - if Duel.GetAttackTarget() and Duel.GetAttackTarget():IsControler(tp) then - tc=Duel.GetAttackTarget() - end - return not e:GetHandler():IsRelateToBattle() and tc:IsFaceup() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ct=c:RemoveOverlayCard(tp,1,c:GetOverlayCount(),REASON_COST) - e:SetLabel(ct) + local bc=Duel.GetBattleMonster(tp) + return bc and bc:IsFaceup() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - if Duel.GetAttacker():IsControler(tp) then - tc=Duel.GetAttacker() - end - if tc and tc:IsFaceup() and tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()*300) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) + local bc=Duel.GetBattleMonster(tp) + if bc and bc:IsFaceup() and bc:IsRelateToBattle() then + bc:UpdateAttack(e:GetLabel()*300,RESET_PHASE|PHASE_END,e:GetHandler()) end end diff --git a/official/c31801517.lua b/official/c31801517.lua index 4cc606a16d..ae4e8a2eb7 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -1,11 +1,11 @@ ---No.62 銀河眼の光子竜皇 +--No.62 銀河眼の光子竜皇 --Number 62: Galaxy-Eyes Prime Photon Dragon local s,id=GetID() function s.initial_effect(c) - --Xyz summon - Xyz.AddProcedure(c,nil,8,2) c:EnableReviveLimit() - --Increase ATK + --Xyz Summon procedure: 2 Level 8 monsters + Xyz.AddProcedure(c,nil,8,2) + --This card gains ATK equal to the combined Ranks of all Xyz Monsters currently on the field x 200 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -13,10 +13,10 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - --Special summon + --Special Summon this card during your 2nd Standby Phase after activation and double its ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -25,11 +25,11 @@ function s.initial_effect(c) e2:SetCondition(s.spcon) e2:SetOperation(s.spop) c:RegisterEffect(e2) - --Halve damage + --Any battle damage this card inflicts to your opponent is halved unless it has "Galaxy-Eyes Photon Dragon" as material local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetCondition(s.rdcon) + e3:SetCondition(function(e) return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) end) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) c:RegisterEffect(e3) end @@ -39,58 +39,44 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local val=g:GetSum(Card.GetRank)*200 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(val) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) - c:RegisterEffect(e1) + local rks=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetSum(Card.GetRank) + if rks>0 then + c:UpdateAttack(rks*200,RESET_PHASE|PHASE_DAMAGE_CAL) + end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousControler(tp) and rp~=tp and c:IsReason(REASON_EFFECT) + return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED|LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - if Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp) then - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,3) - else - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) + if c:IsRelateToEffect(e) then + local reset_count=(Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp)) and 3 or 2 + --Special Summon this card during your 2nd Standby Phase after activation + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetRange(LOCATION_REMOVED|LOCATION_GRAVE) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,reset_count) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetOperation(s.standbyspop) + c:RegisterEffect(e1) + c:SetTurnCounter(0) end - e1:SetCountLimit(1) - e1:SetCondition(s.spcon2) - e1:SetOperation(s.spop2) - c:RegisterEffect(e1) - c:SetTurnCounter(0) -end -function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) end -function s.spop2(e,tp,eg,ep,ev,re,r,rp) +function s.standbyspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 + local ct=c:GetTurnCounter()+1 c:SetTurnCounter(ct) - if ct==2 then - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) + if ct==2 and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then + --Double its ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) @@ -101,6 +87,3 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -function s.rdcon(e) - return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) -end diff --git a/official/c32559361.lua b/official/c32559361.lua index d34229844b..4c0f83dc53 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -1,84 +1,80 @@ ---CNo.9 天蓋妖星カオス・ダイソン・スフィア +--CNo.9 天蓋妖星カオス・ダイソン・スフィア --Number C9: Chaos Dyson Sphere local s,id=GetID() function s.initial_effect(c) - --Xyz Summon - Xyz.AddProcedure(c,nil,10,3) c:EnableReviveLimit() - --Attach battled monster as material + --Xyz Summon procedure: 3 Level 10 monsters + Xyz.AddProcedure(c,nil,10,3) + --Attach battled monster to this card as an Xyz material local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetTarget(s.attachtg) + e1:SetOperation(s.attachop) c:RegisterEffect(e1) - --Burn 300 for each material + --Inflict 300 damage to your opponent for each Xyz Material attached to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) + e2:SetTarget(s.dam300tg) + e2:SetOperation(s.dam300op) c:RegisterEffect(e2) - --Burn 800 for each detached material + --Inflict 800 damage to your opponent for each detached material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCondition(s.damcon) - e3:SetCost(Cost.Detach(1,s.mxmc,s.slwc)) - e3:SetTarget(s.damtg2) - e3:SetOperation(s.damop2) + e3:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,1992816) end) + e3:SetCost(Cost.Detach(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) + e3:SetTarget(s.dam800tg) + e3:SetOperation(s.dam800op) c:RegisterEffect(e3) end s.xyz_number=9 s.listed_names={1992816} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetBattleTarget() +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=e:GetHandler():GetBattleTarget() if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() end end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=c:GetBattleTarget() if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.damtg(amt,ct) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=e:GetHandler():GetOverlayCount() + if chk==0 then return ct>0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) + end +end +function s.dam300tg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=e:GetHandler():GetOverlayCount() if chk==0 then return ct>0 end Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) end -function s.damop(e,tp,eg,ep,ev,re,r,rp) +function s.dam300op(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetHandler():GetOverlayCount() Duel.Damage(p,ct*300,REASON_EFFECT) end -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,1992816) -end -function s.mxmc(e,tp) - return e:GetHandler():GetOverlayCount() -end -function s.slwc(e,og) - e:SetLabel(#og) -end -function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) +function s.dam800tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local ct=e:GetLabel() Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*800) end -function s.damop2(e,tp,eg,ep,ev,re,r,rp) +function s.dam800op(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) diff --git a/official/c3989465.lua b/official/c3989465.lua index 2290f048ca..d4cc512cc7 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -2,42 +2,31 @@ --Lavalval Ignis local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,2) c:EnableReviveLimit() - --attack up + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) + --Make this card gain 500 ATK local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetOperation(s.operation) + e1:SetCondition(s.atkcon) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) + e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return ph==PHASE_DAMAGE and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) - and not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) + local a,b=Duel.GetBattleMonster(tp) + return (c==a or c==b) and Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) + c:UpdateAttack(500,RESET_PHASE|PHASE_END) end end diff --git a/official/c6387204.lua b/official/c6387204.lua index e74f1611fd..b74a168af6 100644 --- a/official/c6387204.lua +++ b/official/c6387204.lua @@ -1,11 +1,11 @@ ---CNo.6 先史遺産カオス・アトランタル +--CNo.6 先史遺産カオス・アトランタル --Number C6: Chronomaly Chaos Atlandis local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,3) c:EnableReviveLimit() - --equip + --Xyz Summon procedure: 3 Level 7 monsters + Xyz.AddProcedure(c,nil,7,3) + --Equip 1 monster your opponent controls to this card as an Equip Spell Card whose effect makes this monster gain 1000 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) @@ -17,19 +17,33 @@ function s.initial_effect(c) e1:SetOperation(s.eqop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,function(ec,_,tp) return ec:IsControler(1-tp) end,s.equipop,e1) - --lp + --Make your opponent's Life Points 100 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.lpcon) - e2:SetCost(s.lpcost) + e2:SetCondition(function(e,tp) return Duel.GetLP(1-tp)~=100 and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,9161357) end) + e2:SetCost(Cost.AND(Cost.Detach(3),s.lpcost)) e2:SetOperation(s.lpop) c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=6 s.listed_names={9161357} +function s.nodamage(e,tp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --Your opponent takes no further damage this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CHANGE_DAMAGE) + e1:SetTargetRange(0,1) + e1:SetValue(0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end function s.eqtg(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:IsAbleToChangeControler() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -40,53 +54,31 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.equipop(c,e,tp,tc) if not c:EquipByEffectAndLimitRegister(e,tp,tc,id) then return end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - e2:SetValue(1000) - tc:RegisterEffect(e2) + --Equipped monster gains 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + e1:SetValue(1000) + tc:RegisterEffect(e1) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then s.equipop(c,e,tp,tc) end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CHANGE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - e3:SetValue(0) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) - local e4=e3:Clone() - e4:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e4:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e4,tp) -end -function s.lpcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(1-tp)~=100 and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,9161357) + s.nodamage(e,tp) end -function s.filter(c) - return c:GetFlagEffect(id)~=0 and c:IsSetCard(SET_NUMBER) and c:IsFaceup() and c:IsAbleToGraveAsCost() +function s.lpcostfilter(c) + return c:HasFlagEffect(id) and c:IsSetCard(SET_NUMBER) and c:IsFaceup() and c:IsAbleToGraveAsCost() end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) - and e:GetHandler():GetEquipGroup():IsExists(s.filter,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) - local g=e:GetHandler():GetEquipGroup():Filter(s.filter,nil) - Duel.SendtoGrave(g,REASON_COST) + local eqg=e:GetHandler():GetEquipGroup():Filter(s.lpcostfilter,nil) + if chk==0 then return #eqg>0 end + Duel.SendtoGrave(eqg,REASON_COST) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,100) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) + s.nodamage(e,tp) end diff --git a/official/c78876707.lua b/official/c78876707.lua index e738d05fbf..60df72c151 100644 --- a/official/c78876707.lua +++ b/official/c78876707.lua @@ -4,9 +4,9 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2+ Level 4 "Noble Knight" monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_NOBLE_KNIGHT),4,2,nil,nil,Xyz.InfiniteMats) - --Return cards to the hand + --Return cards your opponent controls to the hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1,s.thcostmax,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Special Summon 1 "Noble Knight" Xyz Monster from your Extra Deck + --Special Summon 1 "Noble Knight" Xyz Monster from your Extra Deck, except "Sacred Noble Knight of King Custennin" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_GRAVE) @@ -34,15 +34,10 @@ end s.listed_series={SET_NOBLE_KNIGHT} s.listed_names={id} function s.thfilter(c,e) - return c:IsAbleToHand() and (not e or c:IsCanBeEffectTarget(e)) + return c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.thfilter,tp,0,LOCATION_ONFIELD,nil,e) - if chk==0 then return #g>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local rt=math.min(#g,c:GetOverlayCount()) - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) +function s.thcostmax(e,tp) + return Duel.GetMatchingGroupCount(s.thfilter,tp,0,LOCATION_ONFIELD,nil,e) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -63,7 +58,8 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsType(TYPE_XYZ) + and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c96592102.lua b/official/c96592102.lua index 3556ab5950..badfa2704b 100644 --- a/official/c96592102.lua +++ b/official/c96592102.lua @@ -1,18 +1,18 @@ ---RR-ブレード・バーナー・ファルコン +--RR-ブレード・バーナー・ファルコン --Raidraptor - Blade Burner Falcon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2 Level 4 Winged Beast monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WINGEDBEAST),4,2) --Make this card gain 3000 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCondition(s.atkcon) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e,tp) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 end) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Destroy monsters your opponent controls @@ -22,35 +22,20 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCondition(aux.bdocon) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 and e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(3000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) + c:UpdateAttack(3000) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local rt=math.min(Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil),c:GetOverlayCount()) - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return true end + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c96864105.lua b/official/c96864105.lua index f3240611a8..b33b66dbbc 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -1,11 +1,11 @@ ---CNo.73 激瀧瀑神アビス・スープラ +--CNo.73 激瀧瀑神アビス・スープラ --Number C73: Abyss Supra Splash local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,6,3) c:EnableReviveLimit() - --atk up + --Xyz Summon procedure: 3 Level 6 monsters + Xyz.AddProcedure(c,nil,6,3) + --Your battling monster gains ATK equal to the ATK of the opponent's monster it is battling, during that damage calculation only local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -13,45 +13,28 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - --indes + --This card cannot be destroyed by card effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetCondition(s.indcon) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) end) e2:SetValue(1) c:RegisterEffect(e2) end s.xyz_number=73 -s.listed_names={36076683} +s.listed_names={36076683} --"Number C73: Abyss Supra Splash" function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and a:GetControler()~=d:GetControler() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) + local a,b=Duel.GetBattleMonster(tp) + return a and b and a:GetControler()~=b:GetControler() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsRelateToBattle() or a:IsFacedown() or not d:IsRelateToBattle() or d:IsFacedown() then return end - if a:IsControler(1-tp) then a,d=d,a end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) - e1:SetValue(d:GetAttack()) - a:RegisterEffect(e1) -end -function s.indcon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) + local a,b=Duel.GetBattleMonster(tp) + if a:IsRelateToBattle() and a:IsFaceup() and b:IsRelateToBattle() and b:IsFaceup() then + a:UpdateAttack(b:GetAttack(),RESET_PHASE|PHASE_DAMAGE_CAL,e:GetHandler()) + end end From 1ebdf5b18b6d7664056cbab1f9f5e2afc37e81d1 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 13:42:14 +0300 Subject: [PATCH 040/165] updates/fixes --- official/c12632096.lua | 48 ++++++++++++++++++++---------------------- official/c19369609.lua | 15 +++++++------ official/c31801517.lua | 38 +++++++++++++++++---------------- official/c32559361.lua | 31 ++++++++++++--------------- official/c3989465.lua | 15 ++++++------- official/c96592102.lua | 12 ++++++----- official/c96864105.lua | 15 +++++++------ 7 files changed, 86 insertions(+), 88 deletions(-) diff --git a/official/c12632096.lua b/official/c12632096.lua index e761cc7160..59e9253d0c 100644 --- a/official/c12632096.lua +++ b/official/c12632096.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure 3 Level 9 monsters + --Xyz Summon procedure: 3 Level 9 monsters Xyz.AddProcedure(c,nil,9,3) --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card, also for each Material detached, take control of 1 opponent's face-up monster until the End Phase local e1=Effect.CreateEffect(c) @@ -27,11 +27,11 @@ function s.ctcostmax(e,tp) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,e:GetLabel(),0,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,e:GetLabel(),tp,0) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local fid=c:GetFieldID() + local fid=c:IsRelateToEffect(e) and c:GetFieldID() or -1 --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -44,27 +44,25 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local ct=math.min(e:GetLabel(),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,ct,ct,nil) - Duel.GetControl(g,tp,PHASE_END,1) - local og=Duel.GetOperatedGroup() - if #og==0 then return end - for tc in og:Iter() do - if tc:IsNegatableMonster() then - ---Negate their effects - tc:NegateEffects(c,RESET_PHASE|PHASE_END) + if #g==ct and Duel.GetControl(g,tp,PHASE_END,1) then + local og=Duel.GetOperatedGroup() + if #og==0 then return end + for tc in og:Iter() do + ---Their effects are negated + tc:NegateEffects(c,RESET_CONTROL) + --Their ATK's become 4500 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(4500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CONTROL) + tc:RegisterEffect(e1) + --Their names become "Neo Galaxy-Eyes Cipher Dragon" + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_CODE) + e2:SetValue(id) + tc:RegisterEffect(e2) end - --Their ATK's become 4500 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(4500) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - --Their names become "Neo Galaxy-Eyes Cipher Dragon" - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetValue(id) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c19369609.lua b/official/c19369609.lua index 3e01242f60..52bad000e2 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -37,11 +37,11 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return s.filter(chkc) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() and chkc:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -49,13 +49,14 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp,chk) +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - return bc and bc:IsFaceup() + return bc and bc:IsFaceup() end bc~=e:GetHandler() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - if bc and bc:IsFaceup() and bc:IsRelateToBattle() then - bc:UpdateAttack(e:GetLabel()*300,RESET_PHASE|PHASE_END,e:GetHandler()) + if bc and bc:IsFaceup() and bc:IsControler(tp) and bc:IsRelateToBattle() then + --That monster you control gains 300 ATK for each material detached, until the end of this turn + bc:UpdateAttack(e:GetLabel()*300,RESETS_STANDARD_PHASE_END,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c31801517.lua b/official/c31801517.lua index ae4e8a2eb7..662f9d989f 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -12,17 +12,19 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.atkcon) + e1:SetCondition(function(e) return e:GetHandler():IsRelateToBattle() end) e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Special Summon this card during your 2nd Standby Phase after activation and double its ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) --Any battle damage this card inflicts to your opponent is halved unless it has "Galaxy-Eyes Photon Dragon" as material @@ -33,42 +35,43 @@ function s.initial_effect(c) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) c:RegisterEffect(e3) end -s.listed_names={CARD_GALAXYEYES_P_DRAGON} s.xyz_number=62 -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() -end +s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then local rks=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetSum(Card.GetRank) if rks>0 then - c:UpdateAttack(rks*200,RESET_PHASE|PHASE_DAMAGE_CAL) + --This card gains ATK equal to the combined Ranks of all Xyz Monsters currently on the field x 200, during that damage calculation only + c:UpdateAttack(rks*200,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then + c:SetTurnCounter(0) + local turn_count=Duel.GetTurnCount() local reset_count=(Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp)) and 3 or 2 --Special Summon this card during your 2nd Standby Phase after activation local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED|LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,reset_count) + e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetRange(c:GetLocation()) e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and (reset_count==2 or Duel.GetTurnCount()~=turn_count) end) e1:SetOperation(s.standbyspop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,reset_count) c:RegisterEffect(e1) - c:SetTurnCounter(0) end end function s.standbyspop(e,tp,eg,ep,ev,re,r,rp) @@ -79,11 +82,10 @@ function s.standbyspop(e,tp,eg,ep,ev,re,r,rp) --Double its ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(c:GetAttack()*2) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c32559361.lua b/official/c32559361.lua index 4c0f83dc53..8720d9921b 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -5,7 +5,7 @@ function s.initial_effect(c) c:EnableReviveLimit() --Xyz Summon procedure: 3 Level 10 monsters Xyz.AddProcedure(c,nil,10,3) - --Attach battled monster to this card as an Xyz material + --Attach an opponent's monster this card battles to this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.attachtg) e1:SetOperation(s.attachop) c:RegisterEffect(e1) - --Inflict 300 damage to your opponent for each Xyz Material attached to this card + --Inflict 300 damage to your opponent for each material attached to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DAMAGE) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetTarget(s.dam300tg) e2:SetOperation(s.dam300op) c:RegisterEffect(e2) - --Inflict 800 damage to your opponent for each detached material + --Inflict 800 damage to your opponent for each material detached local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DAMAGE) @@ -37,24 +37,19 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=9 -s.listed_names={1992816} +s.listed_names={1992816} --"Number 9: Dyson Sphere" function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() end + if chk==0 then + local c=e:GetHandler() + local bc=c:GetBattleTarget() + return bc and bc:IsControler(1-tp) and bc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) + end end function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local tc=c:GetBattleTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then - Duel.Overlay(c,tc,true) - end -end -function s.damtg(amt,ct) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetOverlayCount() - if chk==0 then return ct>0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) + local bc=c:GetBattleTarget() + if c:IsRelateToEffect(e) and bc:IsRelateToBattle() and not bc:IsImmuneToEffect(e) then + Duel.Overlay(c,bc,true) end end function s.dam300tg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -78,4 +73,4 @@ function s.dam800op(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3989465.lua b/official/c3989465.lua index d4cc512cc7..0bd73915c1 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -5,28 +5,27 @@ function s.initial_effect(c) c:EnableReviveLimit() --Xyz Summon procedure: 2 Level 3 monsters Xyz.AddProcedure(c,nil,3,2) - --Make this card gain 500 ATK + --Make this card gain 500 ATK until the end of this turn 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_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) + e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.atkcon) e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a,b=Duel.GetBattleMonster(tp) - return (c==a or c==b) and Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() + return e:GetHandler():IsRelateToBattle() and Duel.IsPhase(PHASE_DAMAGE) and aux.StatChangeDamageStepCondition() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:UpdateAttack(500,RESET_PHASE|PHASE_END) + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 500 ATK until the end of this turn + c:UpdateAttack(500,RESETS_STANDARD_DISABLE_PHASE_END) end -end +end \ No newline at end of file diff --git a/official/c96592102.lua b/official/c96592102.lua index badfa2704b..cbdfe97a0e 100644 --- a/official/c96592102.lua +++ b/official/c96592102.lua @@ -12,7 +12,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e,tp) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 end) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(1-tp)>=Duel.GetLP(tp)+3000 end end) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Destroy monsters your opponent controls @@ -30,20 +31,21 @@ end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 3000 ATK c:UpdateAttack(3000) end end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,ct,ct,nil) - if #g>0 then - Duel.HintSelection(g,true) + if #g==ct then + Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96864105.lua b/official/c96864105.lua index b33b66dbbc..6a2669fafb 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -27,14 +27,15 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=73 -s.listed_names={36076683} --"Number C73: Abyss Supra Splash" +s.listed_names={36076683} --"Number 73: Abyss Splash" function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a,b=Duel.GetBattleMonster(tp) - return a and b and a:GetControler()~=b:GetControler() + local bc1,bc2=Duel.GetBattleMonster(tp) + return bc1 and bc2 and bc2:GetAttack()>0 end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local a,b=Duel.GetBattleMonster(tp) - if a:IsRelateToBattle() and a:IsFaceup() and b:IsRelateToBattle() and b:IsFaceup() then - a:UpdateAttack(b:GetAttack(),RESET_PHASE|PHASE_DAMAGE_CAL,e:GetHandler()) + local bc1,bc2=Duel.GetBattleMonster(tp) + if bc1:IsRelateToBattle() and bc1:IsFaceup() and bc2:IsRelateToBattle() and bc2:IsFaceup() then + --Your battling monster gains ATK equal to the ATK of the opponent's monster it is battling, during that damage calculation only + bc1:UpdateAttack(bc2:GetAttack(),RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,e:GetHandler()) end -end +end \ No newline at end of file From 3c09f21ee4799867fd6cc85065e5b0ed9840e84d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 13:59:25 +0300 Subject: [PATCH 041/165] Update utility.lua --- utility.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utility.lua b/utility.lua index ae886320c1..73fe442769 100644 --- a/utility.lua +++ b/utility.lua @@ -1592,7 +1592,7 @@ local function use_limit_cost(reset,soft) ct=ct or 1 return function(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return (soft and c:GetFlagEffect(flag) or Duel.GetFlagEffect(tp,flag)) Date: Sun, 6 Jul 2025 23:18:16 +0800 Subject: [PATCH 042/165] update "Primathmech Laplacian" --- official/c88021907.lua | 157 +++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 99 deletions(-) diff --git a/official/c88021907.lua b/official/c88021907.lua index b75c7966e6..6d29bdb2ac 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -4,9 +4,9 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 3 Level 4 monsters Xyz.AddProcedure(c,nil,4,3) - --Send cards to the GY + --Resolve effect(s) based on the number of detached materials local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) @@ -14,128 +14,87 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(s.con) - e1:SetCost(s.cost) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetCost(Cost.Detach(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) - --Destruction replacement for "Mathmech" cards + --If a "Mathmech" card(s) you control would be destroyed by card effect, you can detach 1 material from this card instead local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_MZONE) e2:SetTarget(s.reptg) - e2:SetValue(s.repval) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) c:RegisterEffect(e2) end s.listed_series={SET_MATHMECH} -function s.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsXyzSummoned() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() +function s.effcostmax(e,tp) local ct=0 - if s.handtg(e,tp,eg,ep,ev,re,r,rp,0) then ct=ct+1 end - if s.montg(e,tp,eg,ep,ev,re,r,rp,0) then ct=ct+1 end - if s.sttg(e,tp,eg,ep,ev,re,r,rp,0) then ct=ct+1 end - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ft=c:RemoveOverlayCard(tp,1,ct,REASON_COST) - e:SetLabel(ft) + if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 then ct=ct+1 end + if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) then ct=ct+1 end + if Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) then ct=ct+1 end + return ct end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) - local hand=s.handtg(e,tp,eg,ep,ev,re,r,rp,0) - local mon=s.montg(e,tp,eg,ep,ev,re,r,rp,0) - local st=s.sttg(e,tp,eg,ep,ev,re,r,rp,0) - if chk==0 then return hand or mon or st end - local ct=0 - if hand then ct=ct+1 end - if mon then ct=ct+1 end - if st then ct=ct+1 end - local ft=e:GetLabel() - if ft0 do - local stable={} - local dtable={} - if hand and (sel&0x1==0) then - table.insert(stable,0x1) - table.insert(dtable,aux.Stringid(id,1)) - end - if mon and (sel&0x2==0) then - table.insert(stable,0x2) - table.insert(dtable,aux.Stringid(id,2)) - end - if st and (sel&0x4==0) then - table.insert(stable,0x4) - table.insert(dtable,aux.Stringid(id,3)) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(dtable))+1 - sel=sel+stable[op] - ct=ct-1 +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local ct=e:GetLabel() + if ct==0 then return end + local b1=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 + local b2=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) + local b3=Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) + local options={ + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)} + } + local selection={} + for i=1,ct do + local op=Duel.SelectEffect(tp,table.unpack(options)) + options[op][1]=false + selection[op]=true + local loc=op==1 and LOCATION_HAND or (op==2 and LOCATION_MZONE or LOCATION_SZONE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,loc) end - e:SetLabel(sel) + e:SetLabelObject(selection) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if (sel&0x1==0x1) then - s.handop(e,tp,eg,ep,ev,re,r,rp) - end - if (sel&0x2==0x2) then - s.monop(e,tp,eg,ep,ev,re,r,rp) - end - if (sel&0x4==0x4) then - s.stop(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local selection=e:GetLabelObject() + if selection[1] then + --Send 1 random card from your opponent's hand to the GY + local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) + if #g>0 then + local sg=g:RandomSelect(1-tp,1) + Duel.SendtoGrave(sg,REASON_EFFECT) + end end -end -function s.handtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) -end -function s.handop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if #g==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end -function s.montg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0) -end -function s.monop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) + if selection[2] then + --Send 1 monster your opponent controls to the GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end end -end -function s.stfilter(c) - return c:IsSpellTrap() and c:IsAbleToGrave() -end -function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,0,LOCATION_SZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0) -end -function s.stop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.stftiler,tp,0,LOCATION_SZONE,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) + if selection[3] then + --Send 1 Spell/Trap your opponent controls to the GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_SZONE,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(SET_MATHMECH) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) + return c:IsFaceup() and c:IsSetCard(SET_MATHMECH) + and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local g=c:GetLinkedGroup() if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end if Duel.SelectEffectYesNo(tp,c,96) then c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end end -function s.repval(e,c) - return s.repfilter(c,e:GetHandlerPlayer()) -end From 63184ecde6d043a1051a4ce6c6f44291ae9a0dcc Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 6 Jul 2025 23:58:21 +0800 Subject: [PATCH 043/165] add Cost.Choice --- utility.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/utility.lua b/utility.lua index 73fe442769..9676a5c4d6 100644 --- a/utility.lua +++ b/utility.lua @@ -1639,6 +1639,37 @@ function Cost.AND(...) return full_cost end +function Cost.Choice(...) + --{ { cost_function, desc, additional_check } } + local choices={...} + + local function full_cost(e,tp,eg,ep,ev,re,r,rp,chk) + local ops={} + local has_choice=false + for _,choice in ipairs(choices) do + local fn,desc,additional_check=table.unpack(choice) + local check=fn(e,tp,eg,ep,ev,re,r,rp,0) and (not additional_check or additional_check(e,tp,eg,ep,ev,re,r,rp,0)) + table.insert(ops,{check,desc}) + has_choice=has_choice or check + end + + if chk==0 then return has_choice end + + local op=Duel.SelectEffect(tp,table.unpack(ops)) + choices[op][1](e,tp,eg,ep,ev,re,r,rp,1) + e:SetLabel(op) + end + + detach_costs[full_cost]=true + self_discard_costs[full_cost]=true + for _,choice in ipairs(choices) do + local fn=choice[1] + if not detach_costs[fn] then detach_costs[full_cost]=false end + if not self_discard_costs[fn] then self_discard_costs[full_cost]=false end + end + + return full_cost +end function Card.EquipByEffectLimit(e,c) if e:GetOwner()~=c then return false end From 7e12db7c17f7ac0b6c4b6d0aaf7d0d0135ec3c82 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 6 Jul 2025 23:58:37 +0800 Subject: [PATCH 044/165] update "Wollow, Founder of the Drudge Dragons" --- official/c45935145.lua | 77 +++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/official/c45935145.lua b/official/c45935145.lua index 0fa715cfce..f4b55b4a54 100644 --- a/official/c45935145.lua +++ b/official/c45935145.lua @@ -4,20 +4,20 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure + --Xyz Summon procedure: 2+ Level 6 monsters Xyz.AddProcedure(c,nil,6,2,nil,nil,Xyz.InfiniteMats) - --Increase ATK/DEF + --Monsters you control gain 100 ATK/DEF for each card in your opponent's GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(s.val) + e1:SetValue(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_GRAVE)*100 end) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) - --Shuffle, Special Summon, or Set the targeted card + --Activate the appropriate effect based on the number of detached materials local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_QUICK_O) @@ -26,61 +26,62 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,id) - e3:SetTarget(s.eftg) - e3:SetOperation(s.efop) + e3:SetCost(Cost.AND(s.efftgcost,s.effdetachcost)) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) c:RegisterEffect(e3) end -function s.val(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_GRAVE)*100 -end function s.tgfilter(c,e,tp,detach_1,detach_2) - return (detach_1 and c:IsAbleToDeck()) or (detach_2 and (s.spfilter(c,e,tp) or s.setfilter(c))) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP|POS_FACEDOWN_DEFENSE) + return (detach_1 and c:IsAbleToDeck()) or (detach_2 and s.setfilter(c,e,tp)) end -function s.setfilter(c) - return c:IsSpellTrap() and c:IsSSetable() +function s.setfilter(c,e,tp) + if c:IsSpellTrap() then return c:IsSSetable() end + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP|POS_FACEDOWN_DEFENSE) end -function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.efftgcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local detach_1=c:CheckRemoveOverlayCard(tp,1,REASON_COST) local detach_2=c:CheckRemoveOverlayCard(tp,2,REASON_COST) - if chk==0 then return (detach_1 or detach_2) and Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,detach_1,detach_2) end + if chk==0 then return (detach_1 or detach_2) + and Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,detach_1,detach_2) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,detach_1,detach_2):GetFirst() - local b1=detach_1 and tc:IsAbleToDeck() - local b2=detach_2 and (s.spfilter(tc,e,tp) or s.setfilter(tc)) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - c:RemoveOverlayCard(tp,1,1,REASON_COST) - e:SetCategory(CATEGORY_TODECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) - elseif op==2 then - c:RemoveOverlayCard(tp,2,2,REASON_COST) - if tc:IsMonster() then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,tp,0) - else - e:SetCategory(0) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) - end + Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,detach_1,detach_2) +end +function s.tccheck(op) + return function(e,tp) + local tc=Duel.GetFirstTarget() + if not tc then return true end + return op==1 and tc:IsAbleToDeck() or s.setfilter(tc,e,tp) end end -function s.efop(e,tp,eg,ep,ev,re,r,rp) +s.effdetachcost=Cost.Choice( + {Cost.Detach(1),aux.Stringid(id,1),s.tccheck(1)}, + {Cost.Detach(2),aux.Stringid(id,2),s.tccheck(2)} +) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return true end local op=e:GetLabel() + local categ=CATEGORY_TODECK + local tc=Duel.GetFirstTarget() + if op==2 then categ=tc:IsMonster() and CATEGORY_SPECIAL_SUMMON or CATEGORY_LEAVE_GRAVE end + e:SetCategory(categ) + Duel.SetOperationInfo(0,categ,tc,1,tp,0) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end + local op=e:GetLabel() if op==1 then + --Return it to the Deck Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) elseif op==2 then + --If the target is a monster, Special Summon it face-up, or in face-down Defense Position, to your field if tc:IsMonster() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP|POS_FACEDOWN_DEFENSE)>0 and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) + --If it is not, Set it on your field elseif tc:IsSSetable() then Duel.SSet(tp,tc) end From 220c505ecf5a59b6f5defeddd5449ce2dd5861d6 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 00:12:05 +0800 Subject: [PATCH 045/165] update "Starliege Lord Galaxion" --- official/c40390147.lua | 52 +++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/official/c40390147.lua b/official/c40390147.lua index 1444c46b91..5ec605bd8d 100644 --- a/official/c40390147.lua +++ b/official/c40390147.lua @@ -2,17 +2,21 @@ --Starliege Lord Galaxion local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PHOTON),4,2) c:EnableReviveLimit() - --spsummon + --Xyz Summon procedure: 2 Level 4 "Photon" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PHOTON),4,2) + --Special Summon 1 "Galaxy-Eyes Photon Dragon" from your hand or Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.sptg) + e1:SetCost(Cost.Choice( + {Cost.Detach(1),aux.Stringid(id,1),s.spcheck(LOCATION_HAND)}, + {Cost.Detach(2),aux.Stringid(id,2),s.spcheck(LOCATION_DECK)} + )) + e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end @@ -21,36 +25,22 @@ s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.spfilter(c,e,tp) return c:IsCode(CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - local b2=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (b1 or b2) end - local opt=0 - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(id,1)) - else - opt=Duel.SelectOption(tp,aux.Stringid(id,2))+1 - end - e:SetLabel(opt) - e:GetHandler():RemoveOverlayCard(tp,opt+1,opt+1,REASON_COST) - if opt==0 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - else - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +function s.spcheck(loc) + return function(e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end + local loc=e:GetLabel()==1 and LOCATION_HAND or LOCATION_DECK + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) +end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=nil - if e:GetLabel()==0 then - tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - else - tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - end - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + local loc=e:GetLabel()==1 and LOCATION_HAND or LOCATION_DECK + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end From 9f43fd95e8fff417f0e73ba89055a3d16a4f761f Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 00:31:52 +0800 Subject: [PATCH 046/165] update "Primathmech Alembertian" --- official/c85692042.lua | 174 ++++++++++++++--------------------------- 1 file changed, 60 insertions(+), 114 deletions(-) diff --git a/official/c85692042.lua b/official/c85692042.lua index 37b4d925af..89340f08ed 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -3,129 +3,47 @@ --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) c:EnableReviveLimit() - --search + --Xyz Summon procedure: 2+ Level 4 monsters + Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) + --Special Summon 1 Level 4 "Mathmech" monster from your hand or GY 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_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(s.thcon) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCountLimit(1,{id,1}) + e1:SetRange(LOCATION_MZONE) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --special summon + --Activate the appropriate effect based on the number of detached materials local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,4)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1,{id,1}) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetCost(Cost.Choice( + {Cost.Detach(2),aux.Stringid(id,1),s.thcheck(s.mmfilter)}, + {Cost.Detach(3),aux.Stringid(id,2),s.thcheck(s.l4filter)}, + {Cost.Detach(4),aux.Stringid(id,3),s.thcheck(s.stfilter)} + )) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + end s.listed_series={SET_MATHMECH} -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsXyzSummoned() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local mm=s.mmtg(e,tp,eg,ep,ev,re,r,rp,0) --"Mathmech" target - local l4=s.l4tg(e,tp,eg,ep,ev,re,r,rp,0) --"Level 4" target - local st=s.sttg(e,tp,eg,ep,ev,re,r,rp,0) --"Spell/Trap" target - local ct - if st then ct = 4 end - if l4 then ct = 3 end - if mm then ct = 2 end - if chk==0 then return (l4 or mm or st) and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - local selections={} - if st and c:CheckRemoveOverlayCard(tp,4,REASON_COST) then - table.insert(selections,4) - end - if l4 and c:CheckRemoveOverlayCard(tp,3,REASON_COST) then - table.insert(selections,3) - end - if mm and c:CheckRemoveOverlayCard(tp,2,REASON_COST) then - table.insert(selections,2) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) - local sel=Duel.AnnounceNumber(tp,table.unpack(selections)) - c:RemoveOverlayCard(tp,sel,sel,REASON_COST) - if sel==2 then - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) - elseif sel==3 then - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) - else - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,3)) - end - e:SetLabel(sel) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end --legality handled in cost by necessity - local sel=e:GetLabel() - if sel==2 then - s.mmtg(e,tp,eg,ep,ev,re,r,rp,chk) - elseif sel==3 then - s.l4tg(e,tp,eg,ep,ev,re,r,rp,chk) - else - s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) - end -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if sel==2 then - s.mmop(e,tp,eg,ep,ev,re,r,rp) - elseif sel==3 then - s.l4op(e,tp,eg,ep,ev,re,r,rp) - else - s.stop(e,tp,eg,ep,ev,re,r,rp) - end -end -function s.tg(filter) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function s.op(filter) - return function(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.mmfilter(c) - return c:IsSetCard(SET_MATHMECH) and c:IsAbleToHand() -end -s.mmtg=s.tg(s.mmfilter) -s.mmop=s.op(s.mmfilter) -function s.l4filter(c) - return c:IsLevel(4) and c:IsAbleToHand() -end -s.l4tg=s.tg(s.l4filter) -s.l4op=s.op(s.l4filter) -function s.stfilter(c) - return c:IsSpellTrap() and c:IsAbleToHand() -end -s.sttg=s.tg(s.stfilter) -s.stop=s.op(s.stfilter) -function s.cfilter(c,ft,tp) - return ft>0 or (c:IsControler(tp) and c:GetSequence()<5) +function s.spcostfilter(c,ft,tp) + return (c:IsControler(tp) and Duel.GetMZoneCount(tp,c) or ft)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,ft,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,ft,tp) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,ft,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,ft,tp) Duel.Release(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -143,3 +61,31 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end +function s.mmfilter(c) + return c:IsSetCard(SET_MATHMECH) and c:IsAbleToHand() +end +function s.l4filter(c) + return c:IsLevel(4) and c:IsAbleToHand() +end +function s.stfilter(c) + return c:IsSpellTrap() and c:IsAbleToHand() +end +function s.thcheck(filter) + return function(e,tp) + return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) + 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,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local filter=op==1 and s.mmfilter or (op==2 and s.l4filter or s.stfilter) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end From 2982a8b91af52b1c87fab148b8c0a8e94e4e3ca0 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 01:20:43 +0800 Subject: [PATCH 047/165] fix typos --- official/c19369609.lua | 4 ++-- unofficial/c513000059.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/official/c19369609.lua b/official/c19369609.lua index 52bad000e2..2b3e4a60f5 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -51,7 +51,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - return bc and bc:IsFaceup() end bc~=e:GetHandler() + return bc and bc:IsFaceup() and bc~=e:GetHandler() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) @@ -59,4 +59,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) --That monster you control gains 300 ATK for each material detached, until the end of this turn bc:UpdateAttack(e:GetLabel()*300,RESETS_STANDARD_PHASE_END,e:GetHandler()) end -end \ No newline at end of file +end diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index 6ace9e9797..01d8446a67 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e4) - e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) local e5=Effect.CreateEffect(c) @@ -104,4 +104,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end From c5bf0a9ac16c9fed8cb383b5e2a5c97684768c83 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 20:36:54 +0300 Subject: [PATCH 048/165] Update c85692042.lua --- official/c85692042.lua | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/official/c85692042.lua b/official/c85692042.lua index 89340f08ed..15395299cb 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -8,42 +8,37 @@ function s.initial_effect(c) Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) --Special Summon 1 Level 4 "Mathmech" monster from your hand or GY local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,4)) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,{id,1}) e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Activate the appropriate effect based on the number of detached materials + --Activate the appropriate effect based on the number of materials detached local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) + 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_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,id) + e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e2:SetCost(Cost.Choice( - {Cost.Detach(2),aux.Stringid(id,1),s.thcheck(s.mmfilter)}, - {Cost.Detach(3),aux.Stringid(id,2),s.thcheck(s.l4filter)}, - {Cost.Detach(4),aux.Stringid(id,3),s.thcheck(s.stfilter)} + {Cost.Detach(2),aux.Stringid(id,2),s.thcheck(s.mmfilter)}, + {Cost.Detach(3),aux.Stringid(id,3),s.thcheck(s.l4filter)}, + {Cost.Detach(4),aux.Stringid(id,4),s.thcheck(s.stfilter)} )) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) - + c:RegisterEffect(e2) end s.listed_series={SET_MATHMECH} -function s.spcostfilter(c,ft,tp) - return (c:IsControler(tp) and Duel.GetMZoneCount(tp,c) or ft)>0 -end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,ft,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,ft,tp) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,false,aux.ReleaseCheckMMZ,nil) end + local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,false,aux.ReleaseCheckMMZ,nil) Duel.Release(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -81,7 +76,9 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local op=e:GetLabel() - local filter=op==1 and s.mmfilter or (op==2 and s.l4filter or s.stfilter) + local filter=(op==1 and s.mmfilter) + or (op==2 and s.l4filter) + or s.stfilter Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then From 58643c3540a25503bb65e1c1dbfe1d5671052d20 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 20:53:06 +0300 Subject: [PATCH 049/165] Update c88021907.lua --- official/c88021907.lua | 79 ++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/official/c88021907.lua b/official/c88021907.lua index 6d29bdb2ac..9e6ec391ee 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -6,41 +6,48 @@ function s.initial_effect(c) c:EnableReviveLimit() --Xyz Summon procedure: 3 Level 4 monsters Xyz.AddProcedure(c,nil,4,3) - --Resolve effect(s) based on the number of detached materials + --If a "Mathmech" card(s) you control would be destroyed by card effect, you can detach 1 material from this card instead local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetCost(Cost.Detach(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EFFECT_DESTROY_REPLACE) + e1:SetRange(LOCATION_MZONE) + e1:SetTarget(s.reptg) + e1:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) c:RegisterEffect(e1) - --If a "Mathmech" card(s) you control would be destroyed by card effect, you can detach 1 material from this card instead + --Activate a number of effects to activate equal to the number of materials detached local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(s.reptg) - e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetCost(Cost.Detach(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) c:RegisterEffect(e2) end s.listed_series={SET_MATHMECH} +function s.repfilter(c,tp) + return c:IsSetCard(SET_MATHMECH) and c:IsControler(tp) and c:IsOnField() and c:IsFaceup() + and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end + return Duel.SelectEffectYesNo(tp,c,96) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)>0 +end function s.effcostmax(e,tp) local ct=0 - if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 then ct=ct+1 end + if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND,1,nil) then ct=ct+1 end if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) then ct=ct+1 end if Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) then ct=ct+1 end return ct end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local ct=e:GetLabel() - if ct==0 then return end - local b1=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 + local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND,1,nil) local b2=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) local b3=Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) local options={ @@ -48,22 +55,26 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) {b2,aux.Stringid(id,2)}, {b3,aux.Stringid(id,3)} } + local locations=0 local selection={} + local ct=e:GetLabel() for i=1,ct do local op=Duel.SelectEffect(tp,table.unpack(options)) options[op][1]=false selection[op]=true - local loc=op==1 and LOCATION_HAND or (op==2 and LOCATION_MZONE or LOCATION_SZONE) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,loc) + locations=locations|((op==1 and LOCATION_HAND) or (op==2 and LOCATION_MZONE) or LOCATION_ONFIELD) end e:SetLabelObject(selection) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,1-tp,locations) end function s.effop(e,tp,eg,ep,ev,re,r,rp) + local break_chk=false local selection=e:GetLabelObject() if selection[1] then --Send 1 random card from your opponent's hand to the GY - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) + local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_HAND,nil) if #g>0 then + break_chk=true local sg=g:RandomSelect(1-tp,1) Duel.SendtoGrave(sg,REASON_EFFECT) end @@ -73,28 +84,20 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) if #g>0 then + Duel.HintSelection(g) + if break_chk then Duel.BreakEffect() end + break_chk=true Duel.SendtoGrave(g,REASON_EFFECT) end end if selection[3] then --Send 1 Spell/Trap your opponent controls to the GY Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_SZONE,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,1,nil) if #g>0 then + Duel.HintSelection(g) + if break_chk then Duel.BreakEffect() end Duel.SendtoGrave(g,REASON_EFFECT) end end end -function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(SET_MATHMECH) - and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) - and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectEffectYesNo(tp,c,96) then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end From c87cfbff4925a8b46886139d25a0d7e4d762c8c4 Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 6 Jul 2025 16:17:03 -0300 Subject: [PATCH 050/165] Apply 88 Cost.Detach --- unofficial/c100000178.lua | 6 +----- unofficial/c100000179.lua | 6 +----- unofficial/c100000498.lua | 6 +----- unofficial/c100000549.lua | 6 +----- unofficial/c111011803.lua | 6 +----- unofficial/c111011903.lua | 6 +----- unofficial/c111011905.lua | 6 +----- unofficial/c511000034.lua | 6 +----- unofficial/c511000184.lua | 6 +----- unofficial/c511000192.lua | 8 ++------ unofficial/c511000294.lua | 6 +----- unofficial/c511000296.lua | 6 +----- unofficial/c511000512.lua | 6 +----- unofficial/c511000515.lua | 6 +----- unofficial/c511000674.lua | 6 +----- unofficial/c511001247.lua | 6 +----- unofficial/c511001273.lua | 6 +----- unofficial/c511001275.lua | 6 +----- unofficial/c511001338.lua | 6 +----- unofficial/c511001376.lua | 8 ++------ unofficial/c511001432.lua | 6 +----- unofficial/c511001624.lua | 6 +----- unofficial/c511001776.lua | 6 +----- unofficial/c511001779.lua | 6 +----- unofficial/c511001997.lua | 6 +----- unofficial/c511001998.lua | 6 +----- unofficial/c511001999.lua | 6 +----- unofficial/c511002046.lua | 8 ++------ unofficial/c511002054.lua | 6 +----- unofficial/c511002058.lua | 6 +----- unofficial/c511002060.lua | 6 +----- unofficial/c511002064.lua | 6 +----- unofficial/c511002075.lua | 6 +----- unofficial/c511002076.lua | 6 +----- unofficial/c511002077.lua | 6 +----- unofficial/c511002079.lua | 6 +----- unofficial/c511002088.lua | 6 +----- unofficial/c511002090.lua | 6 +----- unofficial/c511002092.lua | 6 +----- unofficial/c511002112.lua | 6 +----- unofficial/c511002543.lua | 6 +----- unofficial/c511002591.lua | 6 +----- unofficial/c511002658.lua | 6 +----- unofficial/c511002749.lua | 6 +----- unofficial/c511002764.lua | 6 +----- unofficial/c511002778.lua | 6 +----- unofficial/c511002829.lua | 6 +----- unofficial/c511002830.lua | 6 +----- unofficial/c511002839.lua | 6 +----- unofficial/c511002858.lua | 6 +----- unofficial/c511002864.lua | 6 +----- unofficial/c511002912.lua | 6 +----- unofficial/c511002913.lua | 6 +----- unofficial/c511003224.lua | 6 +----- unofficial/c511009002.lua | 6 +----- unofficial/c511009062.lua | 6 +----- unofficial/c511009074.lua | 8 ++------ unofficial/c511009321.lua | 6 +----- unofficial/c511009462.lua | 6 +----- unofficial/c511009508.lua | 6 +----- unofficial/c511009560.lua | 6 +----- unofficial/c511010010.lua | 10 +++------- unofficial/c511010020.lua | 8 ++------ unofficial/c511010021.lua | 8 ++------ unofficial/c511010025.lua | 8 ++------ unofficial/c511010032.lua | 6 +----- unofficial/c511010034.lua | 6 +----- unofficial/c511010047.lua | 6 +----- unofficial/c511010056.lua | 6 +----- unofficial/c511010064.lua | 6 +----- unofficial/c511010083.lua | 6 +----- unofficial/c511010096.lua | 6 +----- unofficial/c511010104.lua | 6 +----- unofficial/c511010139.lua | 6 +----- unofficial/c511010504.lua | 6 +----- unofficial/c511010515.lua | 6 +----- unofficial/c511015129.lua | 6 +----- unofficial/c511020000.lua | 6 +----- unofficial/c511600298.lua | 6 +----- unofficial/c511600369.lua | 6 +----- unofficial/c511600384.lua | 6 +----- unofficial/c513000018.lua | 6 +----- unofficial/c513000061.lua | 6 +----- unofficial/c513000062.lua | 6 +----- unofficial/c513000141.lua | 6 +----- unofficial/c700000026.lua | 6 +----- unofficial/c810000081.lua | 6 +----- 87 files changed, 96 insertions(+), 444 deletions(-) diff --git a/unofficial/c100000178.lua b/unofficial/c100000178.lua index 15415cad73..e60ad62716 100644 --- a/unofficial/c100000178.lua +++ b/unofficial/c100000178.lua @@ -11,14 +11,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c100000179.lua b/unofficial/c100000179.lua index 782e9f33e8..c2cfb990e6 100644 --- a/unofficial/c100000179.lua +++ b/unofficial/c100000179.lua @@ -11,14 +11,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c100000498.lua b/unofficial/c100000498.lua index 5c7d3b947a..638f90ee09 100644 --- a/unofficial/c100000498.lua +++ b/unofficial/c100000498.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) diff --git a/unofficial/c100000549.lua b/unofficial/c100000549.lua index 1ba619107c..ae0132126b 100644 --- a/unofficial/c100000549.lua +++ b/unofficial/c100000549.lua @@ -11,14 +11,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c111011803.lua b/unofficial/c111011803.lua index 4d792ea0d7..695b54ab70 100644 --- a/unofficial/c111011803.lua +++ b/unofficial/c111011803.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_DESTROY) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=eg:GetFirst() if chk==0 then return Duel.GetLocationCount(tc:GetPreviousControler(),LOCATION_SZONE)>0 diff --git a/unofficial/c111011903.lua b/unofficial/c111011903.lua index 64947ed03b..07d7efcb90 100644 --- a/unofficial/c111011903.lua +++ b/unofficial/c111011903.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()~=0 end diff --git a/unofficial/c111011905.lua b/unofficial/c111011905.lua index 8d2bf1573f..10dad40532 100644 --- a/unofficial/c111011905.lua +++ b/unofficial/c111011905.lua @@ -11,15 +11,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) diff --git a/unofficial/c511000034.lua b/unofficial/c511000034.lua index c7e4963279..c2ad485c63 100644 --- a/unofficial/c511000034.lua +++ b/unofficial/c511000034.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) c:RegisterEffect(e2) end @@ -43,10 +43,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return (a:GetControler()==tp and a:IsRelateToBattle()) or (d and d:GetControler()==tp and d:IsRelateToBattle()) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end diff --git a/unofficial/c511000184.lua b/unofficial/c511000184.lua index 4a685b935d..ec1101a47a 100644 --- a/unofficial/c511000184.lua +++ b/unofficial/c511000184.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_START) e1:SetCondition(s.tbcon) - e1:SetCost(s.tbcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.tbop) c:RegisterEffect(e1) --battle indestructable @@ -28,10 +28,6 @@ function s.tbcon(e,tp,eg,ep,ev,re,r,rp) if bc==c then bc=Duel.GetAttackTarget() end return bc and bc:IsFaceup() and bc:GetAttack()>c:GetAttack() end -function s.tbcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.tbop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=Duel.GetAttacker() diff --git a/unofficial/c511000192.lua b/unofficial/c511000192.lua index 2d17cd110c..b9895d402e 100644 --- a/unofficial/c511000192.lua +++ b/unofficial/c511000192.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetCountLimit(1) - e4:SetCost(s.cost) + e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.op2) c:RegisterEffect(e4) --Prevent Effect damage @@ -49,7 +49,7 @@ function s.initial_effect(c) e5:SetCode(EVENT_FREE_CHAIN) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) - e5:SetCost(s.cost) + e5:SetCost(Cost.Detach(1)) e5:SetOperation(s.op3) c:RegisterEffect(e5) end @@ -69,10 +69,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.GetControl(bc,tp,PHASE_BATTLE,1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.op2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511000294.lua b/unofficial/c511000294.lua index ac6304cfc4..55ea13b4aa 100644 --- a/unofficial/c511000294.lua +++ b/unofficial/c511000294.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.descost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) @@ -86,10 +86,6 @@ function s.desrepop(e,tp,eg,ep,ev,re,r,rp) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.desfilter(c,e,tp) return Duel.IsExistingMatchingCard(s.xyzfilter,c:GetControler(),LOCATION_EXTRA,0,1,nil,e,tp,c) end diff --git a/unofficial/c511000296.lua b/unofficial/c511000296.lua index 21d0ddca9b..2faa3d0e9c 100644 --- a/unofficial/c511000296.lua +++ b/unofficial/c511000296.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e7:SetCode(EVENT_BE_BATTLE_TARGET) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.nacon) - e7:SetCost(s.nacost) + e7:SetCost(Cost.Detach(1)) e7:SetTarget(s.natg) e7:SetOperation(s.naop) c:RegisterEffect(e7) @@ -124,10 +124,6 @@ function s.nacon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return d and d:IsControler(tp) end -function s.nacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.natg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsOnField() end Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,Duel.GetAttacker():GetAttack()) diff --git a/unofficial/c511000512.lua b/unofficial/c511000512.lua index 92a5be8d02..6fdcda73e3 100644 --- a/unofficial/c511000512.lua +++ b/unofficial/c511000512.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -29,10 +29,6 @@ s.xyz_number=28 function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget()==nil and Duel.GetAttacker()==e:GetHandler() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end Duel.SetTargetPlayer(1-tp) diff --git a/unofficial/c511000515.lua b/unofficial/c511000515.lua index a14c92ef50..1c8a8f36e6 100644 --- a/unofficial/c511000515.lua +++ b/unofficial/c511000515.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetCondition(s.atcon) - e3:SetCost(s.atcost) + e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.atop) c:RegisterEffect(e3) --remove @@ -93,10 +93,6 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()==c and c:CanChainAttack() end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() end diff --git a/unofficial/c511000674.lua b/unofficial/c511000674.lua index 6e639b13f2..202df306b2 100644 --- a/unofficial/c511000674.lua +++ b/unofficial/c511000674.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.cost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.target) e4:SetOperation(s.operation) c:RegisterEffect(e4) @@ -40,10 +40,6 @@ end function s.atkfilter(e,c) return c:IsSpecialSummoned() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsSpecialSummoned() and c:IsFaceup() and c:GetAttack()>0 end diff --git a/unofficial/c511001247.lua b/unofficial/c511001247.lua index 5ed3e62872..341a53db25 100644 --- a/unofficial/c511001247.lua +++ b/unofficial/c511001247.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/unofficial/c511001273.lua b/unofficial/c511001273.lua index cfb7ff2135..da3a6c8803 100644 --- a/unofficial/c511001273.lua +++ b/unofficial/c511001273.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -56,10 +56,6 @@ s.xyz_number=37 function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end diff --git a/unofficial/c511001275.lua b/unofficial/c511001275.lua index 33b6a7d6bb..b66301381d 100644 --- a/unofficial/c511001275.lua +++ b/unofficial/c511001275.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.con) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.op) c:RegisterEffect(e3) --gain atk @@ -98,10 +98,6 @@ end function s.con(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()~=e:GetHandler() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then diff --git a/unofficial/c511001338.lua b/unofficial/c511001338.lua index 1e29a53212..e960dc77a1 100644 --- a/unofficial/c511001338.lua +++ b/unofficial/c511001338.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -75,10 +75,6 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,g) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end diff --git a/unofficial/c511001376.lua b/unofficial/c511001376.lua index e7e7074040..9cc598cc1a 100644 --- a/unofficial/c511001376.lua +++ b/unofficial/c511001376.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e3) e4:SetCondition(s.retcon) - e4:SetCost(s.cost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.rettg) e4:SetOperation(s.retop) c:RegisterEffect(e4) @@ -84,10 +84,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) diff --git a/unofficial/c511001432.lua b/unofficial/c511001432.lua index da3718cb9a..60467b1eb2 100644 --- a/unofficial/c511001432.lua +++ b/unofficial/c511001432.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.damcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) if chk==0 then return ct>0 end diff --git a/unofficial/c511001624.lua b/unofficial/c511001624.lua index bd0024bc0d..e35d8f5f08 100644 --- a/unofficial/c511001624.lua +++ b/unofficial/c511001624.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL end diff --git a/unofficial/c511001776.lua b/unofficial/c511001776.lua index ca3a0cba44..a3070b14a2 100644 --- a/unofficial/c511001776.lua +++ b/unofficial/c511001776.lua @@ -60,7 +60,7 @@ function s.initial_effect(c) e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.discon) - e6:SetCost(s.discost) + e6:SetCost(Cost.Detach(1)) e6:SetTarget(s.distg) e6:SetOperation(s.disop) c:RegisterEffect(e6) @@ -141,10 +141,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(s.disfilter,1,nil,eq) and Duel.IsChainDisablable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) diff --git a/unofficial/c511001779.lua b/unofficial/c511001779.lua index 68b93d45a7..f971fc288d 100644 --- a/unofficial/c511001779.lua +++ b/unofficial/c511001779.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,10 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=19 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) local g=c:GetMaterial():Filter(Card.IsLocation,nil,LOCATION_GRAVE) return c:IsFaceup() and c:IsType(TYPE_XYZ) and #g>0 diff --git a/unofficial/c511001997.lua b/unofficial/c511001997.lua index 70cfe2e90e..d5fe7a21f4 100644 --- a/unofficial/c511001997.lua +++ b/unofficial/c511001997.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -59,10 +59,6 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsDestructable() end diff --git a/unofficial/c511001998.lua b/unofficial/c511001998.lua index db6d8c4505..b2d211dcb8 100644 --- a/unofficial/c511001998.lua +++ b/unofficial/c511001998.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) - e4:SetCost(s.spcost) + e4:SetCost(Cost.Detach(1)) e4:SetCondition(s.spcon) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) @@ -65,10 +65,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end diff --git a/unofficial/c511001999.lua b/unofficial/c511001999.lua index e43d4c4a31..3477e3a837 100644 --- a/unofficial/c511001999.lua +++ b/unofficial/c511001999.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=15 -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsType(TYPE_XYZ) and (c:IsFaceup() or c:GetOverlayCount()>0) end diff --git a/unofficial/c511002046.lua b/unofficial/c511002046.lua index dbf369ac6b..9527c67717 100644 --- a/unofficial/c511002046.lua +++ b/unofficial/c511002046.lua @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_FREE_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(tc) @@ -50,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(id) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) @@ -62,10 +62,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return a~=nil and d and d==e:GetHandler() and not e:GetHandler():IsStatus(STATUS_CHAINING) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.NegateAttack() diff --git a/unofficial/c511002054.lua b/unofficial/c511002054.lua index 837d96591c..3eca1ae67b 100644 --- a/unofficial/c511002054.lua +++ b/unofficial/c511002054.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(10389142,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=42 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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.IsPlayerCanSpecialSummonMonster(tp,10389143,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end diff --git a/unofficial/c511002058.lua b/unofficial/c511002058.lua index a3f90cf408..241c39ddf5 100644 --- a/unofficial/c511002058.lua +++ b/unofficial/c511002058.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(95100120,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.adcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) c:RegisterEffect(e1) @@ -32,10 +32,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=52 -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return e:GetHandler():IsDefenseAbove(100) end end diff --git a/unofficial/c511002060.lua b/unofficial/c511002060.lua index 8083fc116b..bf97a8b0f1 100644 --- a/unofficial/c511002060.lua +++ b/unofficial/c511002060.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=50 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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(1-tp) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511002064.lua b/unofficial/c511002064.lua index 18e2eaf2e6..44bff4b09e 100644 --- a/unofficial/c511002064.lua +++ b/unofficial/c511002064.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -36,10 +36,6 @@ s.xyz_number=82 function s.filter(c) return c:IsFaceup() and (c:IsSetCard(0x528) or c:IsCode(31437713)) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) and not e:GetHandler():IsStatus(STATUS_CHAINING) end diff --git a/unofficial/c511002075.lua b/unofficial/c511002075.lua index fa4d8ba0f6..214169475e 100644 --- a/unofficial/c511002075.lua +++ b/unofficial/c511002075.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:GetRank()0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsType(TYPE_XYZ) end diff --git a/unofficial/c511002076.lua b/unofficial/c511002076.lua index 1696d7abc0..e4013ebc7e 100644 --- a/unofficial/c511002076.lua +++ b/unofficial/c511002076.lua @@ -8,15 +8,11 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRankBelow(4) end diff --git a/unofficial/c511002077.lua b/unofficial/c511002077.lua index e86a00fd2a..7c51119660 100644 --- a/unofficial/c511002077.lua +++ b/unofficial/c511002077.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=17 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002079.lua b/unofficial/c511002079.lua index 2214f44f4e..913a986387 100644 --- a/unofficial/c511002079.lua +++ b/unofficial/c511002079.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.negcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -46,10 +46,6 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_series={0xba} -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) diff --git a/unofficial/c511002088.lua b/unofficial/c511002088.lua index 4495ad655a..fb7976884c 100644 --- a/unofficial/c511002088.lua +++ b/unofficial/c511002088.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(29669359,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=61 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) diff --git a/unofficial/c511002090.lua b/unofficial/c511002090.lua index 6f8b62a74e..d66b06550a 100644 --- a/unofficial/c511002090.lua +++ b/unofficial/c511002090.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.lpcost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.lpop) c:RegisterEffect(e2) --lp - 0 materials @@ -109,10 +109,6 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) s.equipop(c,e,tp,tc) end end -function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) end diff --git a/unofficial/c511002092.lua b/unofficial/c511002092.lua index fc071c21a0..ae2ee03f3c 100644 --- a/unofficial/c511002092.lua +++ b/unofficial/c511002092.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --battle indestructable @@ -29,10 +29,6 @@ s.xyz_number=73 function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002112.lua b/unofficial/c511002112.lua index c00140df87..9261d093c0 100644 --- a/unofficial/c511002112.lua +++ b/unofficial/c511002112.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511002543.lua b/unofficial/c511002543.lua index 3183bebd1f..50b2dcc8ed 100644 --- a/unofficial/c511002543.lua +++ b/unofficial/c511002543.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.discost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) e2:SetCode(3682106) c:RegisterEffect(e2) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511002591.lua b/unofficial/c511002591.lua index 19e4055d62..7df24c8896 100644 --- a/unofficial/c511002591.lua +++ b/unofficial/c511002591.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetHintTiming(0,TIMING_MAIN_END) e2:SetCondition(s.mtcon) - e2:SetCost(s.mtcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.mttg) e2:SetOperation(s.mtop) c:RegisterEffect(e2) @@ -33,10 +33,6 @@ end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) or Duel.IsAbleToEnterBP() end -function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.mtfilter(c) return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) and c:GetFlagEffect(id)==0 end diff --git a/unofficial/c511002658.lua b/unofficial/c511002658.lua index 5debd36d0e..e7112e2537 100644 --- a/unofficial/c511002658.lua +++ b/unofficial/c511002658.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=10 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) diff --git a/unofficial/c511002749.lua b/unofficial/c511002749.lua index b1a1ba14f9..1152b00353 100644 --- a/unofficial/c511002749.lua +++ b/unofficial/c511002749.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -32,10 +32,6 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.xyz_number=66 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,ec) return not ec:IsHasCardTarget(c) end diff --git a/unofficial/c511002764.lua b/unofficial/c511002764.lua index 1b9da64166..4a6ba07391 100644 --- a/unofficial/c511002764.lua +++ b/unofficial/c511002764.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.retcost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) c:RegisterEffect(e1) end -function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) diff --git a/unofficial/c511002778.lua b/unofficial/c511002778.lua index aebbd28f28..04b8654948 100644 --- a/unofficial/c511002778.lua +++ b/unofficial/c511002778.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -31,10 +31,6 @@ end function s.mfilter(c,xyz,sumtype,tp) return c:IsRace(RACE_MACHINE,xyz,sumtype,tp) and c:IsAttribute(ATTRIBUTE_EARTH,xyz,sumtype,tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,0,1,e:GetHandler()) end diff --git a/unofficial/c511002829.lua b/unofficial/c511002829.lua index 8acfeaff74..28ca0b03ba 100644 --- a/unofficial/c511002829.lua +++ b/unofficial/c511002829.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(30741334,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) diff --git a/unofficial/c511002830.lua b/unofficial/c511002830.lua index 708e43beed..1f7fcc7521 100644 --- a/unofficial/c511002830.lua +++ b/unofficial/c511002830.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.ctcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) @@ -34,10 +34,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=40 -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end end diff --git a/unofficial/c511002839.lua b/unofficial/c511002839.lua index 8ed0fc9251..57931e100c 100644 --- a/unofficial/c511002839.lua +++ b/unofficial/c511002839.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(74416224,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0) diff --git a/unofficial/c511002858.lua b/unofficial/c511002858.lua index 07e53ec77b..4d8eab858e 100644 --- a/unofficial/c511002858.lua +++ b/unofficial/c511002858.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) c:RegisterEffect(e3) @@ -46,10 +46,6 @@ function s.desop1(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable() end diff --git a/unofficial/c511002864.lua b/unofficial/c511002864.lua index 9b3b705eba..b354aff227 100644 --- a/unofficial/c511002864.lua +++ b/unofficial/c511002864.lua @@ -10,14 +10,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002912.lua b/unofficial/c511002912.lua index d4adb04c09..b2ba80563d 100644 --- a/unofficial/c511002912.lua +++ b/unofficial/c511002912.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 end diff --git a/unofficial/c511002913.lua b/unofficial/c511002913.lua index d94b30cbd5..5a2f005911 100644 --- a/unofficial/c511002913.lua +++ b/unofficial/c511002913.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,10 +30,6 @@ s.xyz_number=94 function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end diff --git a/unofficial/c511003224.lua b/unofficial/c511003224.lua index 624c9112aa..edc3cc14c8 100644 --- a/unofficial/c511003224.lua +++ b/unofficial/c511003224.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,10 +22,6 @@ function s.xyzcheck(g,tp,xyz) local mg=g:Filter(Card.IsAttribute,nil,ATTRIBUTE_EARTH) return #mg>0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if e:GetHandler():IsDefensePos() then diff --git a/unofficial/c511009002.lua b/unofficial/c511009002.lua index 44bfa814bb..2b35604398 100644 --- a/unofficial/c511009002.lua +++ b/unofficial/c511009002.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetCondition(s.btcon) - e2:SetCost(s.btcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.bttg) e2:SetOperation(s.btop) c:RegisterEffect(e2) @@ -78,10 +78,6 @@ end function s.btcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetBattleDamage(tp)>0 or Duel.GetBattleDamage(1-tp)>0 end -function s.btcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.bttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end e:GetHandler():RegisterFlagEffect(id,RESET_CHAIN,0,1) diff --git a/unofficial/c511009062.lua b/unofficial/c511009062.lua index 45eee02058..4f515c4c0c 100644 --- a/unofficial/c511009062.lua +++ b/unofficial/c511009062.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -21,10 +21,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()==PHASE_MAIN1 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:GetEffectCount(EFFECT_DIRECT_ATTACK)==0 end diff --git a/unofficial/c511009074.lua b/unofficial/c511009074.lua index 1cd352f824..ef65440de5 100644 --- a/unofficial/c511009074.lua +++ b/unofficial/c511009074.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) local e2=Effect.CreateEffect(c) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_CHAINING) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetCondition(s.discon) e3:SetTarget(s.distg) e3:SetOperation(s.disop) @@ -54,10 +54,6 @@ end function s.eftg(e,c) return c==e:GetHandler() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:HasNonZeroAttack() and c:IsLevelAbove(5) end diff --git a/unofficial/c511009321.lua b/unofficial/c511009321.lua index 57bf6189c5..00eaa7d5b8 100644 --- a/unofficial/c511009321.lua +++ b/unofficial/c511009321.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,10 +22,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511009462.lua b/unofficial/c511009462.lua index 6b9c84d8d1..f63ab76898 100644 --- a/unofficial/c511009462.lua +++ b/unofficial/c511009462.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511009508.lua b/unofficial/c511009508.lua index 0b01d28b87..a1e2bf1689 100644 --- a/unofficial/c511009508.lua +++ b/unofficial/c511009508.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -68,10 +68,6 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattleTarget() and e:GetHandler():GetBattleTarget():IsControler(1-tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local bc=c:GetBattleTarget() diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index 0a87b8b98b..e96a37712a 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.indcon) - e1:SetCost(s.indcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.indop) c:RegisterEffect(e1) --effect @@ -34,10 +34,6 @@ function s.indcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511010010.lua b/unofficial/c511010010.lua index 1d4b0db55d..5ab9b1081b 100644 --- a/unofficial/c511010010.lua +++ b/unofficial/c511010010.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=10 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) @@ -43,5 +39,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.indes(e,c) -return not c:IsSetCard(SET_NUMBER) -end + return not c:IsSetCard(SET_NUMBER) +end \ No newline at end of file diff --git a/unofficial/c511010020.lua b/unofficial/c511010020.lua index 52e23d964b..f09eb7ab90 100644 --- a/unofficial/c511010020.lua +++ b/unofficial/c511010020.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=20 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -41,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010021.lua b/unofficial/c511010021.lua index 918f1f6455..3ee670b92a 100644 --- a/unofficial/c511010021.lua +++ b/unofficial/c511010021.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -34,10 +34,6 @@ s.xyz_number=21 function s.atkval(e,c) return c:GetOverlayCount()*1000 end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.desfilter(c) return c:IsDefensePos() end @@ -52,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010025.lua b/unofficial/c511010025.lua index 69d422e329..d136535b0b 100644 --- a/unofficial/c511010025.lua +++ b/unofficial/c511010025.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -32,10 +32,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return re:GetHandler():IsCanBeEffectTarget(e) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -63,4 +59,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/unofficial/c511010032.lua b/unofficial/c511010032.lua index ddd6ff25ec..73ca26c0a2 100644 --- a/unofficial/c511010032.lua +++ b/unofficial/c511010032.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.atcon) - e1:SetCost(s.atcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) @@ -31,10 +31,6 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) return c==Duel.GetAttacker() and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetAttackTarget():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp) end diff --git a/unofficial/c511010034.lua b/unofficial/c511010034.lua index e2f5db3e81..3bfc44b465 100644 --- a/unofficial/c511010034.lua +++ b/unofficial/c511010034.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -25,10 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=34 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttackPos() and c:IsLevelBelow(4) and c:IsControlerCanBeChanged() end diff --git a/unofficial/c511010047.lua b/unofficial/c511010047.lua index 2466bb953b..759a3e2074 100644 --- a/unofficial/c511010047.lua +++ b/unofficial/c511010047.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.dacon) - e2:SetCost(s.dacost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.datg) e2:SetOperation(s.daop) c:RegisterEffect(e2) @@ -50,10 +50,6 @@ end function s.dacon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) end diff --git a/unofficial/c511010056.lua b/unofficial/c511010056.lua index c2cfe47837..0c68201383 100644 --- a/unofficial/c511010056.lua +++ b/unofficial/c511010056.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.drcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=56 -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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) diff --git a/unofficial/c511010064.lua b/unofficial/c511010064.lua index 0eb0026ed4..a0ab0ceccf 100644 --- a/unofficial/c511010064.lua +++ b/unofficial/c511010064.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -34,10 +34,6 @@ function s.initial_effect(c) end s.listed_names={39972130} s.xyz_number=64 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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.IsPlayerCanSpecialSummonMonster(tp,39972130,0,TYPES_TOKEN,-2,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end diff --git a/unofficial/c511010083.lua b/unofficial/c511010083.lua index e00217e3df..c2c7e89aa4 100644 --- a/unofficial/c511010083.lua +++ b/unofficial/c511010083.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable @@ -22,10 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=83 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local tc=g:GetFirst() diff --git a/unofficial/c511010096.lua b/unofficial/c511010096.lua index a13643fc5f..75099b7a10 100644 --- a/unofficial/c511010096.lua +++ b/unofficial/c511010096.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e6) end s.xyz_number=96 -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local at=Duel.GetAttackTarget() if chk==0 then return ((at and at:IsFaceup() and Duel.GetAttacker()==e:GetHandler()) or at==e:GetHandler()) diff --git a/unofficial/c511010104.lua b/unofficial/c511010104.lua index 114946911b..e7218ef756 100644 --- a/unofficial/c511010104.lua +++ b/unofficial/c511010104.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -44,10 +44,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and (ph>PHASE_MAIN1 and ph0 diff --git a/unofficial/c810000081.lua b/unofficial/c810000081.lua index b65813fa3a..dd9af32558 100644 --- a/unofficial/c810000081.lua +++ b/unofficial/c810000081.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetCondition(s.discon) e1:SetTarget(s.distg) e1:SetOperation(s.disop) @@ -26,10 +26,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=3 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.discon(e,tp,eg,ep,ev,re,r,rp) local tgp,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) From 57eb5a176edb9669d8cadd10710228d122c0906f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 23:24:40 +0300 Subject: [PATCH 051/165] Some Xyz updates --- official/c20145685.lua | 63 ++++++++++++++----------------- official/c27337596.lua | 27 +++++++------- official/c29669359.lua | 49 +++++++++++------------- official/c30741334.lua | 24 ++++++------ official/c51735257.lua | 57 ++++++++++++++-------------- official/c60517697.lua | 30 +++++++-------- official/c61399402.lua | 84 +++++++++++++++++++----------------------- official/c69655484.lua | 11 ++---- official/c80117527.lua | 41 +++++++++++---------- 9 files changed, 176 insertions(+), 210 deletions(-) diff --git a/official/c20145685.lua b/official/c20145685.lua index 748462eb17..0af5204fd5 100644 --- a/official/c20145685.lua +++ b/official/c20145685.lua @@ -4,56 +4,49 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2 Level 5 monsters OR 1 Rank 3 or 4 Xyz Monster you control Xyz.AddProcedure(c,nil,5,2,s.xyzfilter,aux.Stringid(id,0),2,s.xyzop) - --Cannot be used as material for an Xyz Summon + --Cannot be used as material for an Xyz Summon while it has material + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e0:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e0:SetValue(1) + c:RegisterEffect(e0) + --Add "Armored Xyz" cards with different names from your Deck to your hand, equal to the number of materials detached local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) - e1:SetValue(1) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(Cost.Detach(1,s.thmaxcost,function(e,og) e:SetLabel(#og) end)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Add "Armored Xyz" cards with different names from your Deck to your hand + --If a monster equipped with this card battles a monster, any battle damage it inflicts to your opponent is doubled local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) + e2:SetType(EFFECT_TYPE_EQUIP) + e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget():GetBattleTarget() end) + e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) c:RegisterEffect(e2) - --Double battle damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():GetBattleTarget() end) - e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - c:RegisterEffect(e3) end s.listed_names={id} s.listed_series={SET_ARMORED_XYZ} function s.xyzfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsRank(3,4) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) + return c:IsRank(3,4) 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 not Duel.HasFlagEffect(tp,id) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - return true + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.thfilter(c) return c:IsSetCard(SET_ARMORED_XYZ) and c:IsAbleToHand() end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - local ct=g:GetClassCount(Card.GetCode) - local rt=math.min(ct,c:GetOverlayCount(),2) - if chk==0 then return rt>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) +function s.thmaxcost(e,tp) + return math.min(2,Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -68,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(thg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,thg) end -end +end \ No newline at end of file diff --git a/official/c27337596.lua b/official/c27337596.lua index 9fb178e6bc..d7cc3b8e22 100644 --- a/official/c27337596.lua +++ b/official/c27337596.lua @@ -2,34 +2,32 @@ --Hieratic Dragon King of Atum local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 6 Dragon monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),6,2) - --Special summon 1 dragon monster from deck + --Special Summon 1 Dragon monster from your Deck, and make its ATK/DEF 0 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.spcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.spcost)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:GetAttackAnnouncedCount()==0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - --Cannot attack this turn + if chk==0 then return c:GetAttackAnnouncedCount()==0 end + --This card cannot attack during the turn you activate this effect local e1=Effect.CreateEffect(c) e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - c:RemoveOverlayCard(tp,1,1,REASON_COST) end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -42,18 +40,19 @@ 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 tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --ATK/DEF becomes 0 + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Make its ATK/DEF 0 local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) + sc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) - tc:RegisterEffect(e2) + sc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c29669359.lua b/official/c29669359.lua index 7b7768a760..c4fc7c4e86 100644 --- a/official/c29669359.lua +++ b/official/c29669359.lua @@ -2,57 +2,52 @@ --Number 61: Volcasaurus local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 5 monsters Xyz.AddProcedure(c,nil,5,2) - --Destroy 1 of opponent's monsters, and if you do, inflict damage equal to its original ATK + --Destroy 1 face-up monster your opponent controls, and if you do, inflict damage to your opponent equal to the destroyed monster's original ATK local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCountLimit(1) + e1:SetCost(Cost.AND(Cost.Detach(1),s.descost)) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) c:RegisterEffect(e1) end s.xyz_number=61 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and not e:GetHandler():IsDirectAttacked() end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - --Cannot attack directly - local e1=Effect.CreateEffect(e:GetHandler()) +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsDirectAttacked() end + --This card cannot attack your opponent directly the turn you activate this effect + local e1=Effect.CreateEffect(c) e1:SetDescription(3207) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function s.filter(c) - return c:IsFaceup() + c:RegisterEffect(e1) 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(1-tp) and chkc:IsFaceup() 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_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - local atk=g:GetFirst():GetTextAttack() + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + local atk=tc:GetTextAttack() if atk<0 then atk=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then + if tc:IsRelateToEffect(e) and tc:IsMonster() and tc:IsControler(1-tp) then local atk=tc:GetTextAttack() if atk<0 then atk=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then + if Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c30741334.lua b/official/c30741334.lua index ddaf2c76a9..ae411abdcf 100644 --- a/official/c30741334.lua +++ b/official/c30741334.lua @@ -12,32 +12,30 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(3,id) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCost(Cost.AND(Cost.Detach(1),s.drcost)) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) end local c=e:GetHandler() - if chk==0 then return Duel.IsPhase(PHASE_MAIN1) - and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) --You cannot conduct your Battle Phase the turn you activate this effect - local e1=Effect.CreateEffect(e:GetHandler()) + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) + e1:SetCode(EFFECT_CANNOT_BP) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,800) end -function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drop(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.Draw(tp,1,REASON_EFFECT) if ct==0 then return end local dc=Duel.GetOperatedGroup():GetFirst() @@ -47,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c51735257.lua b/official/c51735257.lua index 3166326af2..9540d9ec7b 100644 --- a/official/c51735257.lua +++ b/official/c51735257.lua @@ -2,54 +2,51 @@ --Number 50: Blackship of Corn local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --Send 1 of opponent's monsters to GY, and if you do, inflict 1000 damage + --Send 1 monster your opponent controls to the GY, and if you do, inflict 1000 damage to them local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCountLimit(1) + e1:SetCost(Cost.AND(Cost.Detach(1),s.tgcost)) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) c:RegisterEffect(e1) end s.xyz_number=50 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - --Cannot attack this turn - local e1=Effect.CreateEffect(e:GetHandler()) +function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:GetAttackAnnouncedCount()==0 end + --This card cannot attack during the turn you activate this effect + local e1=Effect.CreateEffect(c) e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) - e:GetHandler():RegisterEffect(e1) + c:RegisterEffect(e1) end -function s.filter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) +function s.tgfilter(c,atk) + return c:IsAttackBelow(atk) and c:IsFaceup() and c:IsAbleToGrave() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e:GetHandler():GetAttack()) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local atk=e:GetHandler():GetAttack() + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,atk) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_MZONE,1,nil,atk) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,atk) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - if tc:IsLocation(LOCATION_GRAVE) then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end + if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)>0 + and tc:IsLocation(LOCATION_GRAVE) then + Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60517697.lua b/official/c60517697.lua index 82b9878e3b..aa1ad13f02 100644 --- a/official/c60517697.lua +++ b/official/c60517697.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 7 monsters + --Xyz Summon procedure: 3 Level 7 monsters OR 1 "Atlantean" or "Mermail" Xyz Monster you control Xyz.AddProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) --Return up to 3 cards your opponent controls to the hand local e1=Effect.CreateEffect(c) @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) + e1:SetCost(Cost.AND(Cost.Detach(2),s.rthcost)) + e1:SetTarget(s.rthtg) + e1:SetOperation(s.rthop) c:RegisterEffect(e1) --Special Summon 3 Level 3 or lower Fish, Sea Serpent, and/or Aqua monsters from your hand and/or GY. local e2=Effect.CreateEffect(c) @@ -33,30 +33,26 @@ end s.listed_series={SET_ATLANTEAN,SET_MERMAIL} s.listed_names={id} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(s.listed_series,lc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) + return c:IsSetCard(s.listed_series,lc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() end function s.xyzop(e,tp,chk) if chk==0 then return not Duel.HasFlagEffect(tp,id) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - return true + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end -function s.thcostfilter(c) +function s.rthcostfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) - and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end - c:RemoveOverlayCard(tp,2,2,REASON_COST) +function s.rthcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rthcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rthcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD) end -function s.thop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,3,nil) if #g>0 then @@ -88,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g==3 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61399402.lua b/official/c61399402.lua index d5267ad31c..8320a29688 100644 --- a/official/c61399402.lua +++ b/official/c61399402.lua @@ -4,65 +4,70 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --destroy monsters + --If a monster(s) you control would be destroyed by card effect, you can detach 1 material from this card instead local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(s.descost) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) + e1:SetTarget(s.reptg) + e1:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) c:RegisterEffect(e1) - --special summon + --Dstroy face-up monsters your opponent controls, up to the number of "@Ignister" monsters you control local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.Detach(1)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) c:RegisterEffect(e2) - --destruction replacement + --Special Summon 1 Link Monster from your GY local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EFFECT_DESTROY_REPLACE) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetRange(LOCATION_MZONE) - e3:SetTarget(s.reptg) - e3:SetValue(s.repval) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_series={SET_IGNISTER} -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.repfilter(c,tp) + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end + return Duel.SelectEffectYesNo(tp,c,96) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)>0 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) if chk==0 then return #g>0 and Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,nil)>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,nil) - if ct<1 then return end + if ct==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,ct,nil) if #g>0 then + Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return ep==1-tp and tc:IsControler(tp) and tc:IsRace(RACE_CYBERSE) and tc~=e:GetHandler() + local bc=eg:GetFirst() + return ep==1-tp and bc:IsControler(tp) and bc:IsRace(RACE_CYBERSE) and bc~=e:GetHandler() end function s.spfilter(c,e,tp) - return c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLinkMonster() 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 @@ -72,23 +77,8 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end 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) + 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 -function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then - local c=e:GetHandler() - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end -function s.repval(e,c) - return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c69655484.lua b/official/c69655484.lua index b35e6fe453..ef1890e063 100644 --- a/official/c69655484.lua +++ b/official/c69655484.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BECOME_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp,eg) return eg:IsContains(e:GetHandler()) end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.edsptg) e1:SetOperation(s.edspop) c:RegisterEffect(e1) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.AND(Cost.Detach(1),s.thcost)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -63,10 +63,7 @@ function s.thcostfilter(c) return c:IsSetCard(SET_PERFORMAGE) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_DECK,0,1,nil) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) @@ -100,4 +97,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) 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/c80117527.lua b/official/c80117527.lua index c1a47c4a40..a2d557ead7 100644 --- a/official/c80117527.lua +++ b/official/c80117527.lua @@ -2,44 +2,45 @@ --Number 11: Big Eye local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,2) c:EnableReviveLimit() - --attack up + --Xyz Summon: 2 Level 7 monsters + Xyz.AddProcedure(c,nil,7,2) + --Take control of 1 monster your opponent controls local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCountLimit(1) + e1:SetCost(Cost.AND(Cost.Detach(1),s.ctrlcost)) + e1:SetTarget(s.ctrltg) + e1:SetOperation(s.ctrlop) c:RegisterEffect(e1) end s.xyz_number=11 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetAttackAnnouncedCount()==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) +function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:GetAttackAnnouncedCount()==0 end + --This card cannot attack the turn this effect is activated + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) - e:GetHandler():RegisterEffect(e1) + c:RegisterEffect(e1) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControlerCanBeChanged() end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file From d7d23fff60ad51c9d88fe0cb7e83ebc881af759a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:29:04 +0300 Subject: [PATCH 052/165] Added "Cost.HintSelectedEffect" --- utility.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utility.lua b/utility.lua index 9676a5c4d6..d9066df765 100644 --- a/utility.lua +++ b/utility.lua @@ -1509,6 +1509,12 @@ self_discard_costs[Cost.SelfDiscardToGrave]=true Cost.SelfRelease=Cost.SelfTribute Auxiliary.bfgcost=Cost.SelfBanish + +function Cost.HintSelectedEffect(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) +end + function Cost.Discard(filter,other,count) count=count or 1 filter=filter and aux.AND(filter,Card.IsDiscardable) or Card.IsDiscardable From c8e270aa3195de148d6f7a0982c5a6dd4882d67c Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 7 Jul 2025 14:00:48 +0300 Subject: [PATCH 053/165] More Xyz updates --- official/c18326736.lua | 80 ++++++++++++++--------------------- official/c19891310.lua | 82 ++++++++++++++++-------------------- official/c39030163.lua | 68 ++++++++++++++---------------- official/c44311445.lua | 47 ++++++++++----------- official/c54366836.lua | 47 +++++++-------------- official/c5530780.lua | 82 +++++++++++++++--------------------- official/c56832966.lua | 69 +++++++++++++++---------------- official/c59627393.lua | 94 +++++++++++++++--------------------------- 8 files changed, 236 insertions(+), 333 deletions(-) diff --git a/official/c18326736.lua b/official/c18326736.lua index ace1f31edb..57454fddba 100644 --- a/official/c18326736.lua +++ b/official/c18326736.lua @@ -2,108 +2,92 @@ --Tellarknight Ptolemaeus local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) c:EnableReviveLimit() - --spsummon + --Xyz Summon procedure: 2+ Level 4 monsters + Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) + --Special Summon from your Extra Deck, 1 Xyz Monster that is 1 Rank higher than this card, except a "Number" monster, by using this face-up card you control as material local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.spcost) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(Cost.AND(Cost.Detach(3),Cost.HintSelectedEffect)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) - --turn skip + --Skip your opponent's next turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.skipcost) - e2:SetTarget(s.skiptg) + e2:SetCost(Cost.AND(Cost.Detach(7),Cost.HintSelectedEffect)) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end end) e2:SetOperation(s.skipop) c:RegisterEffect(e2) - --material + --Attach 1 "Stellarknight" card from your Extra Deck to this card as material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetTarget(s.mttg) - e3:SetOperation(s.mtop) + e3:SetTarget(s.attachtg) + e3:SetOperation(s.attachop) c:RegisterEffect(e3) end s.listed_series={SET_NUMBER,SET_STELLARKNIGHT} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,3,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,3,3,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) -end -function s.filter(c,e,tp,rk,pg) - return c:IsRank(rk+1) and not c:IsSetCard(SET_NUMBER) and e:GetHandler():IsCanBeXyzMaterial(c,tp) - and (#pg<=0 or pg:IsContains(e:GetHandler())) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 +function s.spfilter(c,e,tp,mc,rk) + return c:IsRank(rk+1) and not c:IsSetCard(SET_NUMBER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(e:GetHandler()),tp,nil,nil,REASON_XYZ) - return #pg<=1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank(),pg) + local c=e:GetHandler() + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end + if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp)) then return end local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if not (#pg<=0 or (#pg==1 and pg:IsContains(c))) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank(),pg) - local sc=g:GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,c:GetRank()):GetFirst() if sc then sc:SetMaterial(c) Duel.Overlay(sc,c) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) + if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end sc:CompleteProcedure() end end -function s.skipcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,7,REASON_COST) end - c:RemoveOverlayCard(tp,7,7,REASON_COST) -end -function s.skiptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end -end function s.skipop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_SKIP_TURN) e1:SetTargetRange(0,1) + e1:SetCondition(function(e) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() end) e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) - e1:SetCondition(s.skipcon) Duel.RegisterEffect(e1,tp) end -function s.skipcon(e) - return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() +function s.attachfilter(c,xyz,tp) + return c:IsSetCard(SET_STELLARKNIGHT) and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) end -function s.mtfilter(c) - return c:IsSetCard(SET_STELLARKNIGHT) +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),tp) end end -function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_EXTRA,0,1,nil) end -end -function s.mtop(e,tp,eg,ep,ev,re,r,rp) +function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.Overlay(c,g) end -end +end \ No newline at end of file diff --git a/official/c19891310.lua b/official/c19891310.lua index 281af953ad..2f67cfb30c 100644 --- a/official/c19891310.lua +++ b/official/c19891310.lua @@ -1,80 +1,70 @@ ---ギアギアギア XG +--ギアギアギア XG --Geargiagear Gigant XG local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,3) c:EnableReviveLimit() - --negate + --Xyz Summon procedure: 3 Level 3 monsters + Xyz.AddProcedure(c,nil,3,3) + --Until the end of the Damage Step, negate the effects of all face-up cards your opponent currently controls, also your opponent cannot activate cards or effects local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetOperation(s.operation) + e1:SetHintTiming(TIMING_ATTACK|TIMING_BATTLE_PHASE) + e1:SetCondition(s.discon) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle)) + e1:SetOperation(s.disop) c:RegisterEffect(e1) - --add to hand + --Add 1 other "Geargia" 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_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(s.thcon) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_series={SET_GEARGIA} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local bt=Duel.GetAttacker() - if bt and bt:IsControler(tp) then return bt:IsRace(RACE_MACHINE) end - bt=Duel.GetAttackTarget() - return bt and bt:IsControler(tp) and bt:IsRace(RACE_MACHINE) +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetBattleMonster(tp) + return bc and bc:IsRace(RACE_MACHINE) and bc:IsFaceup() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + for nc in g:Iter() do + --Negate the effects of all face-up cards your opponent currently controls until the end of the Damage Step + nc:NegateEffects(c,RESET_PHASE|PHASE_DAMAGE,true) + end + --Also, your opponent cannot activate cards or effects until the end of the Damage Step + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(0,LOCATION_ONFIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(0,1) + e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetTargetRange(0,1) - e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE|PHASE_DAMAGE) - Duel.RegisterEffect(e2,tp) -end -function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect() -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) return c:IsSetCard(SET_GEARGIA) 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) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) + 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 and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c39030163.lua b/official/c39030163.lua index 8d649131fe..01773babb5 100644 --- a/official/c39030163.lua +++ b/official/c39030163.lua @@ -1,75 +1,69 @@ ---ギャラクシーアイズ FA・フォトン・ドラゴン +--ギャラクシーアイズ FA・フォトン・ドラゴン --Galaxy-Eyes Full Armor Photon Dragon local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,8,3,s.ovfilter,aux.Stringid(id,0)) c:EnableReviveLimit() - --attach material + --Xyz Summon procedure: 3 Level 8 monsters OR 1 "Galaxy-Eyes" Xyz Monster you control, except "Galaxy-Eyes Full Armor Photon Dragon" + Xyz.AddProcedure(c,nil,8,3,s.ovfilter,aux.Stringid(id,0)) + --Attach up to 2 Equip Cards equipped to this card to this card as material local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.mtcost) - e1:SetTarget(s.mttg) - e1:SetOperation(s.mtop) + e1:SetCost(Cost.HintSelectedEffect) + e1:SetTarget(s.attachtg) + e1:SetOperation(s.attachop) c:RegisterEffect(e1) - --destroy + --Destroy 1 face-up card your opponent controls local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.AND(Cost.Detach(1),Cost.HintSelectedEffect)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end +s.listed_names={id} +s.listed_series={SET_GALAXY_EYES} function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) + return c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) and c:IsFaceup() end -function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) +function s.attachfilter(c,xyzc,e,tp) + return c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) and c:IsCanBeEffectTarget(e) end -function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetHandler():GetEquipGroup() - if chkc then return g:IsContains(chkc) and chkc:IsCanBeEffectTarget(e) end - if chk==0 then return g:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local tg=g:FilterSelect(tp,Card.IsCanBeEffectTarget,1,2,nil,e) +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local eqg=c:GetEquipGroup() + if chkc then return eqg:IsContains(chkc) and s.attachfilter(chkc,c,e,tp) end + if chk==0 then return eqg:IsExists(s.attachfilter,1,nil,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tg=eqg:FilterSelect(tp,s.attachfilter,1,2,nil,c,e,tp) Duel.SetTargetCard(tg) end -function s.mtfilter(c,e) - return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) -end -function s.mtop(e,tp,eg,ep,ev,re,r,rp) +function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.mtfilter,nil,e) - if #g>0 then - Duel.Overlay(c,g) + if not c:IsRelateToEffect(e) then return end + local tg=Duel.GetTargetCards(e):Match(aux.NOT(Card.IsImmuneToEffect),nil,e) + if #tg>0 then + Duel.Overlay(c,tg) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44311445.lua b/official/c44311445.lua index 59ee344e73..2b261ffe8b 100644 --- a/official/c44311445.lua +++ b/official/c44311445.lua @@ -2,11 +2,12 @@ --Madolche Puddingcess Chocolat-a-la-Mode local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),5,2,s.ovfilter,aux.Stringid(id,0)) c:EnableReviveLimit() - --todeck + --xyz Summon procedure: 2 Level 5 EARTH monsters OR 1 Rank 4 or lower "Madolche" Xyz Monster you control + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),5,2,s.ovfilter,aux.Stringid(id,0)) + --Shuffle 1 "Madolche" card from your GY into the Deck local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -15,22 +16,24 @@ function s.initial_effect(c) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) - --spsummon + --Special Summon 1 "Madolche" monster from your Deck in Attack Position or face-down Defense Position local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_TO_DECK) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_series={SET_MADOLCHE} -s.listed_names={74641045} +s.listed_names={74641045} --"Madolche Puddingcess" function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsRankBelow(4) and c:IsSetCard(SET_MADOLCHE,lc,SUMMON_TYPE_XYZ,tp) + return c:IsRankBelow(4) and c:IsSetCard(SET_MADOLCHE,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() end function s.tdfilter(c) return c:IsSetCard(SET_MADOLCHE) and c:IsAbleToDeck() @@ -40,7 +43,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -48,18 +51,12 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -function s.cfilter(c,tp) - return c:IsSetCard(SET_MADOLCHE) and c:IsLocation(LOCATION_DECK) - and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_GRAVE) +function s.spconfilter(c,tp) + return c:IsSetCard(SET_MADOLCHE) and c:IsLocation(LOCATION_DECK) and c:IsPreviousControler(tp) + and c:IsPreviousLocation(LOCATION_GRAVE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,74641045) and eg:IsExists(s.cfilter,1,nil,tp) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) + return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,74641045) and eg:IsExists(s.spconfilter,1,nil,tp) end function s.spfilter(c,e,tp) return c:IsSetCard(SET_MADOLCHE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) @@ -72,11 +69,9 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 then - if tc:IsFacedown() then - Duel.ConfirmCards(1-tp,tc) - end + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)>0 + and sc:IsFacedown() then + Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c54366836.lua b/official/c54366836.lua index 89434e7c1d..9228ae60c9 100644 --- a/official/c54366836.lua +++ b/official/c54366836.lua @@ -1,46 +1,42 @@ ---No.54 反骨の闘士ライオンハート +--No.54 反骨の闘士ライオンハート --Number 54: Lion Heart local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,1,3) c:EnableReviveLimit() - --cannot be destroyed + --Xyz Summon procedure: 3 Level 1 monsters + Xyz.AddProcedure(c,nil,1,3) + --This Attack Position card cannot be destroyed by battle local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(s.indcon) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsAttackPos() end) e1:SetValue(1) c:RegisterEffect(e1) - --inflict damage + --Inflict damage to your opponent equal to the battle damage you took local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_BATTLE_DAMAGE) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.damcon) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==tp and e:GetHandler():IsRelateToBattle() end) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) - --change battle damage + --Your opponent takes any battle damage you would have taken from that battle local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetRange(LOCATION_MZONE) - e3:SetCondition(s.damcon2) - e3:SetCost(s.damcost2) - e3:SetOperation(s.damop2) + e3:SetCondition(function(e,tp) local bc=e:GetHandler():GetBattleTarget() return bc and bc:IsControler(1-tp) end) + e3:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle)) + e3:SetOperation(s.reversedamop) c:RegisterEffect(e3) end s.xyz_number=54 -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep==tp and c:IsRelateToBattle() -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -51,24 +47,13 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -function s.damcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil -end -function s.damcost2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(id)==0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) -end -function s.damop2(e,tp,eg,ep,ev,re,r,rp) +function s.reversedamop(e,tp,eg,ep,ev,re,r,rp) + --Your opponent takes any battle damage you would have taken from that battle local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e1,tp) -end -function s.indcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c5530780.lua b/official/c5530780.lua index 3b3a7b82d1..83690c0f57 100644 --- a/official/c5530780.lua +++ b/official/c5530780.lua @@ -4,96 +4,80 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --2 Level 4 monsters + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --Check materials on Xyz Summon + --Check if this card was Xyz Summoned by using an "Exosister" monster as material local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) - --Effect destruction immunity + --Cannot be destroyed by the activated effects of monsters Special Summoned from the GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) e1:SetValue(s.indval) c:RegisterEffect(e1) - --Negate + --Negate the effects of 1 Effect Monster your opponent controls until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e2:SetCondition(function(e) return e:GetHandler():GetFlagEffect(id)>0 end) - e2:SetTarget(s.ngtg) - e2:SetOperation(s.ngop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e2:SetCost(Cost.HintSelectedEffect) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) c:RegisterEffect(e2) - --Gain ATK + --Apply a "for the rest of this turn, all Xyz Monsters you control will gain 800 ATK" effect local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.AND(Cost.Detach(1),Cost.HintSelectedEffect)) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then - local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END - c:RegisterFlagEffect(id,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + if c:GetMaterial():IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END&~RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.indval(e,re,rp) local rc=re:GetHandler() - return rc:IsSpecialSummoned() and rc:IsSummonLocation(LOCATION_GRAVE) - and re:IsMonsterEffect() and re:IsActivated() + return rc:IsSpecialSummoned() and rc:IsSummonLocation(LOCATION_GRAVE) and re:IsMonsterEffect() and re:IsActivated() end -function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsNegatableMonster() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end +function s.disfilter(c) + return c:IsNegatableMonster() and c:IsType(TYPE_EFFECT) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local tg=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0) + local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end -function s.ngop(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local c=e:GetHandler() - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - --Negate targeted monster's effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) + if tc:IsRelateToEffect(e) then + --Negate its effects until the end of this turn + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) end end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - --Increase ATK - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --For the rest of this turn, all Xyz Monsters you control will gain 800 ATK + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) @@ -101,4 +85,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(800) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c56832966.lua b/official/c56832966.lua index 089e5364eb..5091ffd3b3 100644 --- a/official/c56832966.lua +++ b/official/c56832966.lua @@ -1,64 +1,61 @@ ---SNo.39 希望皇ホープ・ザ・ライトニング +--SNo.39 希望皇ホープ・ザ・ライトニング --Number S39: Utopia the Lightning local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,s.ovfilter,aux.Stringid(id,0)) c:EnableReviveLimit() - --cannot be Xyz material + --Xyz Summon procedure: 3 Level 5 LIGHT monsters OR 1 Rank 4 "Utopia" monster you control + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,s.ovfilter,aux.Stringid(id,0)) + --Cannot be used as material for an Xyz Summon + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e0:SetValue(1) + c:RegisterEffect(e0) + --If this card battles, your opponent cannot activate cards or effects until the end of the Damage Step local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + 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():IsRelateToBattle() end) e1:SetValue(1) c:RegisterEffect(e1) - --actlimit + --This card's ATK becomes 5000 during that damage calculation only local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetValue(1) - e2:SetCondition(s.actcon) + e2:SetCondition(s.atkcon) + e2:SetCost(Cost.AND(Cost.Detach(2),Cost.SoftOncePerBattle)) + e2:SetOperation(s.atkop) c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) end s.listed_series={SET_UTOPIA} s.xyz_number=39 function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==4 + return c:IsRank(4) and c:IsSetCard(SET_UTOPIA,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() end -function s.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() +function s.atkconfilter(c) + return c:IsSetCard(SET_UTOPIA) and c:IsType(TYPE_XYZ) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_UTOPIA) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,2,2,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) + local bc=c:GetBattleTarget() + return bc and bc:IsControler(1-tp) and c:GetOverlayGroup():IsExists(s.atkconfilter,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card's ATK becomes 5000 during that damage calculation only local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(5000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c59627393.lua b/official/c59627393.lua index ea00693eba..3e1ad17f44 100644 --- a/official/c59627393.lua +++ b/official/c59627393.lua @@ -2,75 +2,49 @@ --Number 105: Battlin' Boxer Star Cestus local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 3 Level 4 monsters Xyz.AddProcedure(c,nil,4,3) - --Make your battling "Battlin' Boxer" monster unable to be destroyed by battle and opponent takes the damage instead + --Negate the effects of that opponent's monster while it is face-up until the end of this turn, that monster you control cannot be destroyed by that battle, also your opponent takes any battle damage you would have taken from that battle local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetHintTiming(TIMING_ATTACK|TIMING_BATTLE_PHASE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(s.discon) + e1:SetCost(Cost.Detach(1)) + e1:SetOperation(s.disop) c:RegisterEffect(e1) end -s.listed_series={SET_BATTLIN_BOXER} s.xyz_number=105 -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return Duel.IsBattlePhase() and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(SET_BATTLIN_BOXER)) - or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(SET_BATTLIN_BOXER))) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_DAMAGE,0,1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetTargetCard(Duel.GetAttackTarget()) +s.listed_series={SET_BATTLIN_BOXER} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local bc1,bc2=Duel.GetBattleMonster(tp) + return bc1 and bc2 and bc1:IsSetCard(SET_BATTLIN_BOXER) and bc1:IsFaceup() end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if at:IsControler(tp) then a,at=at,a end - if a:IsFacedown() or not a:IsRelateToEffect(e) or not at:IsRelateToEffect(e) then return end - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3000) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_DAMAGE) - a:RegisterEffect(e1,true) - --Opponent takes the battle damage instead - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetDescription(3112) - e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e2:SetValue(1) - e2:SetReset(RESET_PHASE|PHASE_DAMAGE) - a:RegisterEffect(e2,true) - --Negate opponent's battling monster - if at:IsType(TYPE_EFFECT) then - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE) - e3:SetReset(RESETS_STANDARD_PHASE_END) - at:RegisterEffect(e3) - local e4=Effect.CreateEffect(e:GetHandler()) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DISABLE_EFFECT) - e4:SetReset(RESETS_STANDARD_PHASE_END) - at:RegisterEffect(e4) +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local bc1,bc2=Duel.GetBattleMonster(tp) + if bc2:IsRelateToBattle() and bc2:IsNegatableMonster() then + --Negate the effects of that opponent's monster while it is face-up until the end of this turn + bc2:NegateEffects(RESET_PHASE|PHASE_END) end -end + if bc1:IsRelateToBattle() then + --That monster you control cannot be destroyed by that battle + local e1=Effect.CreateEffect(e:GetHandler()) + 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_PHASE|PHASE_DAMAGE) + bc1:RegisterEffect(e1,true) + --Also your opponent takes any battle damage you would have taken from that battle + local e2=e1:Clone() + e2:SetDescription(3112) + e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) + bc1:RegisterEffect(e2,true) + end +end \ No newline at end of file From 263cdbef0346d13de1fb3792696eb0aa8bcd78e1 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 22:49:49 +0800 Subject: [PATCH 054/165] update "Number 46: Dragluon" --- official/c2978414.lua | 127 ++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 74 deletions(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index d9b23d3cb8..28f277a807 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -1,96 +1,75 @@ ---No.46 神影龍ドラッグルーオン +--No.46 神影龍ドラッグルーオン --Number 46: Dragluon local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),8,2) c:EnableReviveLimit() - --spsummon + --Xyz Summon procedure: 2 Level 8 Dragon-Type monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),8,2) + --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) + e1:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) - e2:SetTarget(s.cttg) - e2:SetOperation(s.ctop) - c:RegisterEffect(e2) - --effect limit - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e3:SetCondition(s.condition) - e3:SetCost(s.cost) - e3:SetOperation(s.efop) - c:RegisterEffect(e3) end s.xyz_number=46 -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end function s.ctfilter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged() end -function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function s.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.GetControl(tc,tp) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return e:GetLabel()==2 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctfilter(chkc) end + if chk==0 then return true end + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + local b2=Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {true,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + elseif op==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) end end -function s.efop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetTarget(s.actfilter) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) - Duel.RegisterEffect(e1,tp) -end -function s.actfilter(e,c) - return c:IsRace(RACE_DRAGON) +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 Dragon-Type monster from your hand + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --Target 1 Dragon-Type monster your opponent controls; take control of that target + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.GetControl(tc,tp) + end + elseif op==3 then + local c=e:GetHandler() + --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetTarget(function(e,c) return c:IsRace(RACE_DRAGON) end) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) + Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,4)) + end end From 1504526ff17071f5ec10a2f017d1b92d4e7b7f0a Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:04:09 +0800 Subject: [PATCH 055/165] Update c2978414.lua --- official/c2978414.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/official/c2978414.lua b/official/c2978414.lua index 28f277a807..5730ebbec0 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -36,9 +36,11 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) {b2,aux.Stringid(id,2)}, {true,aux.Stringid(id,3)}) e:SetLabel(op) + e:SetProperty(0) if op==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) elseif op==2 then + e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) @@ -60,6 +62,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end + e:SetProperty(0) elseif op==3 then local c=e:GetHandler() --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn From 0f0141b7c02978aa664b507677f99e631b86f87b Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:46:09 +0800 Subject: [PATCH 056/165] Update c2978414.lua --- official/c2978414.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 5730ebbec0..565ab89033 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) + e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) From 275e8d5f2acdf7cbd401e1166141918169158054 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:47:46 +0800 Subject: [PATCH 057/165] update "Number 87: Queen of the Night" --- official/c89516305.lua | 160 ++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 91 deletions(-) diff --git a/official/c89516305.lua b/official/c89516305.lua index 212cdf1fd9..08914df462 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -1,111 +1,89 @@ ---No.87 雪月花美神クイーン・オブ・ナイツ +--No.87 雪月花美神クイーン・オブ・ナイツ --Number 87: Queen of the Night local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,8,3) c:EnableReviveLimit() - --s/t + --Xyz Summon procedure: 3 Level 8 monsters + Xyz.AddProcedure(c,nil,8,3) + --Ativate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(s.cost) - e1:SetTarget(s.sttg) - e1:SetOperation(s.stop) + e1:SetCountLimit(1) + e1:SetHintTiming(TIMING_DAMAGE_STEP) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(s.cost) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetCondition(aux.StatChangeDamageStepCondition) - e3:SetCost(s.cost) - e3:SetTarget(s.atktg) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) end s.xyz_number=87 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function s.sttg(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,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,e:GetHandler()) -end -function s.stop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - e1:SetCondition(s.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function s.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end function s.setfilter(c) return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsCanTurnSet() end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local op=e:GetLabel() + if op==1 then + return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() + elseif op==2 then + return chkc:IsLocation(LOCATION_MZONE) and s.setfilter(chkc) + elseif op==3 then + return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() + end + end + local not_dmg_step=Duel.GetCurrentPhase()~=PHASE_DAMAGE + local b1=not_dmg_step and Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) + local b2=not_dmg_step and Duel.IsExistingTarget(s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b3=aux.StatChangeDamageStepCondition(e,tp,eg,ep,ev,re,r,rp) + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) + Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil) + elseif op==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) + elseif op==3 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(300) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) + if not tc:IsRelateToEffect(e) then return end + local c=e:GetHandler() + local op=e:GetLabel() + if op==1 then + --Target 1 Set Spell/Trap your opponent controls; while this card is face-up on the field, that Set card cannot be activated + if c:IsRelateToEffect(e) and tc:IsFacedown() then + c:SetCardTarget(tc) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetCondition(function(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + elseif op==2 then + --Target 1 Plant monster on the field; change that target to face-down Defense Position + if tc:IsFaceup() then + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end + elseif op==3 then + --Target 1 face-up monster on the field; that target gains 300 ATK + if tc:IsFaceup() then + tc:UpdateAttack(300,nil,c) + end end end From 2286dfdcf08dcad3023b8ab468b2971222da9f78 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 8 Jul 2025 00:04:00 +0800 Subject: [PATCH 058/165] update "Number 91: Thunder Spark Dragon" --- official/c84417082.lua | 69 +++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/official/c84417082.lua b/official/c84417082.lua index 5776d72154..14fe7cb5a6 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -1,59 +1,44 @@ ---No.91 サンダー・スパーク・ドラゴン +--No.91 サンダー・スパーク・ドラゴン --Number 91: Thunder Spark Dragon local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,3) c:EnableReviveLimit() - --destroy1 + --Xyz Summon procedure: 3 Level 4 monsters + Xyz.AddProcedure(c,nil,4,3) + --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(s.cost1) - e1:SetTarget(s.target1) - e1:SetOperation(s.operation1) + e1:SetCountLimit(1) + e1:SetCost(Cost.Choice( + {Cost.Detach(3),aux.Stringid(id,1),s.desmonscheck}, + {Cost.Detach(5),aux.Stringid(id,2),s.desallcheck} + )) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) c:RegisterEffect(e1) - --destroy2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(s.cost2) - e2:SetTarget(s.target2) - e2:SetOperation(s.operation2) - c:RegisterEffect(e2) end s.xyz_number=91 -function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) -end -function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) -end -function s.operation1(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) +function s.desmonscheck(e,tp,eg,ep,ev,re,r,rp,chk) + return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end -function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,5,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,5,5,REASON_COST) +function s.desallcheck(e,tp,eg,ep,ev,re,r,rp,chk) + return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end -function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=e:GetLabel()==1 + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) + or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end -function s.operation2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=e:GetLabel()==1 + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) + or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end end From 4815f62dde3904473512ea6fa7d9c9db8dbb5a9b Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 8 Jul 2025 00:16:02 +0800 Subject: [PATCH 059/165] update "Evolzar Lars" --- official/c35103106.lua | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/official/c35103106.lua b/official/c35103106.lua index 5dd13fdedf..ab5e43d6bc 100644 --- a/official/c35103106.lua +++ b/official/c35103106.lua @@ -4,13 +4,13 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2 Level 6 monsters Xyz.AddProcedure(c,nil,6,2) - --Cannot be targeted by opponent's monsters effects while it has material + --While this card has material, your opponent cannot target it with monster effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) e1:SetValue(function(e,re,rp) return rp==1-e:GetHandlerPlayer() and re:IsMonsterEffect() end) @@ -24,17 +24,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(_,tp,_,_,_,_,_,rp) return rp==1-tp end) - e2:SetCost(s.negcost) + e2:SetCost(Cost.Detach(s.negcostmin,2)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=c:GetOverlayGroup() - local ct=#g==g:FilterCount(Card.IsRace,nil,RACE_REPTILE|RACE_DINOSAUR) and 1 or 2 - if chk==0 then return c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,2,REASON_COST) +function s.negcostmin(e,tp,eg,ep,ev,re,r,rp,chk) + local g=e:GetHandler():GetOverlayGroup() + return #g==g:FilterCount(Card.IsRace,nil,RACE_REPTILE|RACE_DINOSAUR) and 1 or 2 end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end @@ -46,23 +43,6 @@ end function s.negop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local c=e:GetHandler() - --Negate its effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=e1:Clone() - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - tc:RegisterEffect(e3) - end + tc:NegateEffects(e:GetHandler(),nil,true) end -end \ No newline at end of file +end From fffee0504af36637bdd16ee8ad7a2fa70ca49c7b Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 8 Jul 2025 00:21:58 +0800 Subject: [PATCH 060/165] add missing categories --- official/c2978414.lua | 5 +++-- official/c89516305.lua | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 565ab89033..2946c79bc9 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -8,7 +8,6 @@ function s.initial_effect(c) --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) @@ -36,10 +35,13 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) {b2,aux.Stringid(id,2)}, {true,aux.Stringid(id,3)}) e:SetLabel(op) + e:SetCategory(0) e:SetProperty(0) if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) elseif op==2 then + e:SetCategory(CATEGORY_CONTROL) e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) @@ -62,7 +64,6 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end - e:SetProperty(0) elseif op==3 then local c=e:GetHandler() --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn diff --git a/official/c89516305.lua b/official/c89516305.lua index 08914df462..0713c0f2b9 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -45,14 +45,17 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) {b2,aux.Stringid(id,2)}, {b3,aux.Stringid(id,3)}) e:SetLabel(op) + e:SetCategory(0) if op==1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil) elseif op==2 then + e:SetCategory(CATEGORY_POSITION) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) elseif op==3 then + e:SetCategory(CATEGORY_ATKCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end From 0871420d7b601fd37fb6d135406f9f4fe8518199 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 8 Jul 2025 01:06:10 +0300 Subject: [PATCH 061/165] Added new card constants CARD_JUNK_SYNCHRON = 63977008 CARD_JUNK_WARRIOR = 60800381 --- card_counter_constants.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/card_counter_constants.lua b/card_counter_constants.lua index 3faece4255..19f4d7f9dc 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -46,6 +46,8 @@ CARD_HARPIE_LADY_SISTERS = 12206212 CARD_INFERNOBLE_CHARLES = 77656797 CARD_JACK_KNIGHT = 90876561 CARD_JINZO = 77585513 +CARD_JUNK_SYNCHRON = 63977008 +CARD_JUNK_WARRIOR = 60800381 CARD_KAZEJIN = 62340868 CARD_KING_KNIGHT = 64788463 CARD_KING_SARCOPHAGUS = 16528181 From 46e37cd3426fe578e01f3ad7257145418f590d2a Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 8 Jul 2025 17:07:26 +0800 Subject: [PATCH 062/165] Update archetype_setcode_constants.lua --- archetype_setcode_constants.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index 6cc7fd3a60..e0b86665ea 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -596,3 +596,5 @@ SET_ARTMEGIA = 0x1c7 SET_DOOM_KING = 0x1c8 SET_MAGNIFISTORM = 0x1c9 SET_RB = 0x1ca +SET_DOOM_Z = 0x1cb + From b368e5523b62e2b506c17cee90010cb18252e56e Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:27:15 +0300 Subject: [PATCH 063/165] Added new card scripts --- pre-release/c100200277.lua | 81 +++++++++++++++++++++++++++ pre-release/c100348001.lua | 47 ++++++++++++++++ pre-release/c100348002.lua | 48 ++++++++++++++++ pre-release/c100348005.lua | 87 ++++++++++++++++++++++++++++ pre-release/c100348032.lua | 112 +++++++++++++++++++++++++++++++++++++ 5 files changed, 375 insertions(+) create mode 100644 pre-release/c100200277.lua create mode 100644 pre-release/c100348001.lua create mode 100644 pre-release/c100348002.lua create mode 100644 pre-release/c100348005.lua create mode 100644 pre-release/c100348032.lua diff --git a/pre-release/c100200277.lua b/pre-release/c100200277.lua new file mode 100644 index 0000000000..65c6173297 --- /dev/null +++ b/pre-release/c100200277.lua @@ -0,0 +1,81 @@ +--熒焅聖 アレクゥス +--Alekus the Shining Stunner Saint +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If you control a face-up card in your Spell & Trap Zone, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy both 1 face-up Spell/Trap you control and this card, then draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Attach this card to 1 Xyz Monster you control + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.attachtg) + e3:SetOperation(s.attachop) + c:RegisterEffect(e3) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_STZONE,0,1,nil) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsSpellTrap() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsPlayerCanDraw(tp,1) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+e:GetHandler(),2,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Destroy(Group.FromCards(c,tc),REASON_EFFECT)==2 + and Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end +end +function s.attachfilter(c,mc,tp) + return c:IsType(TYPE_XYZ) and c:IsFaceup() and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.attachfilter(chkc,c,tp) end + if chk==0 then return Duel.IsExistingTarget(s.attachfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.attachfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp) + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then + Duel.Overlay(tc,c) + end +end \ No newline at end of file diff --git a/pre-release/c100348001.lua b/pre-release/c100348001.lua new file mode 100644 index 0000000000..dd8bebde38 --- /dev/null +++ b/pre-release/c100348001.lua @@ -0,0 +1,47 @@ +--フルスピード・ウォリアー +--Fullspeed Warrior +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Junk Synchron" or 1 Spell/Trap that mentions "Junk Warrior" from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Monsters you control that mention "Junk Warrior", and Synchro Monsters you control with "Warrior" in their original names, gain 900 ATK during your Battle Phase only + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetCondition(function(e) return Duel.IsBattlePhase() and Duel.IsTurnPlayer(e:GetHandlerPlayer()) end) + e2:SetTarget(function(e,c) return c:ListsCode(CARD_JUNK_WARRIOR) or (c:IsType(TYPE_SYNCHRO) and c:IsOriginalSetCard(SET_WARRIOR)) end) + e2:SetValue(900) + c:RegisterEffect(e2) +end +s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR} +s.listed_series={SET_WARRIOR} +function s.thfilter(c) + return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsSpellTrap() and c:ListsCode(CARD_JUNK_WARRIOR))) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c100348002.lua b/pre-release/c100348002.lua new file mode 100644 index 0000000000..d9f0f2da51 --- /dev/null +++ b/pre-release/c100348002.lua @@ -0,0 +1,48 @@ +--アンカーボルト・ヘッジホッグ +--Anchorbolt Hedgehog +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_JUNK_WARRIOR,id} +function s.spconfilter(c) + return (c:IsCode(CARD_JUNK_WARRIOR) or c:ListsCode(CARD_JUNK_WARRIOR)) and not c:IsCode(id) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100348005.lua b/pre-release/c100348005.lua new file mode 100644 index 0000000000..e562622c48 --- /dev/null +++ b/pre-release/c100348005.lua @@ -0,0 +1,87 @@ +--シンクロ・フェローズ +--Synchro Fellows +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Junk Synchron", and 1 monster that mentions "Junk Warrior" or "Stardust Dragon", from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Decrease the Level of 1 Synchro Monster you control by 1 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(function(e,tp) return Duel.IsPlayerCanAdditionalSummon(tp) end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON} +s.listed_series={SET_SYNCHRON} +function s.thfilter(c) + return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsMonster() and c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON))) and c:IsAbleToHand() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsCode,1,nil,CARD_JUNK_SYNCHRON) and sg:IsExists(Card.ListsCode,1,nil,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end +end +function s.lvfilter(c) + return c:IsType(TYPE_SYNCHRO) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsPlayerCanSummon(tp) + and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Decrease its Level by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(-1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --You can Normal Summon 1 "Synchron" monster during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYNCHRON)) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/pre-release/c100348032.lua b/pre-release/c100348032.lua new file mode 100644 index 0000000000..eccd2eb38e --- /dev/null +++ b/pre-release/c100348032.lua @@ -0,0 +1,112 @@ +--ジャンク・ウォリアー・エクストリーム +--Junk Warrior Extreme +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: "Junk Synchron" + 1+ non-Tuner monsters + Synchro.AddProcedure(c,s.tunerfilter,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon as many Level 2 or lower monsters from your GY as possible + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.gysptg) + e1:SetOperation(s.gyspop) + c:RegisterEffect(e1) + --Special Summon 1 "Junk" Synchro Monster from your Extra Deck (this is treated as a Synchro Summon) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.bdocon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.exsptg) + e2:SetOperation(s.exspop) + c:RegisterEffect(e2) +end +s.material={CARD_JUNK_SYNCHRON} +s.listed_names={CARD_JUNK_SYNCHRON} +s.listed_series={SET_JUNK} +s.material_setcode=SET_SYNCHRON +function s.tunerfilter(c,lc,stype,tp) + return c:IsSummonCode(lc,stype,tp,CARD_JUNK_SYNCHRON) or c:IsHasEffect(20932152) +end +function s.gyspfilter(c,e,tp) + return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft>0 then + local g=Duel.GetMatchingGroup(s.gyspfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + ft=math.min(ft,#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + local og=Duel.GetOperatedGroup() + for sc in og:Iter() do + --They cannot activate their effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3302) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + end + end + --You can only Special Summon once for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,tp) return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)-e:GetLabel()>=1 end) + e1:SetLabel(Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_LEFT_SPSUMMON_COUNT) + e2:SetValue(s.countval) + Duel.RegisterEffect(e2,tp) +end +function s.countval(e,re,tp) + local label=e:GetLabel() + local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON) + if sp-label>=1 then + return 0 + else + return 1-sp+label + end +end +function s.exspfilter(c,e,tp,mc) + local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) + return #pg<=0 and c:IsSetCard(SET_JUNK) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.exsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.exspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end +end \ No newline at end of file From 46d1a3f0d222c1f98a45f9bfe26de8b50b405115 Mon Sep 17 00:00:00 2001 From: Naim Date: Tue, 8 Jul 2025 13:07:56 -0300 Subject: [PATCH 064/165] "Synchro Fellows" update - It should not be able to target a level 1 monster - the player should only gain the additional Normal Summon if the monster had its level decreased --- pre-release/c100348005.lua | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pre-release/c100348005.lua b/pre-release/c100348005.lua index e562622c48..23e979b7a2 100644 --- a/pre-release/c100348005.lua +++ b/pre-release/c100348005.lua @@ -52,7 +52,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.lvfilter(c) - return c:IsType(TYPE_SYNCHRO) and c:HasLevel() and c:IsFaceup() + return c:IsType(TYPE_SYNCHRO) and c:HasLevel() and c:IsLevelAbove(2) and c:IsFaceup() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end @@ -65,7 +65,7 @@ end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelAbove(2) and not tc:IsImmuneToEffect(e) then --Decrease its Level by 1 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -74,14 +74,15 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(-1) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) + Duel.BreakEffect() + --You can Normal Summon 1 "Synchron" monster during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYNCHRON)) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) end - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --You can Normal Summon 1 "Synchron" monster during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYNCHRON)) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) end \ No newline at end of file From 8513a4e0bf5f8cec549e493c5e63df2b584f02fc Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 8 Jul 2025 20:13:15 +0300 Subject: [PATCH 065/165] Added new card scripts --- pre-release/c101302008.lua | 82 ++++++++++++++++++++++++++ pre-release/c101302009.lua | 72 +++++++++++++++++++++++ pre-release/c101302010.lua | 68 ++++++++++++++++++++++ pre-release/c101302011.lua | 98 +++++++++++++++++++++++++++++++ pre-release/c101302044.lua | 95 ++++++++++++++++++++++++++++++ pre-release/c101302045.lua | 87 ++++++++++++++++++++++++++++ pre-release/c101302046.lua | 79 +++++++++++++++++++++++++ pre-release/c101302057.lua | 94 ++++++++++++++++++++++++++++++ pre-release/c101302058.lua | 115 +++++++++++++++++++++++++++++++++++++ pre-release/c101302059.lua | 72 +++++++++++++++++++++++ pre-release/c101302060.lua | 87 ++++++++++++++++++++++++++++ pre-release/c101302074.lua | 96 +++++++++++++++++++++++++++++++ pre-release/c101302075.lua | 95 ++++++++++++++++++++++++++++++ 13 files changed, 1140 insertions(+) create mode 100644 pre-release/c101302008.lua create mode 100644 pre-release/c101302009.lua create mode 100644 pre-release/c101302010.lua create mode 100644 pre-release/c101302011.lua create mode 100644 pre-release/c101302044.lua create mode 100644 pre-release/c101302045.lua create mode 100644 pre-release/c101302046.lua create mode 100644 pre-release/c101302057.lua create mode 100644 pre-release/c101302058.lua create mode 100644 pre-release/c101302059.lua create mode 100644 pre-release/c101302060.lua create mode 100644 pre-release/c101302074.lua create mode 100644 pre-release/c101302075.lua diff --git a/pre-release/c101302008.lua b/pre-release/c101302008.lua new file mode 100644 index 0000000000..95a23f9ef8 --- /dev/null +++ b/pre-release/c101302008.lua @@ -0,0 +1,82 @@ +--終刻竜機ⅩⅡ-ドラスティア +--Doom-Z Zero - Drastia +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Destroy 1 "Doom-Z" card you control, and if you do, Special Summon this card from the hand then you can equip 1 Equip Spell from your Deck to it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.desfilter(c,tp) + return c:IsSetCard(SET_DOOM_Z) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) +end +function s.eqsfilter(c,tp,ec) + return c:IsEquipSpell() and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) + and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_DECK,0,1,nil,tp,c) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local eqc=Duel.SelectMatchingCard(tp,s.eqsfilter,tp,LOCATION_DECK,0,1,1,nil,tp,c):GetFirst() + if eqc then + Duel.BreakEffect() + Duel.Equip(tp,eqc,c) + end + end +end +function s.spfilter(c,e,tp,lv) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + Duel.Overlay(sc,c+c:GetEquipGroup(),true) + end +end \ No newline at end of file diff --git a/pre-release/c101302009.lua b/pre-release/c101302009.lua new file mode 100644 index 0000000000..d6e8688e37 --- /dev/null +++ b/pre-release/c101302009.lua @@ -0,0 +1,72 @@ +--終刻竜機Ⅴ-アマルテ +--Doom-Z Five - Amalthe +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Doom-Z" monster from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EVENT_DESTROYED) + e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + c:RegisterEffect(e1c) + --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp,lv) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + Duel.Overlay(sc,c+c:GetEquipGroup(),true) + end +end \ No newline at end of file diff --git a/pre-release/c101302010.lua b/pre-release/c101302010.lua new file mode 100644 index 0000000000..c39f015e47 --- /dev/null +++ b/pre-release/c101302010.lua @@ -0,0 +1,68 @@ +--終刻竜機Ⅶ-エララ +--Doom-Z Seven - Elara +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Set 1 "Doom-Z" Spell/Trap directly from your Deck + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.settg) + e1a:SetOperation(s.setop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EVENT_DESTROYED) + e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + c:RegisterEffect(e1c) + --Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.setfilter(c) + return c:IsSetCard(SET_DOOM_Z) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end +function s.spfilter(c,e,tp,lv) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + Duel.Overlay(sc,c+c:GetEquipGroup(),true) + end +end \ No newline at end of file diff --git a/pre-release/c101302011.lua b/pre-release/c101302011.lua new file mode 100644 index 0000000000..94fc2ca5b1 --- /dev/null +++ b/pre-release/c101302011.lua @@ -0,0 +1,98 @@ +--獄神機Doom-Z +--Power Patron Machine Doom-Z +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You cannot Special Summon from the Extra Deck, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) + c:RegisterEffect(e1) + aux.addContinuousLizardCheck(c,LOCATION_MZONE,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) + --Special Summon from your Extra Deck, 1 "Doom-Z" Xyz Monster or "Jupiter the Power Patron of Destruction" by using another Effect monster as material + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Doom-Z" card from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DOOM_Z} +s.listed_names={101302044} --"Jupiter the Power Patron of Destruction" +function s.xyzmatfilter(c,e,tp) + local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return #mustg<=1 and c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetLevel(),mustg) +end +function s.spfilter(c,e,tp,mc,lv,mustg) + return c:IsType(TYPE_XYZ) and (c:IsSetCard(SET_DOOM_Z) or c:IsCode(101302044)) + and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) + and (#mustg<=0 or mustg:IsContains(mc)) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc~=c and s.xyzmatfilter(chkc,e,tp)end + if chk==0 then return Duel.IsExistingTarget(s.xyzmatfilter,tp,LOCATION_MZONE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzmatfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,LOCATION_MZONE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and not tc:IsImmuneToEffect(e)) then return end + local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetLevel(),mustg):GetFirst() + if sc then + sc:SetMaterial(tc) + Duel.Overlay(sc,tc) + if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end + sc:CompleteProcedure() + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Equip(tp,c,sc) then + --Equip limit + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_DOOM_Z) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101302044.lua b/pre-release/c101302044.lua new file mode 100644 index 0000000000..8643b097ff --- /dev/null +++ b/pre-release/c101302044.lua @@ -0,0 +1,95 @@ +--壊獄神ユピテル +--Jupiter the Power Patron of Destruction +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 10 monsters + Xyz.AddProcedure(c,nil,10,3,function(c) return c:GetEquipCount()>=3 end,aux.Stringid(id,0),3,s.altprocop) + --You can equip any number of appropriate Equip Spells from your GY to this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(s.eqtg) + e1:SetOperation(s.eqop) + c:RegisterEffect(e1) + --Gains 3000 ATK while it has an Xyz Monster as material + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) end) + e2:SetValue(3000) + c:RegisterEffect(e2) + --Special Summon 1 "Doom-Z" monster from your GY, then you can destroy 1 card on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCost(Cost.Detach(1)) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={id} +s.listed_series={SET_DOOM_Z} +function s.altprocop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.eqfilter(c,tp,ec) + return c:IsEquipSpell() and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_GRAVE) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFacedown() or not c:IsRelateToEffect(e) then return end + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft==0 then return end + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,nil,tp,c) + if #g==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local sg=g:Select(tp,1,math.min(ft,#g),nil) + if #sg>0 then + for tc in sg:Iter() do + Duel.Equip(tp,tc,c,true,true) + end + Duel.EquipComplete() + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DOOM_Z) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101302045.lua b/pre-release/c101302045.lua new file mode 100644 index 0000000000..5b0733aca0 --- /dev/null +++ b/pre-release/c101302045.lua @@ -0,0 +1,87 @@ +--終刻龍機ⅩⅡ-ドラストリウス +--Doom-Z End - Drastrius +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 8 monsters + Xyz.AddProcedure(c,nil,8,3) + --The first time this card would be destroyed by battle each turn, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetValue(function(e,re,r) return (r&REASON_BATTLE|REASON_EFFECT)>0 end) + c:RegisterEffect(e1) + --You can equip 1 other face-up monster on the field to this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetTarget(s.eqtg) + e2:SetOperation(s.eqop) + c:RegisterEffect(e2) + aux.AddEREquipLimit(c,nil,aux.TRUE,Card.EquipByEffectAndLimitRegister,e2) + --Negate an opponent's monster effect activated on the field or in the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE+CATEGORY_EQUIP) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.discon) + e3:SetCost(Cost.Detach(1)) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) + aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsControler(1-tp) end,Card.EquipByEffectAndLimitRegister,e3) +end +s.listed_series={SET_DOOM_Z} +function s.eqfilter(c,tp) + return c:IsFaceup() and (c:IsControler(tp) or c:IsAbleToChangeControler()) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFacedown() or not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp):GetFirst() + if ec then + Duel.HintSelection(ec) + c:EquipByEffectAndLimitRegister(e,tp,ec) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp,chk) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_MZONE|LOCATION_GRAVE)>0 and Duel.IsChainDisablable(ev) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,1-tp,LOCATION_MZONE) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.NegateEffect(ev) then return end + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or c:IsFacedown() then return end + local g=Duel.GetMatchingGroup(s.eqfilter,tp,0,LOCATION_MZONE,c,tp) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=g:Select(tp,1,1,nil):GetFirst() + if ec then + Duel.HintSelection(ec) + Duel.BreakEffect() + c:EquipByEffectAndLimitRegister(e,tp,ec) + end +end \ No newline at end of file diff --git a/pre-release/c101302046.lua b/pre-release/c101302046.lua new file mode 100644 index 0000000000..ad84af1172 --- /dev/null +++ b/pre-release/c101302046.lua @@ -0,0 +1,79 @@ +--終刻獄徒 ディアクトロス +--Doom-Z Break Diactorus +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --You can destroy 1 "Doom-Z" card in your hand or face-up field, then you can destroy 1 monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --You can add to your hand, or send to the GY, 1 Equip Spell from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thtgcon) + e2:SetTarget(s.thtgtg) + e2:SetOperation(s.thtgop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MEDIUS_THE_INNOCENT} +s.listed_series={SET_DOOM_Z} +function s.desfilter(c) + return c:IsSetCard(SET_DOOM_Z) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_HAND|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 + and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end +function s.thtgconfilter(c) + return (c:IsSetCard(SET_DOOM_Z) and c:IsMonster()) or c:IsCode(CARD_MEDIUS_THE_INNOCENT) +end +function s.thtgcon(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetOverlayGroup():IsExists(s.thtgconfilter,1,nil) +end +function s.thtgfilter(c) + return c:IsEquipSpell() and (c:IsAbleToHand() or c:IsAbleToGrave()) +end +function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thtgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.thtgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local g=Duel.SelectMatchingCard(tp,s.thtgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + aux.ToHandOrElse(g,tp) + end +end \ No newline at end of file diff --git a/pre-release/c101302057.lua b/pre-release/c101302057.lua new file mode 100644 index 0000000000..a3de63f896 --- /dev/null +++ b/pre-release/c101302057.lua @@ -0,0 +1,94 @@ +--終刻撃針 +--Doom-Z Raider +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Destroy 1 other "Doom-Z" card in your hand or face-up field, then add to your hand, or Special Summon, 1 "Doom-Z" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.desthsptg) + e1:SetOperation(s.desthspop) + c:RegisterEffect(e1) + --Destroy 1 face-up monster on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.desfilter(c,e,tp) + if not (c:IsSetCard(SET_DOOM_Z) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))) then return false end + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) +end +function s.thspfilter(c,e,tp,exc) + return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() + and (c:IsAbleToHand() or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp,exc)>0)) +end +function s.desthsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.desthspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,e,tp) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc then + Duel.BreakEffect() + aux.ToHandOrElse(sc,tp, + function() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end, + aux.Stringid(id,3) + ) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302058.lua b/pre-release/c101302058.lua new file mode 100644 index 0000000000..594519672c --- /dev/null +++ b/pre-release/c101302058.lua @@ -0,0 +1,115 @@ +--終刻起動『D.O.O.M.D.U.R.G.』 +--Doom-Z Command "D.O.O.M.D.U.R.G" +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + aux.AddEquipProcedure(c) + --Inflict 500 damage to the equipped monster's controller during the Standby Phase + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Your opponent cannot target this card with card effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetValue(aux.tgoval) + --Destroy 1 other face-up card you control, also this card gains ATK equal to its own Level/Rank x 100, it can attack directly and if it battles destroy it at the end of the Damage Step + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCondition(aux.StatChangeDamageStepCondition) + e3:SetTarget(s.desatktg) + e3:SetOperation(s.desatkop) + --Grant the above effects to a "Doom-Z" monster equipped with this card + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) + e4:SetRange(LOCATION_SZONE) + e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e4:SetTarget(function(e,c) return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(SET_DOOM_Z) end) + e4:SetLabelObject(e2) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetLabelObject(e3) + c:RegisterEffect(e5) + --Grant the above protection effect (e2) to a WIND Machine Xyz Monster that has it as material + local e6=e2:Clone() + e6:SetType(EFFECT_TYPE_XMATERIAL) + e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e6:SetRange(LOCATION_MZONE) + c:RegisterEffect(e6) + --Grant the above destruction+atk change effect (e3) to a WIND Machine Xyz Monster that has it as material + local e7=e3:Clone() + e7:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) + e7:SetRange(LOCATION_MZONE) + e7:SetCondition(function(e) local c=e:GetHandler() return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) end) + c:RegisterEffect(e7) +end +s.listed_series={SET_DOOM_Z} +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local p=e:GetHandler():GetEquipTarget():GetControler() + Duel.SetTargetPlayer(p) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,1,p,500) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + Duel.Damage(e:GetHandler():GetEquipTarget():GetControler(),500,REASON_EFFECT) +end +function s.desatktg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local dg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,c) + if chk==0 then return #dg>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) + local atk=(c:HasLevel() and c:GetLevel() or c:GetRank())*100 + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,atk) +end +function s.desatkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local desg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,exc) + if #desg==0 then return end + Duel.HintSelection(desg) + if Duel.Destroy(desg,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + if c:IsFaceup() then + local atk=(c:HasLevel() and c:GetLevel() or c:GetRank())*100 + --This card gains ATK equal to its own Level/Rank x 100 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(atk) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end + --It can attack directly + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e2) + --If it battles, destroy it at the end of the Damage Step + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_DAMAGE_STEP_END) + e3:SetCondition(function(e) return e:GetHandler():IsRelateToBattle() end) + e3:SetOperation(function(e) Duel.Hint(HINT_CARD,0,c:GetOriginalCodeRule()) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end) + e3:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e3) + end +end \ No newline at end of file diff --git a/pre-release/c101302059.lua b/pre-release/c101302059.lua new file mode 100644 index 0000000000..b53ebc14e5 --- /dev/null +++ b/pre-release/c101302059.lua @@ -0,0 +1,72 @@ +--破滅なる予幻視 +--Theorealize Overdrive +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Medius the Pure" from your GY or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Change the Level of 1 face-up monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MEDIUS_THE_INNOCENT} +function s.spfilter(c,e,tp) + return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:HasLevel() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local lv=Duel.AnnounceNumberRange(tp,1,10,tc:GetLevel()) + e:SetLabel(lv) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tc,1,tp,0) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsFaceup() and tc:HasLevel() and tc:IsRelateToEffect(e)) then return end + local lv=e:GetLabel() + if lv>0 and not tc:IsLevel(lv) then + --Its Level becomes the declared Level until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101302060.lua b/pre-release/c101302060.lua new file mode 100644 index 0000000000..aa64d256fc --- /dev/null +++ b/pre-release/c101302060.lua @@ -0,0 +1,87 @@ +--アルトメギア・ムーヴメント-血統- +--Artmage Movement -Lineage- +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Artmage" monster from your Deck in Defense Position, with a different name from the cards you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end) + e1:SetCost(s.cost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Artmage" Trap from your GY or banishment to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetCost(s.cost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Checks to see if non-Fusion Monsters were Summoned from the Extra Deck + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) end) +end +s.listed_series={74733322} --"Artmage Academic Arcane Arts Acropolis" +s.listed_series={SET_ARTMEGIA} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon from the Extra Deck the turn you activate this effect, except Fusion Monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spfilter(c,e,tp,...) + return c:IsSetCard(SET_ARTMEGIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not (... and c:IsCode(...)) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end + local codes=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil):GetClass(Card.GetCode) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,table.unpack(codes)) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + local codes=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil):GetClass(Card.GetCode) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,table.unpack(codes)) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)==74733322 +end +function s.thfilter(c) + return c:IsSetCard(SET_ARTMEGIA) and c:IsTrap() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302074.lua b/pre-release/c101302074.lua new file mode 100644 index 0000000000..759abfc62d --- /dev/null +++ b/pre-release/c101302074.lua @@ -0,0 +1,96 @@ +--終刻決壊 +--Doom-Z Destruction +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Equip this card to 1 "Doom-Z" Xyz Monster you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(aux.RemainFieldCost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) + --Equip 1 "Doom-Z" monster from your Deck to a monster on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end) + e2:SetTarget(s.eqptg) + e2:SetOperation(s.eqpop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOOM_Z} +function s.xyzfilter(c) + return c:IsSetCard(SET_DOOM_Z) and c:IsType(TYPE_XYZ) and c:IsFaceup() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then + --Your opponent cannot add cards from the Deck to the hand, except by drawing them + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_TO_HAND) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(0,LOCATION_DECK) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + --Equip limit + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_EQUIP_LIMIT) + e2:SetValue(function(e,c) return c==tc end) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e2) + else + c:CancelToGrave(false) + end +end +function s.eqfilter(c,tp) + return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() and c:CheckUniqueOnField(tp) and not c:IsForbidden() +end +function s.eqptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) +end +function s.eqpop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if ec and Duel.Equip(tp,ec,tc) then + --Equip limit + local e1=Effect.CreateEffect(ec) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + ec:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101302075.lua b/pre-release/c101302075.lua new file mode 100644 index 0000000000..eeb50d8ec7 --- /dev/null +++ b/pre-release/c101302075.lua @@ -0,0 +1,95 @@ +--アルトメギア・ペリペティア-激動- +--Artmage Peripeteia -Turmoil- +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Return 1 "Artmage" monster you control to the hand/Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END+TIMING_STANDBY_PHASE) + e1:SetCost(s.cost) + e1:SetTarget(s.rthtetg) + e1:SetOperation(s.rthteop) + c:RegisterEffect(e1) + --Add 1 "Artmage" Spell from your GY or banishment to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetCost(s.cost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Checks to see if non-Fusion Monsters were Summoned from the Extra Deck + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) end) +end +s.listed_series={74733322} --"Artmage Academic Arcane Arts Acropolis" +s.listed_series={SET_ARTMEGIA} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon from the Extra Deck the turn you activate this effect, except Fusion Monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.rthtefilter(c,tp) + return c:IsSetCard(SET_ARTMEGIA) and (c:IsAbleToHand() or c:IsAbleToExtra()) + and c:IsFaceup() and (not tp or Duel.GetMZoneCount(tp,c)>0) +end +function s.rthtetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.rthtefilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.rthteop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local g=Duel.SelectMatchingCard(tp,s.rthtefilter,tp,LOCATION_MZONE,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 + and g:GetFirst():IsLocation(LOCATION_HAND|LOCATION_EXTRA) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and tc:IsRelateToEffect(e) + and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then + --Its effects are negated + tc:NegateEffects(e:GetHandler()) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)==74733322 +end +function s.thfilter(c) + return c:IsSetCard(SET_ARTMEGIA) and c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file From 799070b25c153c446a725d0ccd33264e046ce93a Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 8 Jul 2025 22:18:41 +0200 Subject: [PATCH 066/165] added scripts for new alt arts --- rush/c160452026.lua | 3 +++ rush/c160452027.lua | 3 +++ rush/c160452028.lua | 3 +++ rush/c160452029.lua | 3 +++ rush/c160452030.lua | 3 +++ 5 files changed, 15 insertions(+) create mode 100644 rush/c160452026.lua create mode 100644 rush/c160452027.lua create mode 100644 rush/c160452028.lua create mode 100644 rush/c160452029.lua create mode 100644 rush/c160452030.lua diff --git a/rush/c160452026.lua b/rush/c160452026.lua new file mode 100644 index 0000000000..adc65878fc --- /dev/null +++ b/rush/c160452026.lua @@ -0,0 +1,3 @@ +--カードディフェンダー +--Card Defender +Duel.LoadCardScriptAlias(160020024) diff --git a/rush/c160452027.lua b/rush/c160452027.lua new file mode 100644 index 0000000000..41f3e2a4ab --- /dev/null +++ b/rush/c160452027.lua @@ -0,0 +1,3 @@ +--竜水の神子 +--Justiciar of the Dragon Stream +Duel.LoadCardScriptAlias(160019029) diff --git a/rush/c160452028.lua b/rush/c160452028.lua new file mode 100644 index 0000000000..826db17524 --- /dev/null +++ b/rush/c160452028.lua @@ -0,0 +1,3 @@ +--セブンスロード・チャームウイッチ +--Sevens Road Charm Witch +Duel.LoadCardScriptAlias(160211062) diff --git a/rush/c160452029.lua b/rush/c160452029.lua new file mode 100644 index 0000000000..6d791a3bff --- /dev/null +++ b/rush/c160452029.lua @@ -0,0 +1,3 @@ +--カオス-黒魔術の儀式 +--Black Magic Ritual +Duel.LoadCardScriptAlias(160323030) diff --git a/rush/c160452030.lua b/rush/c160452030.lua new file mode 100644 index 0000000000..98b70c27f6 --- /dev/null +++ b/rush/c160452030.lua @@ -0,0 +1,3 @@ +--リパルシブ・フォース +--Repulsive Force +Duel.LoadCardScriptAlias(160211038) From 9bd72be8f82218f6d1666c30d81f4844d0090cb1 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 9 Jul 2025 12:35:58 +0300 Subject: [PATCH 067/165] Added new archetype constant SET_HECATONCHEIRE = 0x1cc --- archetype_setcode_constants.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index e0b86665ea..b7c2fb54da 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -597,4 +597,4 @@ SET_DOOM_KING = 0x1c8 SET_MAGNIFISTORM = 0x1c9 SET_RB = 0x1ca SET_DOOM_Z = 0x1cb - +SET_HECATONCHEIRE = 0x1cc From d695845d25ce62f0c21d7fdb405b53e0f81db4c1 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 9 Jul 2025 13:10:20 +0200 Subject: [PATCH 068/165] added Ritty the Hopeful --- rush/c160215072.lua | 55 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 rush/c160215072.lua diff --git a/rush/c160215072.lua b/rush/c160215072.lua new file mode 100644 index 0000000000..b5fe43a0b6 --- /dev/null +++ b/rush/c160215072.lua @@ -0,0 +1,55 @@ +--希望のリーチェ +--Ritty the Hopeful +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + -- Mill and add to hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(s.condition) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsStatus(STATUS_SUMMON_TURN) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=10 +end +function s.cfilter(c) + return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end + Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g==0 then return end + local tc=g:GetFirst() + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)==0 then return end + --Effect + Duel.DiscardDeck(tp,3,REASON_EFFECT) + local g=Duel.GetOperatedGroup() + if tc:IsRitualMonster() and g:FilterCount(s.thfilter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:FilterSelect(tp,s.thfilter,1,1,nil) + if #sg>0 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end +end \ No newline at end of file From 1ae19e5046d020528b58ac1298b21293858ec537 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 9 Jul 2025 09:08:58 -0300 Subject: [PATCH 069/165] "Zexal Field" fix Fixed a bug where the effect reventing activations would be applied even when the Xyz monster targeted was not on the field --- official/c95856586.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/official/c95856586.lua b/official/c95856586.lua index 8f88f98bb6..6287996e21 100644 --- a/official/c95856586.lua +++ b/official/c95856586.lua @@ -8,14 +8,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --act limit + --Your opponent cannot activate cards or effects in response to the activation of your cards and effects that target an Xyz Monster you control local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_FZONE) e2:SetOperation(s.chainop) c:RegisterEffect(e2) - --attach + --Attach 1 Xyz Monster from your Extra Deck or GY to a Xyz Monster(s) is Special Summoned to your field local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -29,7 +29,7 @@ function s.initial_effect(c) local g=Group.CreateGroup() g:KeepAlive() e3:SetLabelObject(g) - --Mass register + --Keep track of Xyz Monster(s) Special Summoned to your field local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetLabelObject(e3) e4:SetOperation(s.regop) c:RegisterEffect(e4) - --excavate + --You can place 1 "Shining Draw" from your Deck on top of your Deck local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,1)) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -48,9 +48,9 @@ function s.initial_effect(c) e5:SetOperation(s.operation) c:RegisterEffect(e5) end -s.listed_names={35906693} +s.listed_names={35906693} --"Shining Draw" function s.chfilter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) end function s.chainop(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -68,7 +68,7 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local tg=eg:Filter(s.mcfilter,nil,e,tp) if #tg>0 then - for tc in aux.Next(tg) do + for tc in tg:Iter() do tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) end local g=e:GetLabelObject():GetLabelObject() @@ -82,7 +82,8 @@ end function s.mtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=e:GetLabelObject():Filter(s.mcfilter,nil,e,tp) if chkc then return g:IsContains(chkc) and s.mcfilter(chkc,e,tp) end - if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil,TYPE_XYZ) end + if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,id)==0 + and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil,TYPE_XYZ) end Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) if #g==1 then Duel.SetTargetCard(g:GetFirst()) @@ -94,7 +95,7 @@ function s.mtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.mop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsType),tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,1,tc,TYPE_XYZ) if #g>0 then @@ -106,7 +107,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,35906693) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,nil,35906693) if tc then Duel.ShuffleDeck(tp) From 73a3a168172d7531ca1c5cfd67101b7ebe7b1bf3 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 11:32:09 +0300 Subject: [PATCH 070/165] Some more Xyz updates --- official/c10389142.lua | 84 +++++++++++++----------------------------- official/c31437713.lua | 67 +++++++++++++-------------------- official/c56337500.lua | 74 ++++++++++++++----------------------- 3 files changed, 79 insertions(+), 146 deletions(-) diff --git a/official/c10389142.lua b/official/c10389142.lua index e896be7a38..09b0f77fb1 100644 --- a/official/c10389142.lua +++ b/official/c10389142.lua @@ -1,84 +1,52 @@ ---No.42 スターシップ・ギャラクシー・トマホーク +--No.42 スターシップ・ギャラクシー・トマホーク --Number 42: Galaxy Tomahawk local s,id=GetID() +local TOKEN_BATTLE_EAGLE=id+1 function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,2) c:EnableReviveLimit() - --token + --Xyz Summon procedure: 2 Level 7 monsters + Xyz.AddProcedure(c,nil,7,2) + --Special Summon as many "Battle Eagle Tokens" (Machine-Type/WIND/Level 6/ATK 2000/DEF 0) as possible, but destroy them during the End Phase of this turn, also your opponent takes no further battle damage this turn local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCountLimit(1) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_names={10389143} s.xyz_number=42 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end +s.listed_names={TOKEN_BATTLE_EAGLE} 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.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,tp,0) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_BATTLE_EAGLE,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end + if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_BATTLE_EAGLE,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local fid=e:GetHandler():GetFieldID() - local g=Group.CreateGroup() + local sg=Group.CreateGroup() for i=1,ft do - local token=Duel.CreateToken(tp,id+1) + local token=Duel.CreateToken(tp,TOKEN_BATTLE_EAGLE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - token:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) - g:AddCard(token) + sg:AddCard(token) end + --Destroy them during the End Phase of this turn + aux.DelayedOperation(sg,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,nil,1,aux.Stringid(id,1)) Duel.SpecialSummonComplete() - g:KeepAlive() + --Your opponent takes no further battle damage this turn local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + e1:SetTargetRange(0,1) + e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(s.descon) - e1:SetOperation(s.desop) Duel.RegisterEffect(e1,tp) -end -function s.desfilter(c,fid) - return c:GetFlagEffectLabel(id)==fid -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(s.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(s.desfilter,nil,e:GetLabel()) - g:DeleteGroup() - Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31437713.lua b/official/c31437713.lua index 553608a291..876f2727ef 100644 --- a/official/c31437713.lua +++ b/official/c31437713.lua @@ -2,66 +2,51 @@ --Number 82: Heartlandraco local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --Cannot be targeted for attack + --While you control a face-up Spell, your opponent cannot target this card for attacks local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(s.atkcon) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSpell),e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end) e1:SetValue(aux.imval1) c:RegisterEffect(e1) - --Make itself be able to attack directly + --Apply a "this turn, this card can attack your opponent directly, but other monsters cannot attack" effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) - e2:SetOperation(s.operation) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) end) + e2:SetCost(Cost.Detach(1)) + e2:SetOperation(s.effop) c:RegisterEffect(e2) end s.xyz_number=82 -function s.filter(c) - return c:IsFaceup() and c:IsSpell() -end -function s.atkcon(e) - return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.ftarget) - e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local fid=-1 local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - --Attack directly this turn - local e1=Effect.CreateEffect(e:GetHandler()) + if c:IsRelateToEffect(e) then + fid=c:GetFieldID() + --This turn, this card can attack your opponent directly + local e1=Effect.CreateEffect(c) e1:SetDescription(3205) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) + --But other monsters cannot attack + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_ATTACK) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return c:GetFieldID()~=fid end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/official/c56337500.lua b/official/c56337500.lua index 0cb2ffccc8..e79d9e2eed 100644 --- a/official/c56337500.lua +++ b/official/c56337500.lua @@ -4,73 +4,61 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 monsters Xyz.AddProcedure(c,nil,3,2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) - --salvage + --Add 1 "Cynet" Spell/Trap from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --spsummon + --Special Summon 2 Level 4 Cyberse monsters with different names from your Deck, but their effects are negated local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) e2:SetCost(s.cost) 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:IsRace(RACE_CYBERSE) end) end s.listed_series={SET_CYNET} -function s.counterfilter(c) - return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsRace(RACE_CYBERSE) -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + --You cannot Special Summon monsters from the Extra Deck the turn you activate either of this card's effects, except Cyberse 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_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_CYBERSE) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - --lizard check - aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) -end -function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA) -end -function s.lizfilter(e,c) - return not c:IsOriginalRace(RACE_CYBERSE) -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and s.cost(e,tp,eg,ep,ev,re,r,rp,0) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - s.cost(e,tp,eg,ep,ev,re,r,rp,1) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_CYBERSE) end) end function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(SET_CYNET) and c:IsAbleToHand() + return c:IsSetCard(SET_CYNET) and c:IsSpellTrap() 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,0,0) + 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() @@ -80,11 +68,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsXyzSummoned() + return c:IsXyzSummoned() and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) + and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter(c,e,tp) - return c:IsRace(RACE_CYBERSE) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevel(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) @@ -97,21 +85,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_SPSUMMON) - if #sg==2 then - local tc=sg:GetFirst() - for tc in aux.Next(sg) do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e2,true) + if #sg~=2 then return end + local c=e:GetHandler() + for sc in sg:Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Their effects are negated + sc:NegateEffects(c) end - Duel.SpecialSummonComplete() end -end + Duel.SpecialSummonComplete() +end \ No newline at end of file From a0b1b3713e7c69e3df54a0c1a08ecc06dbc29e08 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 13:59:48 +0300 Subject: [PATCH 071/165] Added new card scripts --- pre-release/c100446001.lua | 82 ++++++++++++++++++++++++++++++++ pre-release/c100446002.lua | 78 +++++++++++++++++++++++++++++++ pre-release/c100446003.lua | 84 +++++++++++++++++++++++++++++++++ pre-release/c100446004.lua | 75 ++++++++++++++++++++++++++++++ pre-release/c100446005.lua | 69 +++++++++++++++++++++++++++ pre-release/c100446006.lua | 91 ++++++++++++++++++++++++++++++++++++ pre-release/c100446007.lua | 87 ++++++++++++++++++++++++++++++++++ pre-release/c100446009.lua | 95 ++++++++++++++++++++++++++++++++++++++ pre-release/c100446010.lua | 46 ++++++++++++++++++ pre-release/c100446011.lua | 41 ++++++++++++++++ pre-release/c101302071.lua | 60 ++++++++++++++++++++++++ 11 files changed, 808 insertions(+) create mode 100644 pre-release/c100446001.lua create mode 100644 pre-release/c100446002.lua create mode 100644 pre-release/c100446003.lua create mode 100644 pre-release/c100446004.lua create mode 100644 pre-release/c100446005.lua create mode 100644 pre-release/c100446006.lua create mode 100644 pre-release/c100446007.lua create mode 100644 pre-release/c100446009.lua create mode 100644 pre-release/c100446010.lua create mode 100644 pre-release/c100446011.lua create mode 100644 pre-release/c101302071.lua diff --git a/pre-release/c100446001.lua b/pre-release/c100446001.lua new file mode 100644 index 0000000000..1b1d013e4b --- /dev/null +++ b/pre-release/c100446001.lua @@ -0,0 +1,82 @@ +--見えざる手イブエル +--Hecatoncheire Ibel +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Shuffle this card into the Deck, then Special Summon 1 "Hecatoncheire" monster from your Deck in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) + --Special Summon 1 "Hecatoncheire" monster from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECATONCHEIRE} +s.listed_names={id} +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.deckspfilter(c,e,tp) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100446002.lua b/pre-release/c100446002.lua new file mode 100644 index 0000000000..c65cec30f4 --- /dev/null +++ b/pre-release/c100446002.lua @@ -0,0 +1,78 @@ +--見えざる手ヤドエル +--Hecatoncheire Yadel +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Shuffle this card into the Deck, then add 1 "Hecatoncheire" Spell/Trap from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Set 1 "Hecatoncheire" Spell/Trap from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECATONCHEIRE} +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.thfilter(c) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsSpellTrap() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #hg>0 then + Duel.BreakEffect() + Duel.SendtoHand(hg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,hg) + end + end +end +function s.setfilter(c) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsSpellTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.setfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local tc=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SSet(tp,tc) + end +end \ No newline at end of file diff --git a/pre-release/c100446003.lua b/pre-release/c100446003.lua new file mode 100644 index 0000000000..f950589805 --- /dev/null +++ b/pre-release/c100446003.lua @@ -0,0 +1,84 @@ +--見えざる手ゴッドス +--Hecatoncheire Goddus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_HAND) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon to your field 1 monster from your opponent's GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.spfilter(c,e,tp) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + tc:RegisterEffect(e1,true) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100446004.lua b/pre-release/c100446004.lua new file mode 100644 index 0000000000..77e641fe1b --- /dev/null +++ b/pre-release/c100446004.lua @@ -0,0 +1,75 @@ +--見えざる手ガイガス +--Hecatoncheire Gygas +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_HAND) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Excavate the top 3 cards of your opponent's Deck and you can Special Summon 1 excavated monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.spfilter(c,e,tp) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=3 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end + Duel.ConfirmDecktop(1-tp,3) + local g=Duel.GetDecktopGroup(1-tp,3) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:IsExists(s.spfilter,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=g:FilterSelect(tp,s.spfilter,1,1,nil,e,tp):GetFirst() + if sc then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + end + Duel.ShuffleDeck(1-tp) +end \ No newline at end of file diff --git a/pre-release/c100446005.lua b/pre-release/c100446005.lua new file mode 100644 index 0000000000..0063d0045b --- /dev/null +++ b/pre-release/c100446005.lua @@ -0,0 +1,69 @@ +--見えざる手ブレアス +--Hecatoncheire Breus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_HAND) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not Duel.IsPhase(PHASE_DRAW) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Look at 1 random card in your opponent's hand, and if it is a monster, you can Special Summon it to your field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) + if #g==0 then return end + local sc=g:RandomSelect(tp,1):GetFirst() + Duel.ConfirmCards(tp,sc) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + Duel.ShuffleHand(1-tp) +end \ No newline at end of file diff --git a/pre-release/c100446006.lua b/pre-release/c100446006.lua new file mode 100644 index 0000000000..94bc5265a5 --- /dev/null +++ b/pre-release/c100446006.lua @@ -0,0 +1,91 @@ +--見えざる神ジャウザー +--Hecatoncheire Jawza +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Hecatoncheire" monster + 1 Illusion monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECATONCHEIRE),aux.FilterBoolFunctionEx(Card.IsRace,RACE_ILLUSION)) + c:AddMustFirstBeFusionSummoned() + --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 Illusion monster and 1 face-up monster you control owned by your opponent + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_EXTRA) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Add 1 "Hecatoncheire" card from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card battles a monster, neither can be destroyed by that battle + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetTarget(s.indestg) + e2:SetValue(1) + c:RegisterEffect(e2) +end +s.listed_series={SET_HECATONCHEIRE} +s.material_setcode=SET_HECATONCHEIRE +function s.selfspcostfilter(c,tp,fc) + return (c:IsRace(RACE_ILLUSION) or (c:IsFaceup() and c:IsOwner(1-tp))) and c:IsReleasable() + and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) +end +function s.rescon(sg,e,tp,mg) + return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 + and sg:IsExists(Card.IsRace,1,nil,RACE_ILLUSION) and sg:IsExists(aux.FaceupFilter(Card.IsOwner,1-tp),1,nil) +end +function s.selfspcon(e,c) + if not c then return true end + local tp=c:GetControler() + local mg=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,0,nil,tp,c) + return #mg>=2 and aux.SelectUnselectGroup(mg,e,tp,2,2,s.rescon,0) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local mg=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,0,nil,tp,c) + local g=aux.SelectUnselectGroup(mg,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.Release(g,REASON_COST|REASON_MATERIAL) + g:DeleteGroup() +end +function s.thfilter(c) + return c:IsSetCard(SET_HECATONCHEIRE) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end \ No newline at end of file diff --git a/pre-release/c100446007.lua b/pre-release/c100446007.lua new file mode 100644 index 0000000000..adc21e2fe0 --- /dev/null +++ b/pre-release/c100446007.lua @@ -0,0 +1,87 @@ +--見えざる神ゼノ +--Hecatoncheire Xeno +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 "Hecatoncheire" monsters + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECATONCHEIRE),3) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --Look at 2 random face-down cards in your opponent's Extra Deck, and if you do, you can Special Summon 1 of them to your field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Take control of any number of monsters your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_CONTROL) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.ctrlcon) + e3:SetTarget(s.ctrltg) + e3:SetOperation(s.ctrlop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECATONCHEIRE} +s.material_setcode=SET_HECATONCHEIRE +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil)>=2 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spfilter(c,e,tp) + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local exg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil) + if #exg==0 then return end + local g=exg:RandomSelect(tp,2) + Duel.ConfirmCards(tp,g) + if g:IsExists(s.spfilter,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:FilterSelect(tp,s.spfilter,1,1,nil,e,tp) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + Duel.ShuffleExtra(1-tp) +end +function s.ctrlcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return rp==1-tp and c:IsFusionSummoned() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) +end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,ft,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100446009.lua b/pre-release/c100446009.lua new file mode 100644 index 0000000000..e370882807 --- /dev/null +++ b/pre-release/c100446009.lua @@ -0,0 +1,95 @@ +--見えざる幽獄 +--Hecatoncheire Tartarus +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects (but you can only use each effect of "Hecatoncheire Tartarus" once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --If you use a face-up monster(s) you control owned by your opponent, you can treat it as a "Hecatoncheire" monster + aux.GlobalCheck(s,function() + local e0a=Effect.CreateEffect(c) + e0a:SetType(EFFECT_TYPE_FIELD) + e0a:SetCode(EFFECT_ADD_SETCODE) + e0a:SetTargetRange(LOCATION_MZONE,0) + e0a:SetTarget(function(e,c) local tp=e:GetHandlerPlayer() return c:IsFaceup() and c:IsControler(tp) and c:IsOwner(1-tp) end) + e0a:SetOperation(s.chngcon) + e0a:SetValue(SET_HECATONCHEIRE) + Duel.RegisterEffect(e0a,0) + local e0b=e0a:Clone() + Duel.RegisterEffect(e0b,1) + end) +end +s.listed_series={SET_HECATONCHEIRE} +function s.chngcon(scard,sumtype,tp) + return Fusion.SummonEffect and Fusion.SummonEffect:GetHandler():IsCode(id) and ((sumtype&MATERIAL_FUSION)~=0 or (sumtype&SUMMON_TYPE_FUSION)~=0) +end +function s.fextra(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+100) + and Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) + if chk==0 then return b1 or b2 end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return e:GetLabel()==1 and chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end + local cost_skip=e:GetLabel()~=-100 + local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) + local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) + and Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) + if chk==0 then e:SetLabel(0) return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_TOHAND) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,1,nil) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_FUSION_SUMMON) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end + Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Return 1 Spell/Trap your opponent controls to the hand + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end + elseif op==2 then + --Fusion Summon 1 "Hecatoncheire" Fusion Monster from your Extra Deck, by banishing its materials from your field and/or GY + local fusion_params={handler=e:GetHandler(),fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_HECATONCHEIRE),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratg} + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + end +end \ No newline at end of file diff --git a/pre-release/c100446010.lua b/pre-release/c100446010.lua new file mode 100644 index 0000000000..b616dc663c --- /dev/null +++ b/pre-release/c100446010.lua @@ -0,0 +1,46 @@ +--えざる誘う手 +--Ipt al Hecatoncherie +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation of an opponent's monster effect, and if you do, destroy it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_series={SET_HECATONCHEIRE} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return re:IsMonsterEffect() and rp==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsChainNegatable(ev) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,rc,1,tp,0) + end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and not rc:IsLocation(LOCATION_HAND|LOCATION_DECK) and aux.nvfilter(rc) + and rc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + if rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,rc)<=0 then + return + elseif not rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then + return + end + if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100446011.lua b/pre-release/c100446011.lua new file mode 100644 index 0000000000..5596ebe41a --- /dev/null +++ b/pre-release/c100446011.lua @@ -0,0 +1,41 @@ +--見えざる招き手 +--Yad al Hecatoncheire +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation of an opponent's Spell/Trap Card, and if you do, destroy it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_series={SET_HECATONCHEIRE} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HECATONCHEIRE),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsChainNegatable(ev) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + if rc:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,rc,1,tp,0) + end + end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and not rc:IsLocation(LOCATION_HAND|LOCATION_DECK) + and aux.nvfilter(rc) and rc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.SSet(tp,rc) + end +end \ No newline at end of file diff --git a/pre-release/c101302071.lua b/pre-release/c101302071.lua new file mode 100644 index 0000000000..07b59f8d33 --- /dev/null +++ b/pre-release/c101302071.lua @@ -0,0 +1,60 @@ +--あないみじや玉の緒ふたつ +--Tragic Twin Threads +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Equip only to a monster you control that was Special Summoned from the Extra Deck + aux.AddEquipProcedure(c,0,aux.FilterBoolFunction(Card.IsSummonLocation,LOCATION_EXTRA)) + --Destroy it, also the equipped monster, and if you do, take damage equal to the total original ATK of the destroyed monsters, then inflict damage to your opponent equal to the damage you took + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(s.descon) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) +end +function s.desconfilter(c,tp,atk) + return c:IsSummonPlayer(1-tp) and c:IsSummonLocation(LOCATION_EXTRA) and c:GetAttack()>atk +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local ec=e:GetHandler():GetEquipTarget() + return ec and eg:IsExists(s.desconfilter,1,nil,tp,ec:GetAttack()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local ec=e:GetHandler():GetEquipTarget() + local g=eg:Filter(s.desconfilter,nil,tp,ec:GetAttack()):Match(Card.IsCanBeEffectTarget,nil,e) + if chkc then return g:IsContains(chkc) end + if chk==0 then return #g>0 end + local tg=nil + if #g==1 then + tg=g + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + tg=g:Select(tp,1,1,nil) + end + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg+ec,2,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,tg:GetSum(Card.GetBaseAttack)) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local g=Group.FromCards(e:GetHandler():GetEquipTarget()) + if tc:IsRelateToEffect(e) then + g:AddCard(tc) + end + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local dam=Duel.GetOperatedGroup():GetSum(Card.GetBaseAttack) + if dam==0 then return end + local val=Duel.Damage(tp,dam,REASON_EFFECT) + if val>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,val,REASON_EFFECT) + end + end +end \ No newline at end of file From 7f3bfc283f75512195b9e493f648479634890928 Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 10 Jul 2025 12:27:59 -0300 Subject: [PATCH 072/165] "Concours de Cuisine (Culinary Confrontation)" fix Fixed a bug where the player would be able to summon monsters even if the effect of "Blue-Eyes Spirit Dragon" was applying --- official/c14283055.lua | 5 ++++- official/c95856586.lua | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/official/c14283055.lua b/official/c14283055.lua index 51852e7003..5c1b60f447 100644 --- a/official/c14283055.lua +++ b/official/c14283055.lua @@ -52,10 +52,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g1=Duel.GetMatchingGroup(s.cfilter,tp,locs,0,nil,SET_NOUVELLES) local g2=Duel.GetMatchingGroup(s.cfilter,tp,locs,0,nil,SET_PATISSCIEL) local g=g1+g2 - if chk==0 then return #g1>0 and #g2>0 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + if chk==0 then return #g1>0 and #g2>0 + and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,locs) end function s.operation(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end local c=e:GetHandler() --You cannot use monsters as material for a Fusion, Synchro, Xyz, or Link Summon, except "Nouvelles" and "Patissciel" monsters local e1=Effect.CreateEffect(c) diff --git a/official/c95856586.lua b/official/c95856586.lua index 6287996e21..c6d9fbc41b 100644 --- a/official/c95856586.lua +++ b/official/c95856586.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_FZONE) e2:SetOperation(s.chainop) c:RegisterEffect(e2) - --Attach 1 Xyz Monster from your Extra Deck or GY to a Xyz Monster(s) is Special Summoned to your field + --Attach 1 Xyz Monster from your Extra Deck or GY to a Xyz Monster(s) Special Summoned to your field local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) From 3b6f9d3db15c67e5fe78fbdb96f15b7374f53fef Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 10 Jul 2025 12:39:27 -0300 Subject: [PATCH 073/165] Update "Nouvelles" Ritual monsters Now all of them will remember if they were Summoned by the effect of a "Nouvelles" card, fixing a bug where "Chef's Special Recipe" would not be able to destroy the card in some situations --- official/c15001940.lua | 19 +++++++++++++++++++ official/c26223582.lua | 19 +++++++++++++++++++ official/c53618197.lua | 19 +++++++++++++++++++ official/c89016236.lua | 19 +++++++++++++++++++ 4 files changed, 76 insertions(+) diff --git a/official/c15001940.lua b/official/c15001940.lua index d92ee2a7e9..4b65ee13de 100644 --- a/official/c15001940.lua +++ b/official/c15001940.lua @@ -4,6 +4,14 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Register that it was Special Summoned by the effect of a "Nouvelles" monster + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end) + c:RegisterEffect(e0) --Shuffle cards from the GY into the Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -32,6 +40,17 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_RECIPE,SET_NOUVELLES} +function s.regcon(e,tp,eg,ep,ev,re,r,rp) + if not (re and re:IsMonsterEffect()) then return false end + local rc=re:GetHandler() + local trig_loc,trig_setcodes=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SETCODES) + if not Duel.IsChainSolving() or (rc:IsRelateToEffect(re) and rc:IsFaceup() and rc:IsLocation(trig_loc)) then + return rc:IsSetCard(SET_NOUVELLES) + end + for _,set in ipairs(trig_setcodes) do + if (SET_NOUVELLES&0xfff)==(set&0xfff) and (SET_NOUVELLES&set)==SET_NOUVELLES then return true end + end +end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end diff --git a/official/c26223582.lua b/official/c26223582.lua index e5a40e53da..98c19a2d27 100644 --- a/official/c26223582.lua +++ b/official/c26223582.lua @@ -4,6 +4,14 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Register that it was Special Summoned by the effect of a "Nouvelles" monster + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end) + c:RegisterEffect(e0) --Excavate the top 5 cards of your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -32,6 +40,17 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_NOUVELLES,SET_RECIPE} +function s.regcon(e,tp,eg,ep,ev,re,r,rp) + if not (re and re:IsMonsterEffect()) then return false end + local rc=re:GetHandler() + local trig_loc,trig_setcodes=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SETCODES) + if not Duel.IsChainSolving() or (rc:IsRelateToEffect(re) and rc:IsFaceup() and rc:IsLocation(trig_loc)) then + return rc:IsSetCard(SET_NOUVELLES) + end + for _,set in ipairs(trig_setcodes) do + if (SET_NOUVELLES&0xfff)==(set&0xfff) and (SET_NOUVELLES&set)==SET_NOUVELLES then return true end + end +end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end Duel.SetTargetPlayer(tp) diff --git a/official/c53618197.lua b/official/c53618197.lua index 331972536b..b36eb485cf 100644 --- a/official/c53618197.lua +++ b/official/c53618197.lua @@ -4,6 +4,14 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Register that it was Special Summoned by the effect of a "Nouvelles" monster + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end) + c:RegisterEffect(e0) --Destroy 1 Spell/Trap on the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -32,6 +40,17 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_NOUVELLES,SET_RECIPE} +function s.regcon(e,tp,eg,ep,ev,re,r,rp) + if not (re and re:IsMonsterEffect()) then return false end + local rc=re:GetHandler() + local trig_loc,trig_setcodes=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SETCODES) + if not Duel.IsChainSolving() or (rc:IsRelateToEffect(re) and rc:IsFaceup() and rc:IsLocation(trig_loc)) then + return rc:IsSetCard(SET_NOUVELLES) + end + for _,set in ipairs(trig_setcodes) do + if (SET_NOUVELLES&0xfff)==(set&0xfff) and (SET_NOUVELLES&set)==SET_NOUVELLES then return true end + end +end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end diff --git a/official/c89016236.lua b/official/c89016236.lua index 6308c4457e..1f8138fe1b 100644 --- a/official/c89016236.lua +++ b/official/c89016236.lua @@ -4,6 +4,14 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Register that it was Special Summoned by the effect of a "Nouvelles" monster + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end) + c:RegisterEffect(e0) --Draw 1 card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -32,6 +40,17 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_RECIPE,SET_NOUVELLES} +function s.regcon(e,tp,eg,ep,ev,re,r,rp) + if not (re and re:IsMonsterEffect()) then return false end + local rc=re:GetHandler() + local trig_loc,trig_setcodes=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SETCODES) + if not Duel.IsChainSolving() or (rc:IsRelateToEffect(re) and rc:IsFaceup() and rc:IsLocation(trig_loc)) then + return rc:IsSetCard(SET_NOUVELLES) + end + for _,set in ipairs(trig_setcodes) do + if (SET_NOUVELLES&0xfff)==(set&0xfff) and (SET_NOUVELLES&set)==SET_NOUVELLES then return true end + 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) From 03369c2c4caff90ca2e7cf69444971552fe2ea29 Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 10 Jul 2025 13:21:57 -0300 Subject: [PATCH 074/165] update c14283055.lua --- official/c14283055.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c14283055.lua b/official/c14283055.lua index 5c1b60f447..6eca467310 100644 --- a/official/c14283055.lua +++ b/official/c14283055.lua @@ -53,7 +53,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g2=Duel.GetMatchingGroup(s.cfilter,tp,locs,0,nil,SET_PATISSCIEL) local g=g1+g2 if chk==0 then return #g1>0 and #g2>0 - and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,locs) end From 454bc6d8391fc8d4a784ee7e5376e443aaf09576 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 20:56:53 +0300 Subject: [PATCH 075/165] Moar Xyz updates --- official/c9161357.lua | 113 +++++++++++++++------------------- official/c95134948.lua | 134 +++++++++++++++++++---------------------- 2 files changed, 109 insertions(+), 138 deletions(-) diff --git a/official/c9161357.lua b/official/c9161357.lua index 46751d96c7..cffbfe4fd3 100644 --- a/official/c9161357.lua +++ b/official/c9161357.lua @@ -1,99 +1,82 @@ ---No.6 先史遺産アトランタル +--No.6 先史遺産アトランタル --Number 6: Chronomaly Atlandis local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,6,2) c:EnableReviveLimit() - --equip + --Xyz Summon procedure: 2 Level 6 monsters + Xyz.AddProcedure(c,nil,6,2) + --Equip 1 "Number" monster from your GY to this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) + e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(s.eqcon) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) - aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1) - --lp + aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsSetCard(SET_NUMBER) and ec:IsControler(tp) end,function(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,id) end,e1) + --This card gains ATK equal to half the ATK of that equipped monster local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.lpcost) - e2:SetOperation(s.lpop) + e2:SetValue(function(e,c) return c:GetEquipGroup():Match(Card.HasFlagEffect,nil,id):GetSum(Card.GetAttack)/2 end) c:RegisterEffect(e2) + --Halve your opponent's Life Points + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCost(Cost.AND(Cost.Detach(1),s.halvelpcost)) + e3:SetOperation(function(e,tp) local opp=1-tp Duel.SetLP(opp,Duel.GetLP(opp)/2) end) + c:RegisterEffect(e3) end -s.listed_series={SET_NUMBER} s.xyz_number=6 -function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(SET_NUMBER) -end -function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsXyzSummoned() -end -function s.filter(c) - return c:IsSetCard(SET_NUMBER) and c:IsMonster() and not c:IsForbidden() +s.listed_series={SET_NUMBER} +function s.eqfilter(c,tp) + return c:IsSetCard(SET_NUMBER) and c:IsMonster() and not c:IsForbidden() and c:CheckUniqueOnField(tp) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.eqfilter(chkc,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function s.equipop(c,e,tp,tc) - if not c:EquipByEffectAndLimitRegister(e,tp,tc,id) then return end - local atk=tc:GetBaseAttack()/2 - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end + local g=Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,tp,0) 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() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - s.equipop(c,e,tp,tc) + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then + c:EquipByEffectAndLimitRegister(e,tp,tc,id) end end -function s.eqfilter(c,tp) - return c:GetFlagEffect(id)~=0 and c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and c:IsAbleToGraveAsCost() +function s.halvelpcostfilter(c,tp) + return c:HasFlagEffect(id) and c:IsControler(tp) and c:IsAbleToGraveAsCost() end -function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.halvelpcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local eqg=c:GetEquipGroup() - if chk==0 then return Duel.IsPhase(PHASE_MAIN1) and #eqg>0 and eqg:IsExists(s.eqfilter,1,nil,tp) - and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local ec=eqg:FilterSelect(tp,s.eqfilter,1,1,nil,tp) - Duel.SendtoGrave(ec,REASON_COST) + local eqg=c:GetEquipGroup():Match(s.halvelpcostfilter,nil,tp) + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) and #eqg>0 end + local g=nil + if #eqg==1 then + g=eqg + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + g=eqg:Select(tp,1,1,nil) + end + Duel.SendtoGrave(g,REASON_COST) + --You cannot conduct your Battle Phase the turn you activate this effect local e1=Effect.CreateEffect(c) + 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_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE|PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end +end \ No newline at end of file diff --git a/official/c95134948.lua b/official/c95134948.lua index 051c3da207..da99324652 100644 --- a/official/c95134948.lua +++ b/official/c95134948.lua @@ -1,37 +1,38 @@ ---No.99 希望皇ホープドラグナー +--No.99 希望皇ホープドラグナー --Number 99: Utopia Dragonar --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) - --xyz summon c:EnableReviveLimit() + --Xyz Summon procedure: 3+ Level 12 monsters Xyz.AddProcedure(c,nil,12,3,nil,nil,Xyz.InfiniteMats) - --Special Summon + --Special Summon from your Extra Deck, 1 "Number" monster that has a number between "1" and "100" in its name (this is treated as an Xyz Summon) 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:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(Cost.AND(Cost.Detach(2),s.spcost)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --disable attack + --Change the ATK of the opponent's monster to 0 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_ATTACK_ANNOUNCE) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.atkcon) + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) + --Keep track of Special Summons and direct attacks + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_XYZ) end) aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -40,87 +41,74 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={SET_NUMBER} s.xyz_number=99 -function s.counterfilter(c) - return c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA -end +s.listed_series={SET_NUMBER} function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() if not Duel.GetAttackTarget() then Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + eg:GetFirst():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) - and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 - and (Duel.GetFlagEffect(tp,id)==0 or Duel.GetFlagEffect(tp,id)==c:GetFlagEffect(id)) end - c:RemoveOverlayCard(tp,2,2,REASON_COST) - aux.RegisterClientHint(e:GetHandler(),EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,2),nil) - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD) - ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - ge1:SetTargetRange(1,0) - ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(ge1,tp) - --lizard check - aux.addTempLizardCheck(c,tp,s.lizfilter) - --cannot attack directly with other cards - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD) - ge2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - ge2:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) - ge2:SetTargetRange(LOCATION_MZONE,0) - ge2:SetTarget(s.ftarget) - ge2:SetLabel(c:GetFieldID()) - ge2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(ge2,tp) -end -function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) -end -function s.lizfilter(e,c) - return not c:IsOriginalType(TYPE_XYZ) -end -function s.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 + and (not Duel.HasFlagEffect(tp,id) or Duel.GetFlagEffect(tp,id)==c:GetFlagEffect(id)) end + local fid=c:GetFieldID() + --The turn you activate this effect, other monsters you control cannot attack directly + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:GetFieldID()~=fid end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --Also you cannot Special Summon from the Extra Deck, except Xyz Monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e2:SetTargetRange(1,0) + e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) end -function s.filter(c,e,tp,rp) - return c:IsSetCard(SET_NUMBER) and c.xyz_number and c.xyz_number>=1 and c.xyz_number<=100 - and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_NUMBER) and c.xyz_number and c.xyz_number>=1 and c.xyz_number<=100 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rp) end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rp):GetFirst() - if tc then - Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() + 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_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local at=Duel.GetAttacker() - if chk==0 then return at:IsOnField() and at:HasNonZeroAttack() end - Duel.SetTargetCard(at) + local bc=Duel.GetAttacker() + if chk==0 then return bc:IsOnField() and bc:HasNonZeroAttack() end + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + local bc=e:GetLabelObject() + if bc:IsRelateToEffect(e) and bc:IsFaceup() and bc:IsControler(1-tp) then + --The ATK of that opponent's monster becomes 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:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) - tc:RegisterEffect(e1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + bc:RegisterEffect(e1) end -end +end \ No newline at end of file From 46fa2e3e1ce0fed123318eec1742fa31615d2f89 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 21:58:57 +0300 Subject: [PATCH 076/165] "Number 46: Dragluon" updates --- official/c2978414.lua | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 2946c79bc9..47aee7085a 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 8 Dragon-Type monsters + --Xyz Summon procedure: 2 Level 8 Dragon monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),8,2) --Activate 1 of these effects local e1=Effect.CreateEffect(c) @@ -21,19 +21,20 @@ s.xyz_number=46 function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.ctfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged() +function s.ctrlfilter(c) + return c:IsRace(RACE_DRAGON) and c:IsFaceup() and c:IsControlerCanBeChanged() end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetLabel()==2 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctfilter(chkc) end - if chk==0 then return true end + if chkc then return e:GetLabel()==2 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctrlfilter(chkc) end local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - local b2=Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) + local b2=Duel.IsExistingTarget(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil) + local b3=not Duel.HasFlagEffect(1-tp,id) + if chk==0 then return b1 or b2 or b3 end local op=Duel.SelectEffect(tp, {b1,aux.Stringid(id,1)}, {b2,aux.Stringid(id,2)}, - {true,aux.Stringid(id,3)}) + {b3,aux.Stringid(id,3)}) e:SetLabel(op) e:SetCategory(0) e:SetProperty(0) @@ -44,14 +45,14 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetCategory(CATEGORY_CONTROL) e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) + local g=Duel.SelectTarget(tp,s.ctrlfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) end end function s.effop(e,tp,eg,ep,ev,re,r,rp) local op=e:GetLabel() if op==1 then - --Special Summon 1 Dragon-Type monster from your hand + --Special Summon 1 Dragon monster from your hand 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) @@ -59,21 +60,25 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end elseif op==2 then - --Target 1 Dragon-Type monster your opponent controls; take control of that target + --Target 1 Dragon monster your opponent controls; take control of that target local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) then Duel.GetControl(tc,tp) end elseif op==3 then + local opp=1-tp + if Duel.HasFlagEffect(opp,id) then return end + Duel.RegisterFlagEffect(opp,id,RESET_PHASE|PHASE_END|RESET_OPPO_TURN,0,1) local c=e:GetHandler() - --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn + aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,4),RESET_OPPO_TURN) + --Dragon monsters your opponent controls cannot activate their effects until the end of your opponent's turn local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTarget(function(e,c) return c:IsRace(RACE_DRAGON) end) e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,4)) end end From e05cadf5bf21dd4f1c09036b8aa927331583811f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 22:00:34 +0300 Subject: [PATCH 077/165] Update c2978414.lua --- official/c2978414.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 47aee7085a..d829c1a5ca 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -62,7 +62,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) elseif op==2 then --Target 1 Dragon monster your opponent controls; take control of that target local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) then + if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) and tc:IsFaceup() then Duel.GetControl(tc,tp) end elseif op==3 then From 0f5baa08d4f6f51863b7fa034f51c2a1cbbd6ed9 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 00:25:06 +0300 Subject: [PATCH 078/165] Update c89516305.lua --- official/c89516305.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/official/c89516305.lua b/official/c89516305.lua index 0713c0f2b9..f693d03f2f 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetHintTiming(TIMING_DAMAGE_STEP) + e1:SetHintTiming(TIMING_DAMAGE_STEP|TIMING_SSET,TIMING_DAMAGE_STEP|TIMING_SSET|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) @@ -21,7 +21,7 @@ function s.initial_effect(c) end s.xyz_number=87 function s.setfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsCanTurnSet() + return c:IsRace(RACE_PLANT) and c:IsCanTurnSet() end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -34,10 +34,10 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end end - local not_dmg_step=Duel.GetCurrentPhase()~=PHASE_DAMAGE + local not_dmg_step=not Duel.IsPhase(PHASE_DAMAGE) local b1=not_dmg_step and Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) local b2=not_dmg_step and Duel.IsExistingTarget(s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b3=aux.StatChangeDamageStepCondition(e,tp,eg,ep,ev,re,r,rp) + local b3=aux.StatChangeDamageStepCondition() and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) if chk==0 then return b1 or b2 or b3 end local op=Duel.SelectEffect(tp, @@ -53,34 +53,35 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetCategory(CATEGORY_POSITION) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) elseif op==3 then e:SetCategory(CATEGORY_ATKCHANGE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end end function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end - local c=e:GetHandler() local op=e:GetLabel() + local c=e:GetHandler() if op==1 then --Target 1 Set Spell/Trap your opponent controls; while this card is face-up on the field, that Set card cannot be activated if c:IsRelateToEffect(e) and tc:IsFacedown() then c:SetCardTarget(tc) + --While this card is face-up on the field, that Set card cannot be activated local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetCondition(function(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end) + e1:SetCondition(function() return c:IsHasCardTarget(tc) and tc:IsFacedown() end) e1:SetValue(1) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end elseif op==2 then --Target 1 Plant monster on the field; change that target to face-down Defense Position - if tc:IsFaceup() then + if tc:IsRace(RACE_PLANT) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end elseif op==3 then From d07a64b9ae15a078a9af42cb74e6a26581808c6f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:12:39 +0300 Subject: [PATCH 079/165] Update c84417082.lua --- official/c84417082.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/official/c84417082.lua b/official/c84417082.lua index 14fe7cb5a6..dc620a3eb2 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -31,13 +31,15 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=e:GetLabel()==1 and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) + or Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + 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=e:GetLabel()==1 - and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc) + or Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end From 48b2fa208f723e185847165a37eed66d49816f92 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:19:45 +0300 Subject: [PATCH 080/165] Update c35103106.lua --- official/c35103106.lua | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/official/c35103106.lua b/official/c35103106.lua index ab5e43d6bc..a00d5a3b6b 100644 --- a/official/c35103106.lua +++ b/official/c35103106.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) e1:SetValue(function(e,re,rp) return rp==1-e:GetHandlerPlayer() and re:IsMonsterEffect() end) c:RegisterEffect(e1) - --Negate the effects of 1 face-up card your opponent controls + --Negate the effects of 1 face-up card your opponent controls until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE) @@ -23,26 +23,27 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(_,tp,_,_,_,_,_,rp) return rp==1-tp end) - e2:SetCost(Cost.Detach(s.negcostmin,2)) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(Cost.Detach(s.discostmin,2)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) c:RegisterEffect(e2) end -function s.negcostmin(e,tp,eg,ep,ev,re,r,rp,chk) +function s.discostmin(e,tp,eg,ep,ev,re,r,rp,chk) local g=e:GetHandler():GetOverlayGroup() return #g==g:FilterCount(Card.IsRace,nil,RACE_REPTILE|RACE_DINOSAUR) and 1 or 2 end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end -function s.negop(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - tc:NegateEffects(e:GetHandler(),nil,true) + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Negate its effects until the end of this turn + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END,true) end end From 51439c3151241542a42188db0abf43ef02751a54 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:08:11 +0300 Subject: [PATCH 081/165] unofficial Xyz updates --- unofficial/c511001339.lua | 16 ++++++---------- unofficial/c511001363.lua | 8 ++------ unofficial/c511001781.lua | 15 +++++++-------- unofficial/c511002059.lua | 14 +++----------- unofficial/c511002384.lua | 11 +++-------- unofficial/c511002763.lua | 10 ++-------- unofficial/c511002866.lua | 5 ++--- unofficial/c511002870.lua | 15 ++++----------- unofficial/c511009136.lua | 10 ++++------ unofficial/c511009387.lua | 8 +++----- unofficial/c511009560.lua | 4 ++-- unofficial/c511010011.lua | 8 +++----- unofficial/c511010039.lua | 16 ++-------------- unofficial/c511010053.lua | 11 +++-------- unofficial/c511010107.lua | 9 ++++----- unofficial/c511010132.lua | 8 +++----- unofficial/c511010173.lua | 10 ++-------- unofficial/c511023000.lua | 9 ++------- unofficial/c513000017.lua | 9 ++------- unofficial/c700000027.lua | 8 ++------ 20 files changed, 61 insertions(+), 143 deletions(-) diff --git a/unofficial/c511001339.lua b/unofficial/c511001339.lua index 619aba5692..f3f2c3971a 100644 --- a/unofficial/c511001339.lua +++ b/unofficial/c511001339.lua @@ -11,7 +11,10 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCost(s.cost) + e1:SetCost(Cost.Choice( + {Cost.Detach(1),aux.Stringid(id,1), + {s.cost,aux.Stringid(id,2)} + )) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -25,14 +28,7 @@ end s.xyz_number=2 s.counter_place_list={0x1101} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local op1Con=e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - local op2Con=Duel.GetAttacker():GetCounter(0x1101)>0 - if chk==0 then return op1Con or op2Con end - local op=Duel.SelectEffect(tp,{op1Con,aux.Stringid(id,1)},{op2Con,aux.Stringid(id,2)}) - if op==1 then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - end - e:SetLabel(op) + if chk==0 then return Duel.GetAttacker():GetCounter(0x1101)>0 end end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -82,4 +78,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e) return e:GetHandler():GetCounter(0x1101)>0 -end +end \ No newline at end of file diff --git a/unofficial/c511001363.lua b/unofficial/c511001363.lua index da0cd1cb7e..3ef4671a6f 100644 --- a/unofficial/c511001363.lua +++ b/unofficial/c511001363.lua @@ -1,6 +1,5 @@ --CX 冀望皇バリアン (Anime) --CXyz Barian Hope (Anime) ---Rescripted by Larry126 local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -18,10 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e0a) local e0b=e0a:Clone() e0b:SetCode(EFFECT_XYZ_LEVEL) - e0b:SetValue(function(e,mc,rc) - if rc==e:GetHandler() then return 7,mc:GetLevel() end - return mc:GetLevel() - end) + e0b:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) c:RegisterEffect(e0b) --This card's ATK is equal to the number of Xyz Materials attached to it x 1000 local e1=Effect.CreateEffect(c) @@ -132,4 +128,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) end e:SetLabel(0) e:SetLabelObject(nil) -end +end \ No newline at end of file diff --git a/unofficial/c511001781.lua b/unofficial/c511001781.lua index 4da9178643..43a8bccdab 100644 --- a/unofficial/c511001781.lua +++ b/unofficial/c511001781.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e5:SetDescription(aux.Stringid(id,3)) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_MZONE) - e5:SetCost(s.lpcost) + e5:SetCost(Cost.AND(Cost.Detach(3),s.lpcost)) e5:SetTarget(s.lptg) e5:SetOperation(s.lpop) --spsummon @@ -88,7 +88,7 @@ function s.initial_effect(c) c:RegisterEffect(e10) local e11=e7:Clone() e11:SetLabelObject(e5) - c:RegisterEffect(e11) + c:RegisterEffect(e11,false,EFFECT_MARKER_DETACH_XMAT) local e12=e7:Clone() e12:SetLabelObject(e6) c:RegisterEffect(e12) @@ -163,15 +163,14 @@ function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(1-tp)~=1 end end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,3,REASON_COST) and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - c:RemoveOverlayCard(tp,3,3,REASON_COST) + if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end + --You canno declare an attack during the turn you activate this effect local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) + e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) @@ -206,4 +205,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/unofficial/c511002059.lua b/unofficial/c511002059.lua index 119a8229eb..3c89b08140 100644 --- a/unofficial/c511002059.lua +++ b/unofficial/c511002059.lua @@ -11,8 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetLabel(3) + e1:SetCost(Cost.AND(Cost.Detach(3),Cost.HintSelectedEffect)) e1:SetTarget(s.destg1) e1:SetOperation(s.desop1) c:RegisterEffect(e1) @@ -22,8 +21,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) - e2:SetLabel(5) + e2:SetCost(Cost.AND(Cost.Detach(5),Cost.HintSelectedEffect)) e2:SetTarget(s.destg2) e2:SetOperation(s.desop2) c:RegisterEffect(e2) @@ -35,12 +33,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=91 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetLabel() - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST) -end function s.destg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) @@ -61,4 +53,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511002384.lua b/unofficial/c511002384.lua index 7a5563bdcc..077309da99 100644 --- a/unofficial/c511002384.lua +++ b/unofficial/c511002384.lua @@ -10,8 +10,8 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -26,11 +26,6 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetDefense()>0 end @@ -71,4 +66,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT+0x57a0000) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/unofficial/c511002763.lua b/unofficial/c511002763.lua index f71e52a68f..a77771f41a 100644 --- a/unofficial/c511002763.lua +++ b/unofficial/c511002763.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -23,12 +23,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetOverlayCount(tp,1,1)>1 end end @@ -45,4 +39,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/unofficial/c511002866.lua b/unofficial/c511002866.lua index d7fe1f1146..f8ca23b479 100644 --- a/unofficial/c511002866.lua +++ b/unofficial/c511002866.lua @@ -51,8 +51,7 @@ s.listed_names={2407234} s.xyz_number=69 function s.target(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:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) end @@ -86,4 +85,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/unofficial/c511002870.lua b/unofficial/c511002870.lua index 3927cf4589..8c0cde8641 100644 --- a/unofficial/c511002870.lua +++ b/unofficial/c511002870.lua @@ -31,8 +31,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(s.indescost) - e3:SetTarget(s.indestg) + e3:SetCost(Cost.Detach(s.indescost,s.indescost)) e3:SetOperation(s.indesop) c:RegisterEffect(e3) --Detach all materials from this to prevent this card's destruction (Card effect) @@ -104,14 +103,8 @@ function s.indescon2(e,tp,eg,ep,ev,re,r,rp) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg and tg:IsContains(e:GetHandler()) end -function s.indescost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) -end -function s.indestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end +function s.indescost(e,tp) + return e:GetHandler():GetOverlayCount() end function s.indesop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -137,4 +130,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) end c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/unofficial/c511009136.lua b/unofficial/c511009136.lua index b89ba93130..435fc7942f 100644 --- a/unofficial/c511009136.lua +++ b/unofficial/c511009136.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(s.cost,s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) local e2=Effect.CreateEffect(c) @@ -59,10 +59,8 @@ function s.valcheck(e,c) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD,0,1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetOverlayCount() - if chk==0 then return ct>0 and e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.cost(e,tp) + return e:GetHandler():GetOverlayCount() end function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() @@ -136,4 +134,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/unofficial/c511009387.lua b/unofficial/c511009387.lua index 0719c10070..84f8e03381 100644 --- a/unofficial/c511009387.lua +++ b/unofficial/c511009387.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -33,9 +33,8 @@ function s.initial_effect(c) end s.pendulum_level=7 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -86,9 +85,8 @@ function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end function s.penop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.CheckPendulumZones(tp) then return false end local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index e96a37712a..aaff245f4b 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -76,7 +76,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) + c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -123,4 +123,4 @@ function s.dirregop(e,tp,eg,ep,ev,re,r,rp) end function s.dircon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/unofficial/c511010011.lua b/unofficial/c511010011.lua index 2fa0243f6f..1bd1d132b8 100644 --- a/unofficial/c511010011.lua +++ b/unofficial/c511010011.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -26,9 +26,7 @@ function s.initial_effect(c) end s.xyz_number=11 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetAttackAnnouncedCount()==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) @@ -51,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010039.lua b/unofficial/c511010039.lua index 89fe409e34..bf9f677d44 100644 --- a/unofficial/c511010039.lua +++ b/unofficial/c511010039.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1,1,function(e,og) Duel.Overlay(e:GetHandler():GetBattleTarget(),og) end)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -31,18 +31,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc and bc:IsType(TYPE_XYZ) and bc:IsFaceup() and bc:IsControler(1-tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=c:GetOverlayGroup() - if #g>0 then - local mg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(mg,REASON_COST) - Duel.RaiseSingleEvent(c,EVENT_DETACH_MATERIAL,e,0,0,0,0) - Duel.Overlay(bc,mg) - end -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetCard(e:GetHandler():GetBattleTarget()) @@ -68,4 +56,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010053.lua b/unofficial/c511010053.lua index b5b85679ff..6243155482 100644 --- a/unofficial/c511010053.lua +++ b/unofficial/c511010053.lua @@ -57,7 +57,7 @@ function s.initial_effect(c) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) e6:SetCode(id+1) - e6:SetCost(s.bdcost) + e6:SetCost(Cost.Detach(1)) e6:SetTarget(s.rectg) e6:SetOperation(s.recop) c:RegisterEffect(e6) @@ -71,7 +71,7 @@ function s.initial_effect(c) e7:SetRange(LOCATION_MZONE) e7:SetCountLimit(1) e7:SetCondition(s.bdcon) - e7:SetCost(s.bdcost) + e7:SetCost(Cost.Detach(1)) e7:SetTarget(s.bdtg) e7:SetOperation(s.bdop) c:RegisterEffect(e7) @@ -169,11 +169,6 @@ end function s.bdcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp end -function s.bdcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.bdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -211,4 +206,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/unofficial/c511010107.lua b/unofficial/c511010107.lua index 0403dda427..9fbe66fb59 100644 --- a/unofficial/c511010107.lua +++ b/unofficial/c511010107.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCountLimit(1) e3:SetCondition(s.discon) - e3:SetCost(s.discost) + e3:SetCost(Cost.AND(Cost.Detach(1),s.discost)) c:RegisterEffect(e3) --Global effects to keep track of total effect resolutions and the last attacker aux.GlobalCheck(s,function() @@ -64,10 +64,9 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) and not Duel.HasFlagEffect(tp,id+1) and not Duel.IsPhase(PHASE_BATTLE_START) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return true end if Duel.IsTurnPlayer(tp) then + local c=e:GetHandler() Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_BATTLE,0,1) c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE|PHASE_BATTLE,0,1) --Cannot attack with any other card after activating this effect @@ -175,4 +174,4 @@ function s.endbpop(e,tp,eg,ep,ev,re,r,rp) e2:SetOperation(function(e) e:Reset() Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end) e2:SetReset(RESET_PHASE|PHASE_END|PHASE_BATTLE) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/unofficial/c511010132.lua b/unofficial/c511010132.lua index 903f8df1fb..2db08485a4 100644 --- a/unofficial/c511010132.lua +++ b/unofficial/c511010132.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -61,9 +61,7 @@ function s.rfilter(c) return c:IsMonster() and c:IsShark() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -94,4 +92,4 @@ function s.descon(e) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010173.lua b/unofficial/c511010173.lua index 87aa92efc2..3a633af75e 100644 --- a/unofficial/c511010173.lua +++ b/unofficial/c511010173.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --battle indestructable @@ -29,12 +29,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc and bc:IsControler(1-tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -46,4 +40,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(bc:GetAttack()) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/unofficial/c511023000.lua b/unofficial/c511023000.lua index 0a076f0d88..028455862a 100644 --- a/unofficial/c511023000.lua +++ b/unofficial/c511023000.lua @@ -13,16 +13,11 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.copycost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.copytg) e1:SetOperation(s.copyop) c:RegisterEffect(e1) end -function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.copyfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsType(TYPE_TRAPMONSTER) and not c:IsType(TYPE_TOKEN) end @@ -38,4 +33,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then c:CopyEffect(tc:GetCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) end -end +end \ No newline at end of file diff --git a/unofficial/c513000017.lua b/unofficial/c513000017.lua index 12b6b65898..0879c49306 100644 --- a/unofficial/c513000017.lua +++ b/unofficial/c513000017.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -33,11 +33,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=101 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsAbleToChangeControler() and not c:IsType(TYPE_TOKEN) end @@ -62,4 +57,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/unofficial/c700000027.lua b/unofficial/c700000027.lua index 2ed3869b30..4a8feadd2c 100644 --- a/unofficial/c700000027.lua +++ b/unofficial/c700000027.lua @@ -11,15 +11,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,ep,eg,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e) return c:HasNonZeroAttack() and (not e or not c:IsImmuneToEffect(e)) end @@ -56,4 +52,4 @@ function s.operation(e,tp,ep,eg,ev,re,r,rp) ct=g:GetNext() until rc<=0 or not Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil,e) or not Duel.SelectYesNo(tp,210) -end +end \ No newline at end of file From 129a6b61e4a23b7056eace9d342f50d0fa613d88 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:10:12 +0300 Subject: [PATCH 082/165] Missing bracket --- unofficial/c511001339.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial/c511001339.lua b/unofficial/c511001339.lua index f3f2c3971a..ab0dc755a5 100644 --- a/unofficial/c511001339.lua +++ b/unofficial/c511001339.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCost(Cost.Choice( - {Cost.Detach(1),aux.Stringid(id,1), + {Cost.Detach(1),aux.Stringid(id,1)}, {s.cost,aux.Stringid(id,2)} )) e1:SetTarget(s.target) From 9fb329ad82e8eb07323adf0ee595c2a21d957ab2 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Sat, 12 Jul 2025 09:35:59 +0200 Subject: [PATCH 083/165] added scripts for new alt arts --- rush/c160215037.lua | 3 +++ rush/c160215038.lua | 3 +++ rush/c160215039.lua | 3 +++ rush/c160215041.lua | 3 +++ rush/c160215042.lua | 3 +++ rush/c160215043.lua | 3 +++ rush/c160215044.lua | 3 +++ rush/c160215045.lua | 3 +++ rush/c160215046.lua | 3 +++ rush/c160215047.lua | 3 +++ rush/c160215048.lua | 3 +++ rush/c160215049.lua | 3 +++ rush/c160215050.lua | 3 +++ rush/c160215057.lua | 3 +++ rush/c160215058.lua | 3 +++ rush/c160215059.lua | 3 +++ rush/c160215060.lua | 3 +++ rush/c160215063.lua | 3 +++ rush/c160215064.lua | 3 +++ rush/c160215065.lua | 3 +++ rush/c160215067.lua | 3 +++ rush/c160215093.lua | 3 +++ rush/c160215094.lua | 3 +++ rush/c160215114.lua | 3 +++ rush/c160215115.lua | 3 +++ rush/c160215124.lua | 3 +++ 26 files changed, 78 insertions(+) create mode 100644 rush/c160215037.lua create mode 100644 rush/c160215038.lua create mode 100644 rush/c160215039.lua create mode 100644 rush/c160215041.lua create mode 100644 rush/c160215042.lua create mode 100644 rush/c160215043.lua create mode 100644 rush/c160215044.lua create mode 100644 rush/c160215045.lua create mode 100644 rush/c160215046.lua create mode 100644 rush/c160215047.lua create mode 100644 rush/c160215048.lua create mode 100644 rush/c160215049.lua create mode 100644 rush/c160215050.lua create mode 100644 rush/c160215057.lua create mode 100644 rush/c160215058.lua create mode 100644 rush/c160215059.lua create mode 100644 rush/c160215060.lua create mode 100644 rush/c160215063.lua create mode 100644 rush/c160215064.lua create mode 100644 rush/c160215065.lua create mode 100644 rush/c160215067.lua create mode 100644 rush/c160215093.lua create mode 100644 rush/c160215094.lua create mode 100644 rush/c160215114.lua create mode 100644 rush/c160215115.lua create mode 100644 rush/c160215124.lua diff --git a/rush/c160215037.lua b/rush/c160215037.lua new file mode 100644 index 0000000000..d7ae390b80 --- /dev/null +++ b/rush/c160215037.lua @@ -0,0 +1,3 @@ +--セレブローズ・ラグジュアリ・マジシャンズ +--Celeb Rose Luxury Magicians +Duel.LoadCardScriptAlias(160013042) diff --git a/rush/c160215038.lua b/rush/c160215038.lua new file mode 100644 index 0000000000..4440b37957 --- /dev/null +++ b/rush/c160215038.lua @@ -0,0 +1,3 @@ +--セレブローズ・ファビュラス・マジシャン +--Celeb Rose Fabulous Magician +Duel.LoadCardScriptAlias(160013041) diff --git a/rush/c160215039.lua b/rush/c160215039.lua new file mode 100644 index 0000000000..d40df6bfc5 --- /dev/null +++ b/rush/c160215039.lua @@ -0,0 +1,3 @@ +--セレブローズ・インコグニート・マジシャン +--Celeb Rose Incognito Magician +Duel.LoadCardScriptAlias(160019041) diff --git a/rush/c160215041.lua b/rush/c160215041.lua new file mode 100644 index 0000000000..b53ba74fd4 --- /dev/null +++ b/rush/c160215041.lua @@ -0,0 +1,3 @@ +--セレブローズ・インフルエンサーズ +--Celeb Rose Influencers +Duel.LoadCardScriptAlias(160016044) diff --git a/rush/c160215042.lua b/rush/c160215042.lua new file mode 100644 index 0000000000..8e75c5cf71 --- /dev/null +++ b/rush/c160215042.lua @@ -0,0 +1,3 @@ +--セレブローズ・ゴシップ・マジシャン +--Celeb Rose Gossip Magician +Duel.LoadCardScriptAlias(160015039) diff --git a/rush/c160215043.lua b/rush/c160215043.lua new file mode 100644 index 0000000000..281e962e92 --- /dev/null +++ b/rush/c160215043.lua @@ -0,0 +1,3 @@ +--セレブローズ・ゴシップ・ウィッチ +--Celeb Rose Gossip Witch +Duel.LoadCardScriptAlias(160015038) diff --git a/rush/c160215044.lua b/rush/c160215044.lua new file mode 100644 index 0000000000..030c36c67a --- /dev/null +++ b/rush/c160215044.lua @@ -0,0 +1,3 @@ +--セレブローズ・マジシャン +--Celeb Rose Magician +Duel.LoadCardScriptAlias(160013012) \ No newline at end of file diff --git a/rush/c160215045.lua b/rush/c160215045.lua new file mode 100644 index 0000000000..5f6b756070 --- /dev/null +++ b/rush/c160215045.lua @@ -0,0 +1,3 @@ +--セレブローズ・ウィッチ +--Celeb Rose Witch +Duel.LoadCardScriptAlias(160013011) \ No newline at end of file diff --git a/rush/c160215046.lua b/rush/c160215046.lua new file mode 100644 index 0000000000..d8753fdfa6 --- /dev/null +++ b/rush/c160215046.lua @@ -0,0 +1,3 @@ +--セレブローズ・ウォーロック +--Celeb Rose Warlock +Duel.LoadCardScriptAlias(160210046) \ No newline at end of file diff --git a/rush/c160215047.lua b/rush/c160215047.lua new file mode 100644 index 0000000000..32e5669b33 --- /dev/null +++ b/rush/c160215047.lua @@ -0,0 +1,3 @@ +--セレブローズ・ソーサラー +--Celeb Rose Sorcerer +Duel.LoadCardScriptAlias(160013010) \ No newline at end of file diff --git a/rush/c160215048.lua b/rush/c160215048.lua new file mode 100644 index 0000000000..a3ad9eae54 --- /dev/null +++ b/rush/c160215048.lua @@ -0,0 +1,3 @@ +--セレブローズ・エンチャンター +--Celeb Rose Enchanter +Duel.LoadCardScriptAlias(160210050) \ No newline at end of file diff --git a/rush/c160215049.lua b/rush/c160215049.lua new file mode 100644 index 0000000000..db73da40c5 --- /dev/null +++ b/rush/c160215049.lua @@ -0,0 +1,3 @@ +--セレブローズ・メイジ +--Celeb Rose Mage +Duel.LoadCardScriptAlias(160013009) \ No newline at end of file diff --git a/rush/c160215050.lua b/rush/c160215050.lua new file mode 100644 index 0000000000..6bb901f422 --- /dev/null +++ b/rush/c160215050.lua @@ -0,0 +1,3 @@ +--フセレブローズ・ウィズ +--Celeb Rose Wiz +Duel.LoadCardScriptAlias(160015008) \ No newline at end of file diff --git a/rush/c160215057.lua b/rush/c160215057.lua new file mode 100644 index 0000000000..e3725a1c6c --- /dev/null +++ b/rush/c160215057.lua @@ -0,0 +1,3 @@ +--環幻楽鬼神トランスゴッドブレス +--Divinebreath the Orchestral Music Fiend +Duel.LoadCardScriptAlias(160208018) \ No newline at end of file diff --git a/rush/c160215058.lua b/rush/c160215058.lua new file mode 100644 index 0000000000..734c0f0dfc --- /dev/null +++ b/rush/c160215058.lua @@ -0,0 +1,3 @@ +--環幻楽鬼フルオルケストラ +--Full Orchestra the Music Fiend +Duel.LoadCardScriptAlias(160208019) \ No newline at end of file diff --git a/rush/c160215059.lua b/rush/c160215059.lua new file mode 100644 index 0000000000..604cba9f94 --- /dev/null +++ b/rush/c160215059.lua @@ -0,0 +1,3 @@ +--環幻楽姫アクションメロディ +--Axetion Melody the Music Princess +Duel.LoadCardScriptAlias(160208020) \ No newline at end of file diff --git a/rush/c160215060.lua b/rush/c160215060.lua new file mode 100644 index 0000000000..79e090d368 --- /dev/null +++ b/rush/c160215060.lua @@ -0,0 +1,3 @@ +--斧楽姫チューンフルートマホーク +--Tune Flutomahawk the Music Princess +Duel.LoadCardScriptAlias(160208020) \ No newline at end of file diff --git a/rush/c160215063.lua b/rush/c160215063.lua new file mode 100644 index 0000000000..848baaa69b --- /dev/null +++ b/rush/c160215063.lua @@ -0,0 +1,3 @@ +--神楽鬼ファーゴッド・フィンガー +--Digisoon the Music Fiend +Duel.LoadCardScriptAlias(160004029) \ No newline at end of file diff --git a/rush/c160215064.lua b/rush/c160215064.lua new file mode 100644 index 0000000000..64b9ac5fde --- /dev/null +++ b/rush/c160215064.lua @@ -0,0 +1,3 @@ +--重楽鬼アンサンブルファイター +--Ensembullfighter the Music Fiend +Duel.LoadCardScriptAlias(160004028) \ No newline at end of file diff --git a/rush/c160215065.lua b/rush/c160215065.lua new file mode 100644 index 0000000000..cbcccc3a0b --- /dev/null +++ b/rush/c160215065.lua @@ -0,0 +1,3 @@ +--振楽姫チューバルディッシュ +--Tubardiche the Music Princess +Duel.LoadCardScriptAlias(160208025) \ No newline at end of file diff --git a/rush/c160215067.lua b/rush/c160215067.lua new file mode 100644 index 0000000000..2dd5e8c01e --- /dev/null +++ b/rush/c160215067.lua @@ -0,0 +1,3 @@ +--冠狙楽姫トロンボウ +--Trombow the Music Princess +Duel.LoadCardScriptAlias(160211071) \ No newline at end of file diff --git a/rush/c160215093.lua b/rush/c160215093.lua new file mode 100644 index 0000000000..762a474d66 --- /dev/null +++ b/rush/c160215093.lua @@ -0,0 +1,3 @@ +--歴戦の暗黒騎士ガイア +--Battletested Gaia The Fierce Knight +Duel.LoadCardScriptAlias(160014032) \ No newline at end of file diff --git a/rush/c160215094.lua b/rush/c160215094.lua new file mode 100644 index 0000000000..03129f86d1 --- /dev/null +++ b/rush/c160215094.lua @@ -0,0 +1,3 @@ +--歴戦のカース・オブ・ドラゴン +--Veteran Curse of Dragon +Duel.LoadCardScriptAlias(160014031) \ No newline at end of file diff --git a/rush/c160215114.lua b/rush/c160215114.lua new file mode 100644 index 0000000000..ec9d386e0e --- /dev/null +++ b/rush/c160215114.lua @@ -0,0 +1,3 @@ +--なほいとをかしまいひめ +--Ever-Grace Princess Mai +Duel.LoadCardScriptAlias(160215014) diff --git a/rush/c160215115.lua b/rush/c160215115.lua new file mode 100644 index 0000000000..04d71361a2 --- /dev/null +++ b/rush/c160215115.lua @@ -0,0 +1,3 @@ +--なほいとをかしまりひめ +--Ever-Grace Princess Mari +Duel.LoadCardScriptAlias(160215015) diff --git a/rush/c160215124.lua b/rush/c160215124.lua new file mode 100644 index 0000000000..04179528e7 --- /dev/null +++ b/rush/c160215124.lua @@ -0,0 +1,3 @@ +--いとをかししあわせにっき +--Grace Happiness Diary +Duel.LoadCardScriptAlias(160215024) From 3d7bcfad97607ab16855ace8bb0c9bae2fc596ea Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:07:55 +0300 Subject: [PATCH 084/165] Update c12081875.lua --- official/c12081875.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index 85544ab975..4f8734bdbb 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -55,6 +55,8 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + Duel.ClearTargetCard() + tc:CreateEffectRelation(e) e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) local targ_fn=te:GetTarget() @@ -64,18 +66,18 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) te:SetLabelObject(e:GetLabelObject()) Duel.ClearOperationInfo(0) end - e:SetLabelObject({tc,te}) + e:SetLabelObject(te) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc,te=table.unpack(e:GetLabelObject()) - if not (tc:IsRelateToEffect(e) and te) then return end + local te=e:GetLabelObject() + if not te then return end + local tc=te:GetHandler() + if not tc:IsRelateToEffect(e) then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) - local tg=Duel.GetTargetCards(e)-tc - if #tg>0 then Duel.ChangeTargetCard(ev,tg) end op(e,tp,eg,ep,ev,re,r,rp) end if tc:IsAbleToDeck() then @@ -101,4 +103,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end From 9de4155a0a670a558bca8ba18926391f214975e0 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:15:36 +0300 Subject: [PATCH 085/165] Update c49195710.lua --- official/c49195710.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/official/c49195710.lua b/official/c49195710.lua index e5e99018f6..ebeeddcd66 100644 --- a/official/c49195710.lua +++ b/official/c49195710.lua @@ -20,6 +20,7 @@ function s.initial_effect(c) --Effect Monsters your opponent controls cannot activate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_CANNOT_TRIGGER) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE) @@ -27,19 +28,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=65 -s.listed_names={3790062} +s.listed_names={3790062} --"Number 65: Djinn Buster" function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) - Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,tc,1,tp,-1000) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,-1000) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,g,1,tp,-1000) end function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local c=e:GetHandler() + --It loses 1000 ATK and DEF tc:UpdateAttack(-1000,nil,c) tc:UpdateDefense(-1000,nil,c) end From 62d4f7f6be65e34a2b4175905abd9b58255e4753 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:33:29 +0300 Subject: [PATCH 086/165] Update c43490025.lua --- official/c43490025.lua | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/official/c43490025.lua b/official/c43490025.lua index 807cec93dd..8a6f23bc61 100644 --- a/official/c43490025.lua +++ b/official/c43490025.lua @@ -3,15 +3,15 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz summon procedure: 2 Xyz Monsters with the same Rank, except "Number" monsters - Xyz.AddProcedure(c,s.xyzfilter,nil,2,s.ovfilter,aux.Stringid(id,1),nil,nil,false,s.xyzcheck) - --Gains 500 ATK per "Number" Xyz monsters in the GYs + --Xyz Summon procedure: 2 Xyz Monsters with the same Rank, except "Number" monsters OR 1 "Utopia" monster or "Number F0: Utopic Future" you control + Xyz.AddProcedure(c,s.xyzfilter,nil,2,s.ovfilter,aux.Stringid(id,0),nil,nil,false,s.xyzcheck) + --Gains 500 ATK for each "Number" Xyz Monster in the GYs local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 end) + e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(function(c) return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) end,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 end) c:RegisterEffect(e1) --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) @@ -19,21 +19,21 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) c:RegisterEffect(e2) - --Make this card able to make a second attack + --Make this card able to make a second attack during each Battle Phase this turn local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) + e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function() return Duel.IsAbleToEnterBP() end) e3:SetCost(Cost.Detach(1)) - e3:SetTarget(s.atktg) - e3:SetOperation(s.atkop) + e3:SetTarget(s.secondatktg) + e3:SetOperation(s.secondatkop) c:RegisterEffect(e3) end -s.listed_series={SET_NUMBER,SET_UTOPIA} s.xyz_number=0 -s.listed_names={65305468} +s.listed_series={SET_NUMBER,SET_UTOPIA} +s.listed_names={65305468} --"Number F0: Utopic Future" function s.xyzfilter(c,xyz,sumtype,tp) return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and not c:IsSetCard(SET_NUMBER,xyz,sumtype,tp) end @@ -41,16 +41,16 @@ function s.xyzcheck(g,tp,xyz) local mg=g:Filter(function(c) return not c:IsHasEffect(EFFECT_EQUIP_SPELL_XYZ_MAT) end,nil) return mg:GetClassCount(Card.GetRank)==1 end -function s.ovfilter(c,tp,lc) - return c:IsFaceup() and (c:IsSetCard(SET_UTOPIA,lc,SUMMON_TYPE_XYZ,tp) or c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65305468)) +function s.ovfilter(c,tp,xyzc) + return (c:IsSetCard(SET_UTOPIA,xyzc,SUMMON_TYPE_XYZ,tp) or c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,65305468)) and c:IsFaceup() end -function s.atkfilter(c) - return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end +function s.secondatktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + return c:CanAttack() and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 + end end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) +function s.secondatkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then --This card can make a second attack during each Battle Phase this turn From b3644765f4265aca0503db9c84131f4f61ff4278 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 19:41:57 +0300 Subject: [PATCH 087/165] "Traptrix Rafflesia" update --- official/c6511113.lua | 148 ++++++++++++++++++++++-------------------- 1 file changed, 79 insertions(+), 69 deletions(-) diff --git a/official/c6511113.lua b/official/c6511113.lua index e063f88ace..7c7ab65836 100644 --- a/official/c6511113.lua +++ b/official/c6511113.lua @@ -2,92 +2,102 @@ --Traptrix Rafflesia local s,id=GetID() function s.initial_effect(c) - --Xyz summon - Xyz.AddProcedure(c,nil,4,2) c:EnableReviveLimit() - --Unaffected by trap effects + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Unaffected by Trap effects while it has material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetCondition(s.imcon) - e1:SetValue(s.efilter) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e1:SetValue(function(e,te) return te:IsTrapEffect() end) c:RegisterEffect(e1) - --Other "Traptrix" monsters cannot be destroyed by battle or card effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(s.imtg) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + --"Traptrix" monsters you control, except "Traptrix Rafflesia", cannot be destroyed by battle or card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTargetRange(LOCATION_MZONE,0) + e2a:SetTarget(function(e,c) return c:IsSetCard(SET_TRAPTRIX) and not c:IsCode(id) end) + e2a:SetValue(1) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2b) + --Your opponent cannot target "Traptrix" monsters you control, except "Traptrix Rafflesia", with card effects + local e2c=e2a:Clone() + e2c:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e2c:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2c:SetValue(aux.tgoval) + c:RegisterEffect(e2c) + --This effect becomes that sent "Hole" Normal Trap's effect when that card is activated + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetRange(LOCATION_MZONE) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetCountLimit(1) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_MSET|TIMINGS_CHECK_MONSTER_E) + e3:SetCost(Cost.AND(Cost.Detach(1),s.effcost)) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) c:RegisterEffect(e3) - --Other "Traptrix" monsters cannot be target - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --Copy 1 "Hole" trap - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetHintTiming(TIMINGS_CHECK_MONSTER|TIMING_BATTLE_START|TIMING_MAIN_END) - e5:SetCountLimit(1) - e5:SetCost(s.cost) - e5:SetTarget(s.target) - e5:SetOperation(s.operation) - c:RegisterEffect(e5) end s.listed_names={id} s.listed_series={SET_TRAPTRIX,SET_TRAP_HOLE,SET_HOLE} -function s.imcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function s.efilter(e,te) - return te:IsTrapEffect() -end -function s.imtg(e,c) - return c:IsSetCard(SET_TRAPTRIX) and not c:IsCode(id) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function s.filter(c) - return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) and c:IsAbleToGraveAsCost() +function s.copyfilter(c) + return c:IsNormalTrap() and c:IsSetCard({SET_HOLE,SET_TRAP_HOLE}) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,true)~=nil end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) + --Storing the legal group before detaching due to rulings (Q&A #16286) + local g=Duel.GetMatchingGroup(s.copyfilter,tp,LOCATION_DECK,0,nil) + e:SetLabelObject(g) + return #g>0 end - e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) - local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.SendtoGrave(g,REASON_COST) - e:SetProperty(te:GetProperty()) + local sc=e:GetLabelObject():Select(tp,1,1,nil):GetFirst() + e:SetLabelObject(sc) + Duel.SendtoGrave(sc,REASON_COST) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local te,ceg,cep,cev,cre,cr,crp=table.unpack(e:GetLabelObject()) + return te and te:GetTarget() and te:GetTarget()(e,tp,ceg,cep,cev,cre,cr,crp,chk,chkc) + end + if chk==0 then + local res=e:GetLabel()==-100 + e:SetLabel(0) + return res + end + local sc=e:GetLabelObject() + local te,ceg,cep,cev,cre,cr,crp=sc:CheckActivateEffect(true,true,true) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) local tg=te:GetTarget() - if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end - te:SetLabelObject(e:GetLabelObject()) - e:SetLabelObject(te) - Duel.ClearOperationInfo(0) + if tg then + e:SetProperty(te:GetProperty()) + tg(e,tp,ceg,cep,cev,cre,cr,crp,1) + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + Duel.ClearOperationInfo(0) + end + e:SetLabel(0) + e:SetLabelObject({te,ceg,cep,cev,cre,cr,crp}) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local te,ceg,cep,cev,cre,cr,crp=table.unpack(e:GetLabelObject()) if not te then return end - e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end + if op then + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + op(e,tp,ceg,cep,cev,cre,cr,crp) + end + e:SetLabel(0) + e:SetLabelObject(nil) end From fda5fcecdc784850bca0b02895568b2439feff62 Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Sat, 12 Jul 2025 20:02:40 +0200 Subject: [PATCH 088/165] Fix Destiny Overlay It was only working if all the monsters on the field were usable at the same time --- unofficial/c100000490.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unofficial/c100000490.lua b/unofficial/c100000490.lua index 33403e97bf..4f39a2c1e0 100644 --- a/unofficial/c100000490.lua +++ b/unofficial/c100000490.lua @@ -23,8 +23,8 @@ function s.registerxyzmateffect(e,tp) Duel.RegisterEffect(matEff,tp) return matEff end -function s.xyzfilter(c,mg,fg,minc,maxg) - return c:IsXyzSummonable(mg,fg,minc,maxg) +function s.xyzfilter(c,mg,minc,maxc) + return c:IsXyzSummonable(nil,mg,minc,maxc) end function s.rescon(exg) return function(sg) @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetTargetCards(e) local matEff=s.registerxyzmateffect(e,tp) - local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,nil,g,#g,#g) + local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,g,#g,#g) if #xyzg>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() @@ -67,4 +67,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else matEff:Reset() end -end \ No newline at end of file +end From cb293202e1b59e23a4d37200c4561af3572c7c27 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Sat, 12 Jul 2025 11:32:24 -0700 Subject: [PATCH 089/165] Update "Destiny Overlay" Should need to have at least 1 valid on monster on each field to activate and resolve the effect. --- unofficial/c100000490.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unofficial/c100000490.lua b/unofficial/c100000490.lua index 4f39a2c1e0..71f0462544 100644 --- a/unofficial/c100000490.lua +++ b/unofficial/c100000490.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.filter(c,e) +function s.matfilter(c,e) return c:IsFaceup() and c:IsCanBeEffectTarget(e) and not c:IsType(TYPE_TOKEN) end function s.registerxyzmateffect(e,tp) @@ -27,18 +27,18 @@ function s.xyzfilter(c,mg,minc,maxc) return c:IsXyzSummonable(nil,mg,minc,maxc) end function s.rescon(exg) - return function(sg) - return exg:IsExists(Card.IsXyzSummonable,1,nil,nil,sg,#sg,#sg) + return function(sg,e,tp,g) + return exg:IsExists(Card.IsXyzSummonable,1,nil,nil,sg,#sg,#sg) and sg:IsExists(Card.IsControler,1,nil,1-tp) end end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e) + local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e) if chk==0 then local matEff=s.registerxyzmateffect(e,tp) local res=Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg) matEff:Reset() - return res + return res and mg:IsExists(Card.IsControler,1,nil,1-tp) end local matEff=s.registerxyzmateffect(e,tp) local exg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) From 5940fc87b4cfece3dbda1c775e9cabbeb728e72f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:13:30 +0300 Subject: [PATCH 090/165] "Flower Cardian" updates --- official/c16024176.lua | 102 +++++++++++++++++---------------- official/c16802689.lua | 100 ++++++++++++++++---------------- official/c17141718.lua | 87 ++++++++++++++-------------- official/c21772453.lua | 86 ++++++++++++++------------- official/c30382214.lua | 73 +++++++++++------------ official/c43413875.lua | 97 ++++++++++++++++--------------- official/c54135423.lua | 66 +++++++++++---------- official/c5489987.lua | 60 ++++++++++--------- official/c57261568.lua | 87 +++++++++++++++------------- official/c80630522.lua | 49 ++++++++-------- official/c81752019.lua | 54 ++++++++++------- official/c89818984.lua | 88 ++++++++++++++-------------- official/c94388754.lua | 80 ++++++++++++++------------ unofficial/c511001692.lua | 2 +- unofficial/c511001693.lua | 2 +- unofficial/c511001694.lua | 2 +- unofficial/c511001695.lua | 2 +- unofficial/c511001696.lua | 2 +- unofficial/c511001697.lua | 2 +- unofficial/c511001698.lua | 2 +- unofficial/c511001699.lua | 2 +- unofficial/c511001700.lua | 2 +- unofficial/c511001723.lua | 2 +- unofficial/c511001724.lua | 2 +- unofficial/c511001725.lua | 2 +- unofficial/proc_unofficial.lua | 20 +++---- 26 files changed, 559 insertions(+), 514 deletions(-) diff --git a/official/c16024176.lua b/official/c16024176.lua index e1e01ed00f..f4a9eb5cec 100644 --- a/official/c16024176.lua +++ b/official/c16024176.lua @@ -3,88 +3,90 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon itself from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 1 "Flower Cardian" monster, except "Flower Cardian Pine with Crane" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw and special summon + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --Draw 1 card local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) - --draw during battle - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE|PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(s.drcon) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,ft,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==1 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(1) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -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) diff --git a/official/c16802689.lua b/official/c16802689.lua index 1bd90cfa06..8646f0c813 100644 --- a/official/c16802689.lua +++ b/official/c16802689.lua @@ -3,87 +3,89 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon summon from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 12 "Flower Cardian" monster, except "Flower Cardian Paulownia with Phoenix" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw and special summon + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --Draw 1 card local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) - --draw during battle - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCountLimit(1) - e3:SetCondition(s.drcon) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==12 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(12) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) diff --git a/official/c17141718.lua b/official/c17141718.lua index 340fa9ec26..f479532997 100644 --- a/official/c17141718.lua +++ b/official/c17141718.lua @@ -2,82 +2,83 @@ --Flower Cardian Zebra Grass local s,id=GetID() function s.initial_effect(c) - --spsummon + --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:SetDescription(aux.Stringid(id,0)) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --shuffle - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetDescription(aux.Stringid(id,1)) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + c:RegisterEffect(e1) + --Reveal any number of "Flower Cardian" monsters in your hand, shuffle them into the Deck, then draw the same number of cards + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetTarget(s.drtg) + e2a:SetOperation(s.drop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) end s.listed_series={SET_FLOWER_CARDIAN} -function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(7) +function s.spconfilter(c) + return c:IsLevelBelow(7) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) -end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) end -function s.filter(c) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsAbleToDeck() and not c:IsPublic() +function s.tdfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and c:IsAbleToDeck() and not c:IsPublic() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetTargetPlayer(tp) + and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,s.filter,p,LOCATION_HAND,0,1,99,nil) +function s.drop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND,0,1,99,nil) if #g>0 then - Duel.ConfirmCards(1-p,g) + Duel.ConfirmCards(1-tp,g) local ct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,ct,REASON_EFFECT) - Duel.ShuffleHand(p) + if ct>0 then + Duel.ShuffleDeck(tp) + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,ct,REASON_EFFECT) + end + end end end \ No newline at end of file diff --git a/official/c21772453.lua b/official/c21772453.lua index 6ecc1aea61..7b0a515e47 100644 --- a/official/c21772453.lua +++ b/official/c21772453.lua @@ -3,75 +3,79 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon rule + --Must first be Special Summoned (from your hand) by Tributing 1 "Flower Cardian" monster, except "Flower Cardian Maple with Deer" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, you can destroy 1 Spell/Trap Card your opponent controls local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) +function s.selfspfilter(c) return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.desfilter(c) - return c:IsSpellTrap() -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - local sg=g:Select(tp,1,1,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end end else Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c30382214.lua b/official/c30382214.lua index 14e81d632f..4839084c22 100644 --- a/official/c30382214.lua +++ b/official/c30382214.lua @@ -3,24 +3,24 @@ --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Special Summon itself from hand + --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:SetDescription(aux.Stringid(id,0)) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --Draw 1 and search or Special Summon + c:RegisterEffect(e1) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, you can take 1 "Flower Cardian" monster from your Deck, except "Flower Cardian Cherry Blossom", and either add it to your hand or Special Summon it local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) e2:SetCost(s.drcost) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) @@ -28,42 +28,40 @@ function s.initial_effect(c) end s.listed_names={id} s.listed_series={SET_FLOWER_CARDIAN} -function s.filter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(2) +function s.spconfilter(c) + return c:IsLevelBelow(2) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) -end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) end -s.cfilter=aux.FaceupFilter(Card.IsSetCard,SET_FLOWER_CARDIAN) function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_FLOWER_CARDIAN) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_FLOWER_CARDIAN) Duel.Release(g,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -75,32 +73,35 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.spfilter(c) - return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) +function s.thspfilter(c,e,tp,mmz_chk) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and not c:IsCode(id) and (c:IsAbleToHand() + or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local g=Duel.GetMatchingGroup(s.thspfilter,tp,LOCATION_DECK,0,nil,e,tp,mmz_chk) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=sg:Select(tp,1,1,nil):GetFirst() + local sc=g:Select(tp,1,1,nil):GetFirst() + Duel.BreakEffect() aux.ToHandOrElse(sc,tp, - function(c) - return sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + function() + return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function(c) + function() return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,0) + aux.Stringid(id,4) ) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c43413875.lua b/official/c43413875.lua index 4a0223c7b8..5952373283 100644 --- a/official/c43413875.lua +++ b/official/c43413875.lua @@ -3,80 +3,85 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --spsummon from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 8 "Flower Cardian" monster, except "Flower Cardian Zebra Grass with Moon" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw(spsummon) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --Draw 1 card local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCountLimit(1) + e2:SetCondition(aux.bdocon) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) - --draw(battle) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCountLimit(1) - e3:SetCondition(aux.bdocon) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==8 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(8) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c54135423.lua b/official/c54135423.lua index 8e58c05853..67784b2652 100644 --- a/official/c54135423.lua +++ b/official/c54135423.lua @@ -2,78 +2,76 @@ --Flower Cardian Willow local s,id=GetID() function s.initial_effect(c) - --spsummon + --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:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --shuffle + c:RegisterEffect(e1) + --Shuffle 1 "Flower Cardian" monster from your GY into your Deck, then draw 1 card local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} -function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(10) +function s.spconfilter(c) + return c:IsLevelBelow(10) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) -end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) end -function s.filter(c) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsAbleToDeck() +function s.tdfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and c:IsAbleToDeck() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) + and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=1 then return end - Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) - if ct==1 then +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then + if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) end Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end diff --git a/official/c5489987.lua b/official/c5489987.lua index 9f05b05873..b93694548c 100644 --- a/official/c5489987.lua +++ b/official/c5489987.lua @@ -3,80 +3,86 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --draw + --Draw 1 card, and if you do, show it, then Special Summon this card if the drawn card is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.drcost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --atk up + c:RegisterEffect(e1) + --Your battling "Flower Cardian" monster gains 1000 ATK until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(s.atkcon) e2:SetCost(Cost.SelfDiscard) + e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsPublic() end -end +s.listed_series={SET_FLOWER_CARDIAN} function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,c,2,tp,LOCATION_HAND) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then + if Duel.Draw(p,d,REASON_EFFECT)>0 then local c=e:GetHandler() - local g=Duel.GetOperatedGroup() - local tc=g:GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then if c:IsRelateToEffect(e) then - if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then + Duel.BreakEffect() + if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then c:CompleteProcedure() end end else + local g=Group.FromCards(dc) if c:IsRelateToEffect(e) then g:AddCard(c) end + Duel.BreakEffect() Duel.SendtoGrave(g,REASON_EFFECT) end Duel.ShuffleHand(tp) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local tc=Duel.GetAttackTarget() - if not tc then return false end - if tc:IsControler(1-tp) then tc=Duel.GetAttacker() end - e:SetLabelObject(tc) - return tc:IsFaceup() and tc:IsSetCard(SET_FLOWER_CARDIAN) and tc:IsRelateToBattle() + if not aux.StatChangeDamageStepCondition() then return false end + local bc1,bc2=Duel.GetBattleMonster(tp) + return bc1 and bc2 and bc1:IsSetCard(SET_FLOWER_CARDIAN) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc=Duel.GetBattleMonster(tp) + e:SetLabelObject(bc) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then + local bc=e:GetLabelObject() + if bc:IsRelateToBattle() and bc:IsFaceup() and bc:IsControler(tp) then + --Your battling monster gains 1000 ATK until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) + bc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c57261568.lua b/official/c57261568.lua index 6f8a0de876..7eac1c74b1 100644 --- a/official/c57261568.lua +++ b/official/c57261568.lua @@ -3,81 +3,88 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon rule + --Must first be Special Summoned (from your hand) by Tributing 1 "Flower Cardian" monster, except "Flower Cardian Peony with Butterfly" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, look at the top 3 cards of your opponent's Deck, then place them all on the top or bottom of the Deck in any order local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) + c:RegisterEffect(e1) + --When this card is used as Synchro Material, you can treat it and all other Synchro Materials (that have a Level) as Level 2 monsters local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) + e2:SetOperation(s.synop) c:RegisterEffect(e2) - --synchro - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e3:SetOperation(s.synop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c) +function s.selfspfilter(c) return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local ct=math.min(Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0),3) - if ct==0 then return end + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + local deck_ct=Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0) + local ct=math.min(deck_ct,3) + if ct==0 then Duel.ShuffleHand(tp) return end Duel.BreakEffect() local g=Duel.GetDecktopGroup(1-tp,ct) Duel.ConfirmCards(tp,g) - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + local op=0 + if deck_ct>3 then + op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) + end Duel.SortDecktop(tp,1-tp,ct) - if opt==0 then + if op==1 then Duel.MoveToDeckBottom(ct,1-tp) end else Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c80630522.lua b/official/c80630522.lua index ee51e2c27b..4f9105ae13 100644 --- a/official/c80630522.lua +++ b/official/c80630522.lua @@ -2,66 +2,69 @@ --Flower Cardian Paulownia local s,id=GetID() function s.initial_effect(c) - --Special summon itself from hand + --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:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --Draw 1 + c:RegisterEffect(e1) + --Negate the attack, end the Battle Phase, then draw 1 card local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DRAW) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} -function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(11) +function s.spconfilter(c) + return c:IsLevelBelow(11) and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,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 Normal or Special Summon monsters for the rest of this turn, except "Flower Cardian" monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_FLOWER_CARDIAN) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end -function s.splimit(e,c) - return not c:IsSetCard(SET_FLOWER_CARDIAN) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end end end \ No newline at end of file diff --git a/official/c81752019.lua b/official/c81752019.lua index 694e55c13e..3019591840 100644 --- a/official/c81752019.lua +++ b/official/c81752019.lua @@ -2,49 +2,59 @@ --Flower Cardian Pine local s,id=GetID() function s.initial_effect(c) - --draw (summon) + --Draw 1 card, show it, then send it to the GY unless it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetTarget(s.drtg) - e1:SetOperation(s.drop1) + e1:SetTarget(s.nsdrtg) + e1:SetOperation(s.nsdrop) c:RegisterEffect(e1) - --draw (destroy) + --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:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(s.drcon) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop2) + e2:SetCondition(s.desdrcon) + e2:SetTarget(s.desdrtg) + e2:SetOperation(s.desdrop) c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end +function s.nsdrtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.drop1(e,tp,eg,ep,ev,re,r,rp) +function s.nsdrop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if not (tc:IsSetCard(SET_FLOWER_CARDIAN) and tc:IsMonster()) then - Duel.SendtoGrave(tc,REASON_EFFECT) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if not (dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster()) then + Duel.SendtoGrave(dc,REASON_EFFECT) + end + Duel.ShuffleHand(tp) end - Duel.ShuffleHand(tp) end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) +function s.desdrcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) - or (rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)) + return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) + and c:IsPreviousControler(tp)) +end +function s.desdrtg(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.drop2(e,tp,eg,ep,ev,re,r,rp) +function s.desdrop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c89818984.lua b/official/c89818984.lua index f108c92f25..b4aef87897 100644 --- a/official/c89818984.lua +++ b/official/c89818984.lua @@ -3,76 +3,80 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --spsummon from hand + --Must first be Special Summoned (from your hand) by Tributing 1 Level 11 "Flower Cardian" monster, except "Flower Cardian Willow with Calligrapher" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then you can Special Summon it if it is a "Flower Cardian" monster local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) - --draw + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drsptg) + e1:SetOperation(s.drspop) + c:RegisterEffect(e1) + --When this card is used as Synchro Material, you can treat it and all other Synchro Materials (that have a Level) as Level 2 monsters local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) + e2:SetOperation(s.synop) c:RegisterEffect(e2) - --synchro - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e3:SetOperation(s.synop) - c:RegisterEffect(e3) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) - return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==11 and not c:IsCode(id) +function s.selfspfilter(c) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevel(11) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end else - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.BreakEffect() + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/official/c94388754.lua b/official/c94388754.lua index 65850d9f43..0f354cd3ff 100644 --- a/official/c94388754.lua +++ b/official/c94388754.lua @@ -3,71 +3,79 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon rule + --Must first be Special Summoned (from your hand) by Tributing 1 "Flower Cardian" monster, except "Flower Cardian Clover with Boar" + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Draw 1 card, and if you do, show it, then, if it is a "Flower Cardian" monster, you can destroy 1 monster your opponent controls local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) end s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} -function s.hspfilter(c,tp) +function s.selfspfilter(c) return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end -function s.hspcon(e,c) +function s.selfspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),s.hspfilter,1,false,1,true,c,c:GetControler(),nil,false,nil) + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspfilter,1,false,1,true,c,tp,nil,false,nil) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,s.hspfilter,1,1,false,true,true,c,nil,nil,false,nil) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspfilter,1,1,false,true,true,c,nil,nil,false,nil) if g then g:KeepAlive() e:SetLabelObject(g) - return true + return true end return false end -function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then - Duel.BreakEffect() - local sg=g:Select(tp,1,1,nil) - Duel.Destroy(sg,REASON_EFFECT) + if Duel.Draw(p,d,REASON_EFFECT)>0 then + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + if dc:IsSetCard(SET_FLOWER_CARDIAN) and dc:IsMonster() then + if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end end else Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) + Duel.SendtoGrave(dc,REASON_EFFECT) end Duel.ShuffleHand(tp) end diff --git a/unofficial/c511001692.lua b/unofficial/c511001692.lua index 1bb5042c8d..e2367c8b17 100644 --- a/unofficial/c511001692.lua +++ b/unofficial/c511001692.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001693.lua b/unofficial/c511001693.lua index 4f663bcc39..8d337dcc29 100644 --- a/unofficial/c511001693.lua +++ b/unofficial/c511001693.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001694.lua b/unofficial/c511001694.lua index cffcb33a76..bbcc7e2c12 100644 --- a/unofficial/c511001694.lua +++ b/unofficial/c511001694.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001695.lua b/unofficial/c511001695.lua index a296ddc009..0ee19c42bc 100644 --- a/unofficial/c511001695.lua +++ b/unofficial/c511001695.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/c511001696.lua b/unofficial/c511001696.lua index 439b94802d..c22b2322b2 100644 --- a/unofficial/c511001696.lua +++ b/unofficial/c511001696.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001697.lua b/unofficial/c511001697.lua index 8747b9217f..a60925ec10 100644 --- a/unofficial/c511001697.lua +++ b/unofficial/c511001697.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001698.lua b/unofficial/c511001698.lua index f4f022075e..485fdf0c10 100644 --- a/unofficial/c511001698.lua +++ b/unofficial/c511001698.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/c511001699.lua b/unofficial/c511001699.lua index c0b268e7c5..64c6961e88 100644 --- a/unofficial/c511001699.lua +++ b/unofficial/c511001699.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) diff --git a/unofficial/c511001700.lua b/unofficial/c511001700.lua index afe2ca7ba3..6f02bc7817 100644 --- a/unofficial/c511001700.lua +++ b/unofficial/c511001700.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) --synchro level local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c511001723.lua b/unofficial/c511001723.lua index 5b4e4c7994..298995a54c 100644 --- a/unofficial/c511001723.lua +++ b/unofficial/c511001723.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/c511001724.lua b/unofficial/c511001724.lua index 51a82a7468..5e7e425c12 100644 --- a/unofficial/c511001724.lua +++ b/unofficial/c511001724.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) --synchro level local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c511001725.lua b/unofficial/c511001725.lua index 6f2f944f87..81c175df5d 100644 --- a/unofficial/c511001725.lua +++ b/unofficial/c511001725.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_CARDIAN) + c:RegisterEffect(e1) end function s.filter(c) local re=c:GetReasonEffect() diff --git a/unofficial/proc_unofficial.lua b/unofficial/proc_unofficial.lua index 07d34c1910..ee9b84c074 100644 --- a/unofficial/proc_unofficial.lua +++ b/unofficial/proc_unofficial.lua @@ -258,19 +258,13 @@ end ------------------------------------------------------------- Cardian={} function Cardian.CheckSpCondition(c) - if c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() then - local eff={c:GetCardEffect(511001692)} - for _,te2 in ipairs(eff) do - local te=te2:GetLabelObject() - if te:GetType()==EFFECT_TYPE_FIELD then - local con=te:GetCondition() - if not con or con(te,c) then - return true - end - else - if te:IsActivatable(te:GetHandlerPlayer(),true,true) then - return true - end + if not (c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster()) then return false end + local effs={c:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCode()&EFFECT_SPSUMMON_PROC==EFFECT_SPSUMMON_PROC then + local con=eff:GetCondition() + if con==nil or con(eff,c) then + return true end end end From bd0bd0baa93a0b459216d484bed99d668ad12c8a Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:29:13 +0800 Subject: [PATCH 091/165] update utility.lua added mechanism for tracking functions that were generated with Cost.Detach --- utility.lua | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/utility.lua b/utility.lua index 74222e734c..8125c07dcc 100644 --- a/utility.lua +++ b/utility.lua @@ -1510,31 +1510,30 @@ function Cost.Discard(filter,other,count) Duel.DiscardHand(tp,filter,count,count,REASON_COST|REASON_DISCARD,exclude) end end --- "Detach Xyz Material Cost Generator" --- Generates a function to be used by Effect.SetCost in order to detach --- a number of Xyz Materials from the Effect's handler. --- `min` minimum number of materials to check for detachment. --- `max` maximum number of materials to detach or a function that gets called --- as if by doing max(e,tp) in order to get the value of max detachments. --- `op` optional function that gets called by passing the effect and the operated --- group of just detached materials in order to do some additional handling with --- them. + +local detach_costs={} function Cost.Detach(min,max,op) max=max or min + do --Perform some sanity checks, simplifies debugging + local min_type=type(min) local max_type=type(max) local op_type=type(op) - if type(min)~="number" then - error("Parameter 1 should be an Integer",2) + if min_type~="number" and min_type~="function" then + error("Parameter 1 should be an Integer|function",2) end if max_type~="number" and max_type~="function" then error("Parameter 2 should be Integer|function",2) end if op_type~="nil" and op_type~="function" then - error("Parameter 2 should be nil|function",2) + error("Parameter 3 should be nil|function",2) end end - return function(e,tp,eg,ep,ev,re,r,rp,chk) + + local function cost_func(e,tp,eg,ep,ev,re,r,rp,chk) + if min_type=="function" then min=min(e,tp) end + if max_type=="function" then max=max(e,tp) end + local c=e:GetHandler() local nn=c:IsSetCard(SET_NUMERON) and c:IsType(TYPE_XYZ) and Duel.IsPlayerAffectedByEffect(tp,CARD_NUMERON_NETWORK) local crm=c:CheckRemoveOverlayCard(tp,min,REASON_COST) @@ -1543,11 +1542,18 @@ function Cost.Detach(min,max,op) --Do not execute `op`, hint at "Numeron Network" being applied return Duel.Hint(HINT_CARD,tp,CARD_NUMERON_NETWORK) end - local m=type(max)=="number" and max or max(e,tp) - if c:RemoveOverlayCard(tp,min,m,REASON_COST)>0 and op then + + if c:RemoveOverlayCard(tp,min,max,REASON_COST)>0 and op then op(e,Duel.GetOperatedGroup()) end end + + detach_costs[cost_func]=true + return cost_func +end + +function Effect.HasDetachCost(e) + return detach_costs[e:GetCost()] end --Default cost for "You can pay X LP;" @@ -1593,7 +1599,8 @@ end function Cost.AND(...) local fns={...} - return function(e,tp,eg,ep,ev,re,r,rp,chk) + + local function full_cost(e,tp,eg,ep,ev,re,r,rp,chk) --when checking, stop at the first falsy value if chk==0 then for _,fn in ipairs(fns) do @@ -1606,6 +1613,11 @@ function Cost.AND(...) fn(e,tp,eg,ep,ev,re,r,rp,1) end end + + for _,fn in ipairs(fns) do + if detach_costs[fn] then detach_costs[full_cost]=true end + end + return full_cost end From 5bc59cc4915c0a1c9ad9d3753c3846d74002e865 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:32:47 +0800 Subject: [PATCH 092/165] update "Tachyon Unit" * use new function for checking effects with a detach cost * modernization --- unofficial/c511002571.lua | 104 ++++++++++++++------------------------ 1 file changed, 39 insertions(+), 65 deletions(-) diff --git a/unofficial/c511002571.lua b/unofficial/c511002571.lua index 82a7d4f6ca..9b16f9f542 100644 --- a/unofficial/c511002571.lua +++ b/unofficial/c511002571.lua @@ -3,83 +3,57 @@ Duel.LoadScript("c420.lua") local s,id=GetID() function s.initial_effect(c) - --Activate + --Activate 1 "Tachyon" monster's effect that is activated by detaching its own Xyz Material(s) local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetCost(Cost.PayLP(500)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) +function s.runfn(fn,eff,re,tp,chk) + return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,re,REASON_EFFECT,PLAYER_NONE,chk) end -function s.filter(c,e,tp) - if c:IsFacedown() or not c:IsTachyon() or not c:IsHasEffect(id) then return false end - local eff={c:GetCardEffect(id)} - for _,teh in ipairs(eff) do - local te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local con=te:GetCondition() - local tg=te:GetTarget() - if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE)) - and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,0)) then return true - end +function s.efffilter(c,e,tp) + if c:IsFacedown() or not c:IsTachyon() then return false end + for _,eff in ipairs({c:GetOwnEffects()}) do + if eff:HasDetachCost() and s.runfn(eff:GetCondition(),eff,e,tp) and s.runfn(eff:GetTarget(),eff,e,tp,0) then return true end end return false 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.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.efffilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.efffilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SelectTarget(tp,s.efffilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local eff={tc:GetCardEffect(id)} - local te=nil - local acd={} - local ac={} - for _,teh in ipairs(eff) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - local con=temp:GetCondition() - local tg=temp:GetTarget() - if (not con or con(temp,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE)) - and (not tg or tg(temp,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,0)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end - end - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - op=Duel.SelectOption(tp,table.unpack(acd)) - op=op+1 - te=ac[op] - end - if not te then return end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local tg=te:GetTarget() - if tg then tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,1) end - Duel.BreakEffect() - tc:CreateEffectRelation(te) - Duel.BreakEffect() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - for etc in aux.Next(g) do - etc:CreateEffectRelation(te) - end - local operation=te:GetOperation() - if operation then operation(te,tp,Group.CreateGroup(),PLAYER_NONE,0,teh,REASON_EFFECT,PLAYER_NONE,1) end - tc:ReleaseEffectRelation(te) - for etc in aux.Next(g) do - etc:ReleaseEffectRelation(te) + if not tc:IsRelateToEffect(e) then return end + local effs={} + local options={} + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasDetachCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,e,tp) and s.runfn(eff:GetTarget(),eff,e,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) end end -end \ No newline at end of file + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end + Duel.ClearTargetCard() + s.runfn(te:GetTarget(),te,e,tp,1) + Duel.BreakEffect() + tc:CreateEffectRelation(te) + Duel.BreakEffect() + local tg=Duel.GetTargetCards(te) + tg:ForEach(Card.CreateEffectRelation,te) + s.runfn(te:GetOperation(),te,e,tp,1) + tg:ForEach(Card.ReleaseEffectRelation,te) +end From a3439ddbcc963dd8f7b33835838cc2f3e476ae20 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:38:56 +0800 Subject: [PATCH 093/165] remove uses of EFFECT_MARKER_DETACH_XMAT --- official/c10000030.lua | 4 ++-- official/c10389142.lua | 4 ++-- official/c10406322.lua | 4 ++-- official/c10443957.lua | 4 ++-- official/c10613952.lua | 4 ++-- official/c10666000.lua | 2 +- official/c10678778.lua | 4 ++-- official/c11398059.lua | 2 +- official/c11411223.lua | 4 ++-- official/c11441009.lua | 4 ++-- official/c11510448.lua | 4 ++-- official/c11522979.lua | 4 ++-- official/c11646785.lua | 4 ++-- official/c12014404.lua | 4 ++-- official/c12219047.lua | 4 ++-- official/c1249315.lua | 2 +- official/c12533811.lua | 4 ++-- official/c12615446.lua | 4 ++-- official/c12632096.lua | 4 ++-- official/c1269512.lua | 4 ++-- official/c13030280.lua | 4 ++-- official/c13183454.lua | 4 ++-- official/c14152862.lua | 4 ++-- official/c1426714.lua | 4 ++-- official/c14301396.lua | 4 ++-- official/c14306092.lua | 4 ++-- official/c15092394.lua | 4 ++-- official/c15232745.lua | 4 ++-- official/c15561463.lua | 4 ++-- official/c15862758.lua | 4 ++-- official/c15914410.lua | 4 ++-- official/c15939229.lua | 6 +++--- official/c16037007.lua | 4 ++-- official/c16110708.lua | 4 ++-- official/c16195942.lua | 4 ++-- official/c1621413.lua | 6 +++--- official/c1639384.lua | 4 ++-- official/c16643334.lua | 4 ++-- official/c16691074.lua | 4 ++-- official/c16699558.lua | 4 ++-- official/c1688285.lua | 4 ++-- official/c16955631.lua | 4 ++-- official/c17016362.lua | 4 ++-- official/c1828513.lua | 4 ++-- official/c18326736.lua | 6 +++--- official/c18511599.lua | 4 ++-- official/c18897163.lua | 4 ++-- official/c18963306.lua | 4 ++-- official/c19333131.lua | 4 ++-- official/c19369609.lua | 4 ++-- official/c19684740.lua | 4 ++-- official/c19891310.lua | 4 ++-- official/c1992816.lua | 4 ++-- official/c20145685.lua | 4 ++-- official/c20343502.lua | 4 ++-- official/c20563387.lua | 4 ++-- official/c2061963.lua | 4 ++-- official/c20785975.lua | 4 ++-- official/c2091298.lua | 4 ++-- official/c21044178.lua | 4 ++-- official/c21065189.lua | 4 ++-- official/c21223277.lua | 4 ++-- official/c21313376.lua | 4 ++-- official/c21501505.lua | 4 ++-- official/c21521304.lua | 4 ++-- official/c21858819.lua | 4 ++-- official/c2191144.lua | 4 ++-- official/c22110647.lua | 4 ++-- official/c22653490.lua | 4 ++-- official/c23454876.lua | 4 ++-- official/c23603403.lua | 4 ++-- official/c23649496.lua | 4 ++-- official/c23776077.lua | 4 ++-- official/c23848752.lua | 4 ++-- official/c24701066.lua | 4 ++-- official/c2530830.lua | 4 ++-- official/c25341652.lua | 4 ++-- official/c26096328.lua | 4 ++-- official/c26211048.lua | 4 ++-- official/c26329679.lua | 4 ++-- official/c26556950.lua | 4 ++-- official/c26563200.lua | 4 ++-- official/c2665273.lua | 4 ++-- official/c26988374.lua | 4 ++-- official/c27069566.lua | 4 ++-- official/c27337596.lua | 4 ++-- official/c27420823.lua | 6 +++--- official/c27552504.lua | 4 ++-- official/c2766877.lua | 4 ++-- official/c28150174.lua | 4 ++-- official/c28290705.lua | 4 ++-- official/c28346136.lua | 4 ++-- official/c28400508.lua | 4 ++-- official/c28781003.lua | 4 ++-- official/c28912357.lua | 4 ++-- official/c2896663.lua | 4 ++-- official/c28981598.lua | 4 ++-- official/c29085954.lua | 4 ++-- official/c29208536.lua | 2 +- official/c29423048.lua | 4 ++-- official/c29510428.lua | 4 ++-- official/c29515122.lua | 4 ++-- official/c29669359.lua | 4 ++-- official/c2978414.lua | 8 ++++---- official/c30095833.lua | 4 ++-- official/c30100551.lua | 4 ++-- official/c30128445.lua | 4 ++-- official/c30350202.lua | 4 ++-- official/c30439101.lua | 4 ++-- official/c30741334.lua | 4 ++-- official/c31123642.lua | 4 ++-- official/c31320433.lua | 4 ++-- official/c31437713.lua | 4 ++-- official/c31539614.lua | 2 +- official/c31563350.lua | 4 ++-- official/c31801517.lua | 4 ++-- official/c32003338.lua | 4 ++-- official/c32224143.lua | 4 ++-- official/c32302078.lua | 4 ++-- official/c32446630.lua | 4 ++-- official/c32530043.lua | 4 ++-- official/c32559361.lua | 4 ++-- official/c3292267.lua | 4 ++-- official/c33776843.lua | 4 ++-- official/c33779875.lua | 6 +++--- official/c33909817.lua | 4 ++-- official/c34086406.lua | 4 ++-- official/c34481518.lua | 4 ++-- official/c34909328.lua | 2 +- official/c34945480.lua | 4 ++-- official/c3594985.lua | 4 ++-- official/c359563.lua | 4 ++-- official/c36076683.lua | 4 ++-- official/c36757171.lua | 4 ++-- official/c36776089.lua | 4 ++-- official/c37057743.lua | 4 ++-- official/c37164373.lua | 4 ++-- official/c37279508.lua | 4 ++-- official/c3743515.lua | 4 ++-- official/c3758046.lua | 4 ++-- official/c37649320.lua | 4 ++-- official/c3790062.lua | 4 ++-- official/c37926346.lua | 4 ++-- official/c38026562.lua | 4 ++-- official/c3814632.lua | 4 ++-- official/c38180759.lua | 4 ++-- official/c38250531.lua | 4 ++-- official/c38273745.lua | 4 ++-- official/c3828844.lua | 4 ++-- official/c38495396.lua | 4 ++-- official/c38694052.lua | 2 +- official/c39030163.lua | 4 ++-- official/c39139935.lua | 4 ++-- official/c39272762.lua | 4 ++-- official/c39622156.lua | 4 ++-- official/c3989465.lua | 4 ++-- official/c39972129.lua | 4 ++-- official/c39987164.lua | 4 ++-- official/c4019153.lua | 4 ++-- official/c40390147.lua | 4 ++-- official/c40424929.lua | 4 ++-- official/c40673853.lua | 4 ++-- official/c41147577.lua | 4 ++-- official/c41309158.lua | 4 ++-- official/c41375811.lua | 2 +- official/c41522092.lua | 4 ++-- official/c41524885.lua | 4 ++-- official/c42160203.lua | 4 ++-- official/c42230449.lua | 4 ++-- official/c42421606.lua | 4 ++-- official/c42589641.lua | 4 ++-- official/c42741437.lua | 4 ++-- official/c42752141.lua | 4 ++-- official/c42940335.lua | 4 ++-- official/c43047672.lua | 4 ++-- official/c440556.lua | 4 ++-- official/c4423206.lua | 4 ++-- official/c44311445.lua | 4 ++-- official/c44405066.lua | 4 ++-- official/c44505297.lua | 4 ++-- official/c44698398.lua | 4 ++-- official/c45533023.lua | 4 ++-- official/c45742626.lua | 4 ++-- official/c45852939.lua | 4 ++-- official/c46772449.lua | 4 ++-- official/c46871387.lua | 4 ++-- official/c46895036.lua | 4 ++-- official/c47017574.lua | 4 ++-- official/c47060528.lua | 2 +- official/c47132793.lua | 4 ++-- official/c47349116.lua | 4 ++-- official/c47506081.lua | 4 ++-- official/c47579719.lua | 4 ++-- official/c47805931.lua | 4 ++-- official/c48348921.lua | 4 ++-- official/c48608796.lua | 4 ++-- official/c48739166.lua | 4 ++-- official/c48905153.lua | 4 ++-- official/c48928529.lua | 4 ++-- official/c49032236.lua | 4 ++-- official/c49121795.lua | 4 ++-- official/c49202331.lua | 4 ++-- official/c49221191.lua | 4 ++-- official/c49456901.lua | 4 ++-- official/c49678559.lua | 4 ++-- official/c4997565.lua | 4 ++-- official/c5014629.lua | 4 ++-- official/c50260683.lua | 4 ++-- official/c50449881.lua | 4 ++-- official/c50789693.lua | 4 ++-- official/c5088741.lua | 4 ++-- official/c51497409.lua | 4 ++-- official/c51543904.lua | 4 ++-- official/c51735257.lua | 4 ++-- official/c51960178.lua | 4 ++-- official/c52323874.lua | 4 ++-- official/c52558805.lua | 4 ++-- official/c52653092.lua | 4 ++-- official/c53054164.lua | 2 +- official/c53244294.lua | 4 ++-- official/c53334641.lua | 4 ++-- official/c53701457.lua | 4 ++-- official/c54358015.lua | 4 ++-- official/c54366836.lua | 4 ++-- official/c54719828.lua | 4 ++-- official/c5530780.lua | 4 ++-- official/c55470553.lua | 4 ++-- official/c55727845.lua | 4 ++-- official/c55935416.lua | 4 ++-- official/c56051086.lua | 4 ++-- official/c56292140.lua | 4 ++-- official/c56337500.lua | 4 ++-- official/c56638325.lua | 4 ++-- official/c56832966.lua | 4 ++-- official/c56910167.lua | 4 ++-- official/c57031794.lua | 6 +++--- official/c57043117.lua | 4 ++-- official/c57314798.lua | 4 ++-- official/c57450198.lua | 6 +++--- official/c57566760.lua | 4 ++-- official/c57707471.lua | 4 ++-- official/c58058134.lua | 4 ++-- official/c58069384.lua | 4 ++-- official/c581014.lua | 4 ++-- official/c58504745.lua | 4 ++-- official/c58600555.lua | 4 ++-- official/c58712976.lua | 4 ++-- official/c58720904.lua | 4 ++-- official/c58820923.lua | 4 ++-- official/c59071624.lua | 6 +++--- official/c5916510.lua | 4 ++-- official/c59170782.lua | 6 +++--- official/c59208943.lua | 4 ++-- official/c59242457.lua | 4 ++-- official/c59627393.lua | 4 ++-- official/c60195675.lua | 4 ++-- official/c60517697.lua | 4 ++-- official/c60645181.lua | 4 ++-- official/c60992364.lua | 4 ++-- official/c61307542.lua | 2 +- official/c61344030.lua | 4 ++-- official/c61374414.lua | 4 ++-- official/c61399402.lua | 4 ++-- official/c6165656.lua | 4 ++-- official/c62070231.lua | 4 ++-- official/c6247535.lua | 4 ++-- official/c62541668.lua | 4 ++-- official/c62709239.lua | 4 ++-- official/c6284176.lua | 4 ++-- official/c62967433.lua | 4 ++-- official/c63746411.lua | 4 ++-- official/c63767246.lua | 4 ++-- official/c6387204.lua | 4 ++-- official/c64245689.lua | 4 ++-- official/c64276752.lua | 4 ++-- official/c64332231.lua | 4 ++-- official/c64414267.lua | 4 ++-- official/c64554883.lua | 4 ++-- official/c64689404.lua | 4 ++-- official/c6511113.lua | 4 ++-- official/c65301952.lua | 4 ++-- official/c65676461.lua | 4 ++-- official/c65884091.lua | 4 ++-- official/c65892585.lua | 4 ++-- official/c66011101.lua | 4 ++-- official/c66506689.lua | 4 ++-- official/c66523544.lua | 4 ++-- official/c66547759.lua | 4 ++-- official/c6659193.lua | 4 ++-- official/c66970002.lua | 4 ++-- official/c67173574.lua | 4 ++-- official/c68300121.lua | 4 ++-- official/c68396121.lua | 4 ++-- official/c68597372.lua | 4 ++-- official/c68618157.lua | 6 +++--- official/c68679595.lua | 4 ++-- official/c68836428.lua | 4 ++-- official/c69058960.lua | 4 ++-- official/c69069911.lua | 4 ++-- official/c69170557.lua | 4 ++-- official/c69610924.lua | 4 ++-- official/c69655484.lua | 6 +++--- official/c69757518.lua | 4 ++-- official/c6983839.lua | 4 ++-- official/c69840739.lua | 2 +- official/c698785.lua | 4 ++-- official/c7020743.lua | 4 ++-- official/c70636044.lua | 2 +- official/c71068247.lua | 4 ++-- official/c71612253.lua | 4 ++-- official/c7194917.lua | 4 ++-- official/c72409226.lua | 2 +- official/c72971064.lua | 4 ++-- official/c73082255.lua | 2 +- official/c73289035.lua | 4 ++-- official/c73347079.lua | 4 ++-- official/c73445448.lua | 4 ++-- official/c73659078.lua | 4 ++-- official/c73887236.lua | 4 ++-- official/c73964868.lua | 4 ++-- official/c74294676.lua | 8 ++++---- official/c74371660.lua | 4 ++-- official/c74416224.lua | 4 ++-- official/c74593218.lua | 4 ++-- official/c75083197.lua | 4 ++-- official/c75253697.lua | 4 ++-- official/c75367227.lua | 4 ++-- official/c75402014.lua | 4 ++-- official/c75433814.lua | 4 ++-- official/c75574498.lua | 4 ++-- official/c75620895.lua | 4 ++-- official/c75797046.lua | 4 ++-- official/c75840616.lua | 4 ++-- official/c7593748.lua | 4 ++-- official/c76067258.lua | 4 ++-- official/c7628844.lua | 4 ++-- official/c76290637.lua | 4 ++-- official/c76372778.lua | 4 ++-- official/c76419637.lua | 4 ++-- official/c76589815.lua | 4 ++-- official/c770365.lua | 4 ++-- official/c77205367.lua | 4 ++-- official/c77571454.lua | 4 ++-- official/c77799846.lua | 4 ++-- official/c78135071.lua | 4 ++-- official/c78144171.lua | 2 +- official/c78625448.lua | 4 ++-- official/c79559912.lua | 4 ++-- official/c79625003.lua | 4 ++-- official/c80117527.lua | 4 ++-- official/c80764541.lua | 4 ++-- official/c80796456.lua | 4 ++-- official/c80993256.lua | 2 +- official/c81122844.lua | 6 +++--- official/c8165596.lua | 2 +- official/c81927732.lua | 4 ++-- official/c82308875.lua | 4 ++-- official/c82633039.lua | 6 +++--- official/c82697249.lua | 4 ++-- official/c82944432.lua | 4 ++-- official/c83531441.lua | 4 ++-- official/c83827392.lua | 4 ++-- official/c84013237.lua | 4 ++-- official/c84025439.lua | 4 ++-- official/c84124261.lua | 4 ++-- official/c84224627.lua | 4 ++-- official/c84401683.lua | 4 ++-- official/c84417082.lua | 6 +++--- official/c8491961.lua | 4 ++-- official/c85004150.lua | 4 ++-- official/c85115440.lua | 4 ++-- official/c85121942.lua | 4 ++-- official/c85252081.lua | 6 +++--- official/c85692042.lua | 4 ++-- official/c85747929.lua | 4 ++-- official/c8617563.lua | 6 +++--- official/c86221741.lua | 4 ++-- official/c86238081.lua | 4 ++-- official/c86331741.lua | 4 ++-- official/c86532744.lua | 4 ++-- official/c86848580.lua | 4 ++-- official/c87327776.lua | 4 ++-- official/c87676171.lua | 4 ++-- official/c87911394.lua | 4 ++-- official/c88021907.lua | 4 ++-- official/c88120966.lua | 4 ++-- official/c88177324.lua | 4 ++-- official/c88581108.lua | 4 ++-- official/c88722973.lua | 4 ++-- official/c88754763.lua | 4 ++-- official/c88917691.lua | 4 ++-- official/c88942504.lua | 4 ++-- official/c89477759.lua | 4 ++-- official/c89516305.lua | 8 ++++---- official/c89642993.lua | 4 ++-- official/c90098780.lua | 4 ++-- official/c90162951.lua | 4 ++-- official/c90664857.lua | 2 +- official/c90726340.lua | 4 ++-- official/c90809975.lua | 4 ++-- official/c91279700.lua | 4 ++-- official/c91499077.lua | 4 ++-- official/c9161357.lua | 4 ++-- official/c91895091.lua | 4 ++-- official/c92661479.lua | 4 ++-- official/c9272381.lua | 2 +- official/c92918648.lua | 4 ++-- official/c93039339.lua | 4 ++-- official/c93568288.lua | 4 ++-- official/c93713837.lua | 4 ++-- official/c93730230.lua | 4 ++-- official/c94119480.lua | 4 ++-- official/c94151981.lua | 4 ++-- official/c94380860.lua | 4 ++-- official/c9453320.lua | 2 +- official/c9486959.lua | 4 ++-- official/c95113856.lua | 4 ++-- official/c95134948.lua | 4 ++-- official/c95169481.lua | 4 ++-- official/c95239444.lua | 4 ++-- official/c95243515.lua | 2 +- official/c95442074.lua | 4 ++-- official/c95474755.lua | 4 ++-- official/c95685352.lua | 4 ++-- official/c95992081.lua | 4 ++-- official/c96157835.lua | 4 ++-- official/c96471335.lua | 4 ++-- official/c96592102.lua | 4 ++-- official/c96864105.lua | 4 ++-- official/c97170107.lua | 6 +++--- official/c97403510.lua | 4 ++-- official/c97453744.lua | 4 ++-- official/c97584719.lua | 4 ++-- official/c99469936.lua | 4 ++-- official/c99666430.lua | 4 ++-- pre-release/c101302106.lua | 4 ++-- unofficial/c100000178.lua | 4 ++-- unofficial/c100000179.lua | 4 ++-- unofficial/c100000498.lua | 4 ++-- unofficial/c100000549.lua | 4 ++-- unofficial/c111011803.lua | 4 ++-- unofficial/c111011903.lua | 4 ++-- unofficial/c111011904.lua | 4 ++-- unofficial/c111011905.lua | 4 ++-- unofficial/c511000034.lua | 4 ++-- unofficial/c511000041.lua | 4 ++-- unofficial/c511000183.lua | 4 ++-- unofficial/c511000184.lua | 4 ++-- unofficial/c511000192.lua | 6 +++--- unofficial/c511000230.lua | 4 ++-- unofficial/c511000231.lua | 4 ++-- unofficial/c511000232.lua | 4 ++-- unofficial/c511000233.lua | 4 ++-- unofficial/c511000277.lua | 4 ++-- unofficial/c511000294.lua | 4 ++-- unofficial/c511000296.lua | 4 ++-- unofficial/c511000369.lua | 4 ++-- unofficial/c511000512.lua | 4 ++-- unofficial/c511000513.lua | 4 ++-- unofficial/c511000515.lua | 4 ++-- unofficial/c511000674.lua | 4 ++-- unofficial/c511000675.lua | 4 ++-- unofficial/c511001247.lua | 4 ++-- unofficial/c511001273.lua | 4 ++-- unofficial/c511001275.lua | 4 ++-- unofficial/c511001338.lua | 4 ++-- unofficial/c511001339.lua | 4 ++-- unofficial/c511001371.lua | 4 ++-- unofficial/c511001372.lua | 4 ++-- unofficial/c511001374.lua | 4 ++-- unofficial/c511001376.lua | 6 +++--- unofficial/c511001429.lua | 8 ++++---- unofficial/c511001430.lua | 4 ++-- unofficial/c511001431.lua | 4 ++-- unofficial/c511001432.lua | 4 ++-- unofficial/c511001624.lua | 4 ++-- unofficial/c511001659.lua | 4 ++-- unofficial/c511001706.lua | 4 ++-- unofficial/c511001776.lua | 4 ++-- unofficial/c511001777.lua | 4 ++-- unofficial/c511001778.lua | 2 +- unofficial/c511001779.lua | 4 ++-- unofficial/c511001781.lua | 4 ++-- unofficial/c511001791.lua | 4 ++-- unofficial/c511001997.lua | 4 ++-- unofficial/c511001998.lua | 4 ++-- unofficial/c511001999.lua | 4 ++-- unofficial/c511002001.lua | 4 ++-- unofficial/c511002054.lua | 4 ++-- unofficial/c511002058.lua | 4 ++-- unofficial/c511002059.lua | 6 +++--- unofficial/c511002060.lua | 4 ++-- unofficial/c511002064.lua | 4 ++-- unofficial/c511002075.lua | 4 ++-- unofficial/c511002076.lua | 4 ++-- unofficial/c511002077.lua | 4 ++-- unofficial/c511002079.lua | 4 ++-- unofficial/c511002088.lua | 4 ++-- unofficial/c511002090.lua | 4 ++-- unofficial/c511002091.lua | 4 ++-- unofficial/c511002092.lua | 4 ++-- unofficial/c511002111.lua | 4 ++-- unofficial/c511002112.lua | 4 ++-- unofficial/c511002384.lua | 4 ++-- unofficial/c511002482.lua | 4 ++-- unofficial/c511002543.lua | 4 ++-- unofficial/c511002599.lua | 4 ++-- unofficial/c511002658.lua | 4 ++-- unofficial/c511002727.lua | 4 ++-- unofficial/c511002737.lua | 4 ++-- unofficial/c511002749.lua | 4 ++-- unofficial/c511002762.lua | 4 ++-- unofficial/c511002763.lua | 4 ++-- unofficial/c511002764.lua | 4 ++-- unofficial/c511002778.lua | 4 ++-- unofficial/c511002829.lua | 4 ++-- unofficial/c511002830.lua | 4 ++-- unofficial/c511002839.lua | 4 ++-- unofficial/c511002855.lua | 4 ++-- unofficial/c511002858.lua | 4 ++-- unofficial/c511002864.lua | 4 ++-- unofficial/c511002866.lua | 6 +++--- unofficial/c511002870.lua | 4 ++-- unofficial/c511002871.lua | 4 ++-- unofficial/c511002872.lua | 4 ++-- unofficial/c511002873.lua | 4 ++-- unofficial/c511002896.lua | 4 ++-- unofficial/c511002912.lua | 4 ++-- unofficial/c511002913.lua | 4 ++-- unofficial/c511003224.lua | 4 ++-- unofficial/c511003236.lua | 4 ++-- unofficial/c511009002.lua | 4 ++-- unofficial/c511009026.lua | 2 +- unofficial/c511009062.lua | 4 ++-- unofficial/c511009074.lua | 6 +++--- unofficial/c511009136.lua | 4 ++-- unofficial/c511009321.lua | 4 ++-- unofficial/c511009340.lua | 4 ++-- unofficial/c511009387.lua | 4 ++-- unofficial/c511009462.lua | 4 ++-- unofficial/c511009480.lua | 4 ++-- unofficial/c511009560.lua | 6 +++--- unofficial/c511009567.lua | 4 ++-- unofficial/c511009951.lua | 4 ++-- unofficial/c511010007.lua | 4 ++-- unofficial/c511010009.lua | 4 ++-- unofficial/c511010010.lua | 4 ++-- unofficial/c511010011.lua | 4 ++-- unofficial/c511010020.lua | 4 ++-- unofficial/c511010021.lua | 4 ++-- unofficial/c511010025.lua | 4 ++-- unofficial/c511010032.lua | 4 ++-- unofficial/c511010034.lua | 4 ++-- unofficial/c511010039.lua | 4 ++-- unofficial/c511010047.lua | 4 ++-- unofficial/c511010053.lua | 6 +++--- unofficial/c511010056.lua | 4 ++-- unofficial/c511010064.lua | 4 ++-- unofficial/c511010065.lua | 2 +- unofficial/c511010083.lua | 4 ++-- unofficial/c511010096.lua | 4 ++-- unofficial/c511010103.lua | 4 ++-- unofficial/c511010104.lua | 4 ++-- unofficial/c511010105.lua | 4 ++-- unofficial/c511010107.lua | 6 +++--- unofficial/c511010132.lua | 4 ++-- unofficial/c511010139.lua | 4 ++-- unofficial/c511010165.lua | 4 ++-- unofficial/c511010173.lua | 4 ++-- unofficial/c511010192.lua | 4 ++-- unofficial/c511010196.lua | 4 ++-- unofficial/c511010205.lua | 4 ++-- unofficial/c511010207.lua | 4 ++-- unofficial/c511010238.lua | 4 ++-- unofficial/c511010239.lua | 4 ++-- unofficial/c511010504.lua | 4 ++-- unofficial/c511010515.lua | 4 ++-- unofficial/c511015129.lua | 4 ++-- unofficial/c511020000.lua | 4 ++-- unofficial/c511023000.lua | 4 ++-- unofficial/c511027117.lua | 4 ++-- unofficial/c511600284.lua | 4 ++-- unofficial/c511600298.lua | 4 ++-- unofficial/c511600369.lua | 4 ++-- unofficial/c511600384.lua | 4 ++-- unofficial/c513000017.lua | 4 ++-- unofficial/c513000018.lua | 4 ++-- unofficial/c513000059.lua | 4 ++-- unofficial/c513000060.lua | 4 ++-- unofficial/c513000061.lua | 4 ++-- unofficial/c513000062.lua | 4 ++-- unofficial/c513000063.lua | 4 ++-- unofficial/c700000026.lua | 4 ++-- unofficial/c700000027.lua | 4 ++-- unofficial/c810000081.lua | 4 ++-- 595 files changed, 1198 insertions(+), 1198 deletions(-) diff --git a/official/c10000030.lua b/official/c10000030.lua index cd5e1ddec8..12fe23edd7 100644 --- a/official/c10000030.lua +++ b/official/c10000030.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.effcost) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -70,4 +70,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Special Summon 1 monster from your opponent's GY Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c10389142.lua b/official/c10389142.lua index a1676abb80..e896be7a38 100644 --- a/official/c10389142.lua +++ b/official/c10389142.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_names={10389143} s.xyz_number=42 @@ -81,4 +81,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tg=g:Filter(s.desfilter,nil,e:GetLabel()) g:DeleteGroup() Duel.Destroy(tg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c10406322.lua b/official/c10406322.lua index 5801e1519c..a8f82219d2 100644 --- a/official/c10406322.lua +++ b/official/c10406322.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end @@ -75,4 +75,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) else Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c10443957.lua b/official/c10443957.lua index 3c7f0b50fa..84d5aeb1c6 100644 --- a/official/c10443957.lua +++ b/official/c10443957.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={58069384} function s.mfilter(c,xyz,sumtype,tp) @@ -83,4 +83,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c10613952.lua b/official/c10613952.lua index b919c4f2c7..9043ac75fb 100644 --- a/official/c10613952.lua +++ b/official/c10613952.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --spsummon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -102,4 +102,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c10666000.lua b/official/c10666000.lua index 22c67568e9..6ff92790ce 100644 --- a/official/c10666000.lua +++ b/official/c10666000.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=1 function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c10678778.lua b/official/c10678778.lua index 87c7bafbeb..9b60ada2a3 100644 --- a/official/c10678778.lua +++ b/official/c10678778.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.rmfilter(c) return c:IsFacedown() and c:IsAbleToRemove() @@ -76,4 +76,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsType,ctype),tp,0,LOCATION_MZONE,1,1,nil) Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c11398059.lua b/official/c11398059.lua index 1317112bbb..ad958d0b3e 100644 --- a/official/c11398059.lua +++ b/official/c11398059.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsRace(RACE_REPTILE) and c:IsAbleToHand() diff --git a/official/c11411223.lua b/official/c11411223.lua index 1b54a70ac9..523dc7e172 100644 --- a/official/c11411223.lua +++ b/official/c11411223.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=10 function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -31,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Draw(tp,1,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c11441009.lua b/official/c11441009.lua index aff52a33e6..dbba3cb0f9 100644 --- a/official/c11441009.lua +++ b/official/c11441009.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.AND(Cost.PayLP(600),Cost.Detach(1))) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate the activation of another monster's effect, and if you do, destroy that monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c11510448.lua b/official/c11510448.lua index 991536a6e5..db155c38e6 100644 --- a/official/c11510448.lua +++ b/official/c11510448.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) @@ -73,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc1 and tc1:IsFaceup() and not tc1:IsImmuneToEffect(e) and #g2>0 then Duel.Overlay(tc1,g2) end -end \ No newline at end of file +end diff --git a/official/c11522979.lua b/official/c11522979.lua index e7118052d6..3add83fc59 100644 --- a/official/c11522979.lua +++ b/official/c11522979.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=69 s.listed_names={2407234} @@ -77,4 +77,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end \ No newline at end of file +end diff --git a/official/c11646785.lua b/official/c11646785.lua index 4268f64f82..d5a8b58aab 100644 --- a/official/c11646785.lua +++ b/official/c11646785.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum Green Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) @@ -76,4 +76,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c12014404.lua b/official/c12014404.lua index 324e5e60e8..ecc61bfbc5 100644 --- a/official/c12014404.lua +++ b/official/c12014404.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -60,4 +60,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) bc:RegisterEffect(e2) c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) -end \ No newline at end of file +end diff --git a/official/c12219047.lua b/official/c12219047.lua index b5f1d58bce..6c9a71a517 100644 --- a/official/c12219047.lua +++ b/official/c12219047.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) local e2=e1:Clone() e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) @@ -75,4 +75,4 @@ end function s.condition2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_THE_PHANTOM_KNIGHTS) and aux.StatChangeDamageStepCondition() -end \ No newline at end of file +end diff --git a/official/c1249315.lua b/official/c1249315.lua index 4c633897ee..62466fd3c4 100644 --- a/official/c1249315.lua +++ b/official/c1249315.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thfilter(c) return c:IsMonster() and c:IsAbleToHand() diff --git a/official/c12533811.lua b/official/c12533811.lua index fdb636bb14..3d1e64f381 100644 --- a/official/c12533811.lua +++ b/official/c12533811.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPhase(PHASE_MAIN1) @@ -38,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c12615446.lua b/official/c12615446.lua index cfb7f0c852..0a5160ca43 100644 --- a/official/c12615446.lua +++ b/official/c12615446.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Attach local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -83,4 +83,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Overlay(c,tc) end -end \ No newline at end of file +end diff --git a/official/c12632096.lua b/official/c12632096.lua index 1de8c0513e..0d5fd1594b 100644 --- a/official/c12632096.lua +++ b/official/c12632096.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.ctcost) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CIPHER} s.listed_names={id} @@ -73,4 +73,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c1269512.lua b/official/c1269512.lua index 9bddcb5720..b7fe5e17be 100644 --- a/official/c1269512.lua +++ b/official/c1269512.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCondition(s.exatkcon) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetOperation(function() Duel.ChainAttack() end) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listes_names={id} function s.ovfilter(c,tp,xyzc) @@ -71,4 +71,4 @@ end function s.exatkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()==c and c:CanChainAttack() and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) -end \ No newline at end of file +end diff --git a/official/c13030280.lua b/official/c13030280.lua index 02493d8074..f5459ac8cb 100644 --- a/official/c13030280.lua +++ b/official/c13030280.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={77631175} --"Comics Hero King Arthur" function s.valcon(e,re,r,rp) @@ -48,4 +48,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToEffect(e) and Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)>0 then Duel.Damage(1-tp,bc:GetBaseAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c13183454.lua b/official/c13183454.lua index 3b740e4ad4..4df5914d67 100644 --- a/official/c13183454.lua +++ b/official/c13183454.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c14152862.lua b/official/c14152862.lua index bb00dc29a3..fa73e44bbd 100644 --- a/official/c14152862.lua +++ b/official/c14152862.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end @@ -35,4 +35,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c1426714.lua b/official/c1426714.lua index 273edf2086..f301354647 100644 --- a/official/c1426714.lua +++ b/official/c1426714.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be battle target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -60,4 +60,4 @@ function s.atkcon(e) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_ONFIELD,0,nil,id+1)*500 -end \ No newline at end of file +end diff --git a/official/c14301396.lua b/official/c14301396.lua index dcf07f08ba..f80385782c 100644 --- a/official/c14301396.lua +++ b/official/c14301396.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Equip this card to another monster you control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -116,4 +116,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c14306092.lua b/official/c14306092.lua index 9afb4d0f7b..91d70cfb87 100644 --- a/official/c14306092.lua +++ b/official/c14306092.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atkup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.atkcon(e) end function s.atkval(e,c) return c:GetCounter(0x2e)*1000 -end \ No newline at end of file +end diff --git a/official/c15092394.lua b/official/c15092394.lua index 11d42c0c8c..4f5a5f86ff 100644 --- a/official/c15092394.lua +++ b/official/c15092394.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c15232745.lua b/official/c15232745.lua index 8a3a228670..076d848979 100644 --- a/official/c15232745.lua +++ b/official/c15232745.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=1 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c15561463.lua b/official/c15561463.lua index 0a387e7f90..56161568e5 100644 --- a/official/c15561463.lua +++ b/official/c15561463.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -29,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c15862758.lua b/official/c15862758.lua index 0c5baa5cb0..04ff5b7f7d 100644 --- a/official/c15862758.lua +++ b/official/c15862758.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) e7:SetCost(Cost.Detach(1)) e7:SetTarget(s.natg) e7:SetOperation(s.naop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) end s.listed_names={89477759} s.xyz_number=1000 @@ -81,4 +81,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then Duel.Recover(tp,Duel.GetAttacker():GetAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c15914410.lua b/official/c15914410.lua index b297f28065..2f47530c7a 100644 --- a/official/c15914410.lua +++ b/official/c15914410.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.postg) e1:SetOperation(s.posop) e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() @@ -46,4 +46,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c15939229.lua b/official/c15939229.lua index 2fe18afc19..ec5f20ec0f 100644 --- a/official/c15939229.lua +++ b/official/c15939229.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Set local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.settg) e3:SetOperation(s.setop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.listed_series={SET_DARK_CONTRACT,SET_DD} @@ -87,4 +87,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end \ No newline at end of file +end diff --git a/official/c16037007.lua b/official/c16037007.lua index ace2180c33..3eb2ec263b 100644 --- a/official/c16037007.lua +++ b/official/c16037007.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=74 function s.discon(e,tp,eg,ep,ev,re,r,rp) @@ -44,4 +44,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c16110708.lua b/official/c16110708.lua index 8826431760..901b983493 100644 --- a/official/c16110708.lua +++ b/official/c16110708.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCondition(function(e) return not e:GetHandler():IsBaseAttack(1500) end) e3:SetCost(Cost.Detach(1,1)) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={63767246} --"Number 38: Hope Harbinger Dragon Titanic Galaxy" s.xyz_number=38 @@ -81,4 +81,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c16195942.lua b/official/c16195942.lua index 35bf65a1b6..22d5e4ae8d 100644 --- a/official/c16195942.lua +++ b/official/c16195942.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) 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(1-tp) and chkc:HasNonZeroAttack() end @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/official/c1621413.lua b/official/c1621413.lua index cb50bd1ada..5b6605bf0c 100644 --- a/official/c1621413.lua +++ b/official/c1621413.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate monster effect activation and special summon 1 Xyz monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={16195942} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -90,4 +90,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end diff --git a/official/c1639384.lua b/official/c1639384.lua index b1f24d9901..c8d01f8e68 100644 --- a/official/c1639384.lua +++ b/official/c1639384.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -59,4 +59,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end \ No newline at end of file +end diff --git a/official/c16643334.lua b/official/c16643334.lua index 6f241c8f24..67ddd0c6c7 100644 --- a/official/c16643334.lua +++ b/official/c16643334.lua @@ -49,7 +49,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_PHOTON} s.listed_names={CARD_GALAXYEYES_P_DRAGON} @@ -94,4 +94,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c16691074.lua b/official/c16691074.lua index f038719211..c9e8c0ca32 100644 --- a/official/c16691074.lua +++ b/official/c16691074.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special summon 1 "Odd-Eyes" monster from the Extra Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c16699558.lua b/official/c16699558.lua index f2ccf1d2de..80cdd3eff5 100644 --- a/official/c16699558.lua +++ b/official/c16699558.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) --It gains 1000 ATK tc:UpdateAttack(1000,RESET_EVENT|RESETS_STANDARD,e:GetHandler()) end -end \ No newline at end of file +end diff --git a/official/c1688285.lua b/official/c1688285.lua index ed9baabfc2..17ae93a921 100644 --- a/official/c1688285.lua +++ b/official/c1688285.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Attach 1 monster to this card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -88,4 +88,4 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c16955631.lua b/official/c16955631.lua index b9cb961e9e..9759a71e62 100644 --- a/official/c16955631.lua +++ b/official/c16955631.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_MIMIGHOUL} function s.thfilter(c) @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetOperatedGroup():GetCount() Duel.Damage(1-tp,ct*1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c17016362.lua b/official/c17016362.lua index 939ac0eebb..61f8971a73 100644 --- a/official/c17016362.lua +++ b/official/c17016362.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.mttg) e2:SetOperation(s.mtop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special summon "Performage" monster from deck local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -114,4 +114,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c1828513.lua b/official/c1828513.lua index 17ca930212..3ee740717a 100644 --- a/official/c1828513.lua +++ b/official/c1828513.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_SIX_SAMURAI} function s.filter(c) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c18326736.lua b/official/c18326736.lua index 5c0c76b7ef..ace1f31edb 100644 --- a/official/c18326736.lua +++ b/official/c18326736.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --turn skip local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.skipcost) e2:SetTarget(s.skiptg) e2:SetOperation(s.skipop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -106,4 +106,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c18511599.lua b/official/c18511599.lua index 648d1562db..98ed599f66 100644 --- a/official/c18511599.lua +++ b/official/c18511599.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indcon(e) return e:GetHandler():GetOverlayCount()~=0 @@ -41,4 +41,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c18897163.lua b/official/c18897163.lua index 514c5d4103..c1cceedad4 100644 --- a/official/c18897163.lua +++ b/official/c18897163.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --move to the pendulum zone local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,3)) @@ -124,4 +124,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c18963306.lua b/official/c18963306.lua index 5dd1d029c3..74bfd82f79 100644 --- a/official/c18963306.lua +++ b/official/c18963306.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() @@ -77,4 +77,4 @@ function s.concon(e) end function s.atktg(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c19333131.lua b/official/c19333131.lua index 9c2ced525b..0e04401d63 100644 --- a/official/c19333131.lua +++ b/official/c19333131.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_NINJA} s.xyz_number=12 @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.etarget(e,c) return c:IsFaceup() and c:IsSetCard(SET_NINJA) -end \ No newline at end of file +end diff --git a/official/c19369609.lua b/official/c19369609.lua index 1fcbfe0dbe..7c8466d729 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --ATK gain on battle local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCondition(s.atkcon) e3:SetCost(s.atkcost) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end --ATK gain function s.atkval(e,c) diff --git a/official/c19684740.lua b/official/c19684740.lua index 6c73c99583..3234ee8210 100644 --- a/official/c19684740.lua +++ b/official/c19684740.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end @@ -29,4 +29,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoHand(g,nil,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c19891310.lua b/official/c19891310.lua index c1d929d61a..281af953ad 100644 --- a/official/c19891310.lua +++ b/official/c19891310.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --add to hand local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) @@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c1992816.lua b/official/c1992816.lua index 380b4c963e..42e9ddce76 100644 --- a/official/c1992816.lua +++ b/official/c1992816.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCondition(s.dacon) e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.daop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=9 function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -90,4 +90,4 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c20145685.lua b/official/c20145685.lua index 4edd87dc32..748462eb17 100644 --- a/official/c20145685.lua +++ b/official/c20145685.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(s.thcost) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Double battle damage local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) @@ -68,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(thg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,thg) end -end \ No newline at end of file +end diff --git a/official/c20343502.lua b/official/c20343502.lua index 43aafd38bb..3d83480bed 100644 --- a/official/c20343502.lua +++ b/official/c20343502.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetTarget(s.immtg) e1:SetOperation(s.immop) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Shuffle up to 2 cards from either GY into deck local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK) @@ -77,4 +77,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c20563387.lua b/official/c20563387.lua index b90558032a..d524831e05 100644 --- a/official/c20563387.lua +++ b/official/c20563387.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=80 s.listed_names={93568288} @@ -90,4 +90,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c2061963.lua b/official/c2061963.lua index 8f6e881edd..c3752b7b8c 100644 --- a/official/c2061963.lua +++ b/official/c2061963.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetTarget(s.decktg) e2:SetOperation(s.deckop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=104 function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) @@ -54,4 +54,4 @@ end function s.deckop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.DiscardDeck(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c20785975.lua b/official/c20785975.lua index eb3909e518..7bb0378ea0 100644 --- a/official/c20785975.lua +++ b/official/c20785975.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=103 s.listed_names={94380860} @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c2091298.lua b/official/c2091298.lua index fb423447de..92a1a33146 100644 --- a/official/c2091298.lua +++ b/official/c2091298.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c21044178.lua b/official/c21044178.lua index ad21f6c984..035a490846 100644 --- a/official/c21044178.lua +++ b/official/c21044178.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.aclimit(e,re,tp) return re:GetActivateLocation()==LOCATION_GRAVE -end \ No newline at end of file +end diff --git a/official/c21065189.lua b/official/c21065189.lua index f3e6388329..e9f5e92ae7 100644 --- a/official/c21065189.lua +++ b/official/c21065189.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/official/c21223277.lua b/official/c21223277.lua index fb44ec6e86..8c70156481 100644 --- a/official/c21223277.lua +++ b/official/c21223277.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -74,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c21313376.lua b/official/c21313376.lua index 973bcf6fed..712ed3a6ba 100644 --- a/official/c21313376.lua +++ b/official/c21313376.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=14 function s.refcon(e,re,val,r,rp,rc) @@ -39,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local atk=e:GetHandler():GetBattleTarget():GetBaseAttack() local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttackBelow,atk),tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c21501505.lua b/official/c21501505.lua index 5ee053979f..918dbd0323 100644 --- a/official/c21501505.lua +++ b/official/c21501505.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangeTargetCard(ev,Group.FromCards(tc)) end -end \ No newline at end of file +end diff --git a/official/c21521304.lua b/official/c21521304.lua index 9ab2fc862c..6f16be7bf3 100644 --- a/official/c21521304.lua +++ b/official/c21521304.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not tc2:IsRelateToEffect(e) or Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)==0 then return end Duel.BreakEffect() Duel.Recover(tp,1250,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c21858819.lua b/official/c21858819.lua index 3230ceffc3..c05867296d 100644 --- a/official/c21858819.lua +++ b/official/c21858819.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --recover local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_RECOVER) @@ -62,4 +62,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c2191144.lua b/official/c2191144.lua index 8677a347ca..043b3b942e 100644 --- a/official/c2191144.lua +++ b/official/c2191144.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetOverlayCount(tp,1,1)>1 end @@ -33,4 +33,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c22110647.lua b/official/c22110647.lua index f94e5ff2a9..68b3e48f7b 100644 --- a/official/c22110647.lua +++ b/official/c22110647.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Destroy 1 card on the field local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -99,4 +99,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c22653490.lua b/official/c22653490.lua index 2fa33afe9d..bbe8a2d6ad 100644 --- a/official/c22653490.lua +++ b/official/c22653490.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg2) e2:SetOperation(s.tdop2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.tdcon1(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() @@ -62,4 +62,4 @@ function s.tdop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup() then Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c23454876.lua b/official/c23454876.lua index 77dea5d2cd..84a453b21d 100644 --- a/official/c23454876.lua +++ b/official/c23454876.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={51960178} function s.drcon(e,tp,eg,ep,ev,re,r,rp) @@ -57,4 +57,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*400 Duel.Damage(p,dam,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c23603403.lua b/official/c23603403.lua index 6f24d5affb..8405f62bc2 100644 --- a/official/c23603403.lua +++ b/official/c23603403.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_RAIDRAPTOR} function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -87,4 +87,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(ct*-800) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c23649496.lua b/official/c23649496.lua index fd48c45fb6..de631690f9 100644 --- a/official/c23649496.lua +++ b/official/c23649496.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Send 2 "Heraldic Beast" monsters from your Deck to the Graveyard. local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SendtoGrave(sg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c23776077.lua b/official/c23776077.lua index 1d62ce87ef..8589865eb7 100644 --- a/official/c23776077.lua +++ b/official/c23776077.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk/def local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ function s.tgcon(e) end function s.indcon(e) return e:GetHandler():GetOverlayCount()==5 -end \ No newline at end of file +end diff --git a/official/c23848752.lua b/official/c23848752.lua index 987a4b77fd..5e0afbdb2e 100644 --- a/official/c23848752.lua +++ b/official/c23848752.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Gain LP equal to the ATK of a battling monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -88,4 +88,4 @@ function s.rcop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local d=tc:GetAttack()/2 Duel.Recover(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c24701066.lua b/official/c24701066.lua index bfb159598c..bae0777497 100644 --- a/official/c24701066.lua +++ b/official/c24701066.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtgtg) e2:SetOperation(s.thtgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon this card from the GY in Defense Position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c2530830.lua b/official/c2530830.lua index a152cb6806..a2fdf102ba 100644 --- a/official/c2530830.lua +++ b/official/c2530830.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --special summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c25341652.lua b/official/c25341652.lua index 29f1951f73..126b6fd43a 100644 --- a/official/c25341652.lua +++ b/official/c25341652.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction replacement for a "Djinn" monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -63,4 +63,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT) end g:DeleteGroup() -end \ No newline at end of file +end diff --git a/official/c26096328.lua b/official/c26096328.lua index cdffc8e8ef..029f3aecc4 100644 --- a/official/c26096328.lua +++ b/official/c26096328.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --multi attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -61,4 +61,4 @@ end function s.raval(e,c) local oc=e:GetHandler():GetOverlayCount() return math.max(0,oc) -end \ No newline at end of file +end diff --git a/official/c26211048.lua b/official/c26211048.lua index 6c796b9e72..26028a6f23 100644 --- a/official/c26211048.lua +++ b/official/c26211048.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,function(ec,_,tp) return ec:IsControler(1-tp) end,s.equipop,e1) end function s.eqfilter(c) @@ -58,4 +58,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or not tc:IsMonster() then return end if not s.equipop(c,e,tp,tc) then return end -end \ No newline at end of file +end diff --git a/official/c26329679.lua b/official/c26329679.lua index d43fcd4bd6..50994ab702 100644 --- a/official/c26329679.lua +++ b/official/c26329679.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) return te:IsSpellTrapEffect() -end \ No newline at end of file +end diff --git a/official/c26556950.lua b/official/c26556950.lua index bf632a412d..7cad760932 100644 --- a/official/c26556950.lua +++ b/official/c26556950.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.xyz_number=84 function s.ovfilter(c,tp,xyzc) @@ -75,4 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,c:GetDefense()) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c26563200.lua b/official/c26563200.lua index 6f502f56f9..e8f784f049 100644 --- a/official/c26563200.lua +++ b/official/c26563200.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_DJINN} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -38,4 +38,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c2665273.lua b/official/c2665273.lua index 12cbcb2267..b7a923dad3 100644 --- a/official/c2665273.lua +++ b/official/c2665273.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.atkval(e,c) return c:GetOverlayCount()*1000 @@ -60,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,tc,true) end end -end \ No newline at end of file +end diff --git a/official/c26988374.lua b/official/c26988374.lua index 4fcb3d9b43..533d609ab5 100644 --- a/official/c26988374.lua +++ b/official/c26988374.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Detach 1 material and banish local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c27069566.lua b/official/c27069566.lua index 419c87e0b1..0e95069842 100644 --- a/official/c27069566.lua +++ b/official/c27069566.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.rmvtg) e1:SetOperation(s.rmvop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 2 "Datascape" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if sg and #sg==2 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c27337596.lua b/official/c27337596.lua index 5c610efe1e..9fb178e6bc 100644 --- a/official/c27337596.lua +++ b/official/c27337596.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c27420823.lua b/official/c27420823.lua index e7480d8eee..6d354dce1f 100644 --- a/official/c27420823.lua +++ b/official/c27420823.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsMonsterEffect() end) --Negate an opponent's monster effect activated in the hand or GY local e2=Effect.CreateEffect(c) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_K9} function s.thfilter(c) @@ -68,4 +68,4 @@ end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) -end \ No newline at end of file +end diff --git a/official/c27552504.lua b/official/c27552504.lua index c136a357b1..a71e4b4bec 100644 --- a/official/c27552504.lua +++ b/official/c27552504.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c2766877.lua b/official/c2766877.lua index 1529cb2d99..aefb7f9989 100644 --- a/official/c2766877.lua +++ b/official/c2766877.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c28150174.lua b/official/c28150174.lua index a517e2f3cc..fedb1b3813 100644 --- a/official/c28150174.lua +++ b/official/c28150174.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefensePos() end @@ -38,4 +38,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c28290705.lua b/official/c28290705.lua index ebecc15b7d..3685adc42a 100644 --- a/official/c28290705.lua +++ b/official/c28290705.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_EARTH),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -37,4 +37,4 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c28346136.lua b/official/c28346136.lua index 8fd0d48cca..401714df3d 100644 --- a/official/c28346136.lua +++ b/official/c28346136.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.cannottgtg) e1:SetOperation(s.cannottgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return 1 Rank 9 or lower Dragon Xyz Monster from your GY to the Extra Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -90,4 +90,4 @@ function s.texspop(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end \ No newline at end of file +end diff --git a/official/c28400508.lua b/official/c28400508.lua index 1ae792bf80..4d746349cb 100644 --- a/official/c28400508.lua +++ b/official/c28400508.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.listed_names={id} @@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return e:GetLabelObject()~=c -end \ No newline at end of file +end diff --git a/official/c28781003.lua b/official/c28781003.lua index e031a866d9..7777115168 100644 --- a/official/c28781003.lua +++ b/official/c28781003.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR,SET_XYZ_DRAGON} function s.spfilter(c,e,tp,mc,rk,pg) @@ -69,4 +69,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sc=e:GetLabelObject() Duel.Destroy(sc,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c28912357.lua b/official/c28912357.lua index ecc5b58e71..1b5ee1018a 100644 --- a/official/c28912357.lua +++ b/official/c28912357.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -64,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c2896663.lua b/official/c2896663.lua index d311bb39b6..ef0392bdf1 100644 --- a/official/c2896663.lua +++ b/official/c2896663.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Equip this card on the field to 1 Utopia monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -120,4 +120,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if #spg>0 then Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c28981598.lua b/official/c28981598.lua index 74f8686edb..b244890a18 100644 --- a/official/c28981598.lua +++ b/official/c28981598.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.tgfilter(e,c) return c:IsSummonLocation(LOCATION_GRAVE) and c~=e:GetHandler() @@ -48,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c29085954.lua b/official/c29085954.lua index f102b67401..06b8ac5820 100644 --- a/official/c29085954.lua +++ b/official/c29085954.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_NUMBER} s.xyz_number=78 @@ -80,4 +80,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c29208536.lua b/official/c29208536.lua index eab76183a1..7278e94cba 100644 --- a/official/c29208536.lua +++ b/official/c29208536.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannnot activate local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) diff --git a/official/c29423048.lua b/official/c29423048.lua index 1380b47d2c..0b38e35c05 100644 --- a/official/c29423048.lua +++ b/official/c29423048.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtgtg) e1:SetOperation(s.thtgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c29510428.lua b/official/c29510428.lua index 088d585ce9..5241db2b3e 100644 --- a/official/c29510428.lua +++ b/official/c29510428.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Add to hand or Special Summon 1 Level 5 monster from the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -86,4 +86,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end, aux.Stringid(id,5) ) -end \ No newline at end of file +end diff --git a/official/c29515122.lua b/official/c29515122.lua index 654de8c80d..0cd592b964 100644 --- a/official/c29515122.lua +++ b/official/c29515122.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,3) end @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c29669359.lua b/official/c29669359.lua index 87c79a78e0..7b7768a760 100644 --- a/official/c29669359.lua +++ b/official/c29669359.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=61 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c2978414.lua b/official/c2978414.lua index c2a1b59c23..d9b23d3cb8 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --effect limit local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetCondition(s.condition) e3:SetCost(s.cost) e3:SetOperation(s.efop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=46 function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -93,4 +93,4 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) end function s.actfilter(e,c) return c:IsRace(RACE_DRAGON) -end \ No newline at end of file +end diff --git a/official/c30095833.lua b/official/c30095833.lua index 02039498ab..18deeb5ea5 100644 --- a/official/c30095833.lua +++ b/official/c30095833.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Place this card in the Pendulum Zone local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) @@ -101,4 +101,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c30100551.lua b/official/c30100551.lua index 83941f5819..3efb7911b8 100644 --- a/official/c30100551.lua +++ b/official/c30100551.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --discard deck & destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DECKDES+CATEGORY_DESTROY) @@ -64,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sdg) Duel.Destroy(sdg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c30128445.lua b/official/c30128445.lua index 4be10c761b..053df4bf73 100644 --- a/official/c30128445.lua +++ b/official/c30128445.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Shuffle 1 Normal Monster from your GY into the Deck and Special Summon this card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c30350202.lua b/official/c30350202.lua index 636b44916d..9a0715d772 100644 --- a/official/c30350202.lua +++ b/official/c30350202.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_DRAGON_RULER} function s.tdfilter(c,e,tp) @@ -81,4 +81,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c30439101.lua b/official/c30439101.lua index 752106d95a..39a239f402 100644 --- a/official/c30439101.lua +++ b/official/c30439101.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Opponent's targeted monster cannot attack, also negate its effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -88,4 +88,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c30741334.lua b/official/c30741334.lua index 832a4a818d..ddaf2c76a9 100644 --- a/official/c30741334.lua +++ b/official/c30741334.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end \ No newline at end of file +end diff --git a/official/c31123642.lua b/official/c31123642.lua index 91358a3167..f7e286b636 100644 --- a/official/c31123642.lua +++ b/official/c31123642.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction replacement for a "Utopia" or "Utopic" Xyz monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -88,4 +88,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) -end \ No newline at end of file +end diff --git a/official/c31320433.lua b/official/c31320433.lua index f65b171d6f..c8752a4d26 100644 --- a/official/c31320433.lua +++ b/official/c31320433.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.datg) e2:SetOperation(s.daop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=47 function s.matfilter(c) @@ -82,4 +82,4 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c31437713.lua b/official/c31437713.lua index bf41d49f48..553608a291 100644 --- a/official/c31437713.lua +++ b/official/c31437713.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.condition) e2:SetCost(s.cost) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=82 function s.filter(c) @@ -64,4 +64,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c31539614.lua b/official/c31539614.lua index f3921e5d8e..79215ed438 100644 --- a/official/c31539614.lua +++ b/official/c31539614.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.changeatkdeftg) e1:SetOperation(s.changeatkdefop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Make a monster(s) Special Summoned to your field gain 900 ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c31563350.lua b/official/c31563350.lua index 72316d617f..d3b609df1f 100644 --- a/official/c31563350.lua +++ b/official/c31563350.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1) end function s.eqval(ec,c,tp) @@ -54,4 +54,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return e:GetOwner()==c -end \ No newline at end of file +end diff --git a/official/c31801517.lua b/official/c31801517.lua index cfeb76a5e2..4cc606a16d 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -103,4 +103,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end function s.rdcon(e) return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) -end \ No newline at end of file +end diff --git a/official/c32003338.lua b/official/c32003338.lua index cc6a20b7ca..0dcb1b8901 100644 --- a/official/c32003338.lua +++ b/official/c32003338.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=34 function s.filter(c) @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end \ No newline at end of file +end diff --git a/official/c32224143.lua b/official/c32224143.lua index ffcf830219..fdfd150e22 100644 --- a/official/c32224143.lua +++ b/official/c32224143.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be battle target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -84,4 +84,4 @@ function s.disop(e,tp) end function s.atkcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end \ No newline at end of file +end diff --git a/official/c32302078.lua b/official/c32302078.lua index 839a889263..284fa3e059 100644 --- a/official/c32302078.lua +++ b/official/c32302078.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon 1 monster from your opponent's GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -40,7 +40,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) local g=Group.CreateGroup() g:KeepAlive() e3:SetLabelObject(g) diff --git a/official/c32446630.lua b/official/c32446630.lua index 246f427e3a..5b5deaff62 100644 --- a/official/c32446630.lua +++ b/official/c32446630.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=43 s.listed_names={56051086,32446631} @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_SET_DEFENSE) token:RegisterEffect(e2) Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c32530043.lua b/official/c32530043.lua index 298dd48398..329b908be5 100644 --- a/official/c32530043.lua +++ b/official/c32530043.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thfilter(c) return c:IsRace(RACE_ROCK) and c:IsAbleToHand() @@ -60,4 +60,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end \ No newline at end of file +end diff --git a/official/c32559361.lua b/official/c32559361.lua index 093d22323f..d34229844b 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,s.mxmc,s.slwc)) e3:SetTarget(s.damtg2) e3:SetOperation(s.damop2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=9 s.listed_names={1992816} @@ -82,4 +82,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c3292267.lua b/official/c3292267.lua index 32323e3304..737214d24e 100644 --- a/official/c3292267.lua +++ b/official/c3292267.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.tfilter(c,tp) return (c:IsOnField() or c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) and c:IsControler(tp) @@ -40,4 +40,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c33776843.lua b/official/c33776843.lua index 554f5e5a18..8f53569235 100644 --- a/official/c33776843.lua +++ b/official/c33776843.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=15 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c33779875.lua b/official/c33779875.lua index de7802b76c..4a4a3de3c3 100644 --- a/official/c33779875.lua +++ b/official/c33779875.lua @@ -18,13 +18,13 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.trtg) e1:SetOperation(s.trop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) local e2=e1:Clone() e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetCondition(s.quickcon) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Increase ATK when a monster is tributed local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -69,4 +69,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(200*ct) c:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c33909817.lua b/official/c33909817.lua index 60c03f4054..1e3d78bdd2 100644 --- a/official/c33909817.lua +++ b/official/c33909817.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 1 "Sylvan" monster from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c34086406.lua b/official/c34086406.lua index e17e0c27e4..b1b7497b83 100644 --- a/official/c34086406.lua +++ b/official/c34086406.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) @@ -54,4 +54,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,1) end end -end \ No newline at end of file +end diff --git a/official/c34481518.lua b/official/c34481518.lua index e25187aadf..629cfb99a5 100644 --- a/official/c34481518.lua +++ b/official/c34481518.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy 1 card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c34909328.lua b/official/c34909328.lua index 32da3cb088..4f3d9c55b5 100644 --- a/official/c34909328.lua +++ b/official/c34909328.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Attach 1 monster from your GY to this card as material local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c34945480.lua b/official/c34945480.lua index 0c1cff9f54..ea54597d7f 100644 --- a/official/c34945480.lua +++ b/official/c34945480.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_OUTER_ENTITY} function s.ovfilter(c,tp,xyzc) @@ -70,4 +70,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c3594985.lua b/official/c3594985.lua index 9efbedfeee..9b98068f36 100644 --- a/official/c3594985.lua +++ b/official/c3594985.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Place this card in the Pendulum Zone local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -111,4 +111,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c359563.lua b/official/c359563.lua index 630039081a..78b4718768 100644 --- a/official/c359563.lua +++ b/official/c359563.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsCanTurnSet() and c:IsSummonPlayer(1-tp) and (not e or c:IsRelateToEffect(e)) @@ -28,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) -end \ No newline at end of file +end diff --git a/official/c36076683.lua b/official/c36076683.lua index 298a89fa2d..2b15fa5928 100644 --- a/official/c36076683.lua +++ b/official/c36076683.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=73 function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -37,4 +37,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c36757171.lua b/official/c36757171.lua index 8aeb04f5cf..f97f1ba615 100644 --- a/official/c36757171.lua +++ b/official/c36757171.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_LSWARM} function s.filter(c) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end \ No newline at end of file +end diff --git a/official/c36776089.lua b/official/c36776089.lua index 9da006987f..8458917b97 100644 --- a/official/c36776089.lua +++ b/official/c36776089.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rettg) e2:SetOperation(s.retop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.incon(e) return e:GetHandler():GetOverlayCount()>0 @@ -43,4 +43,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.SendtoHand(bc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c37057743.lua b/official/c37057743.lua index 19a3053149..fce1877d1b 100644 --- a/official/c37057743.lua +++ b/official/c37057743.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() @@ -47,4 +47,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c) return c:IsCode(e:GetLabel()) -end \ No newline at end of file +end diff --git a/official/c37164373.lua b/official/c37164373.lua index 77c6bddefd..8252cd4a8a 100644 --- a/official/c37164373.lua +++ b/official/c37164373.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_MADOLCHE} function s.filter(c) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(rg) Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c37279508.lua b/official/c37279508.lua index 5cbf3ee6a4..923e81f3fb 100644 --- a/official/c37279508.lua +++ b/official/c37279508.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -66,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c3743515.lua b/official/c3743515.lua index f20a667381..75e7f9481b 100644 --- a/official/c3743515.lua +++ b/official/c3743515.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy this card, and if you do, your Dinosaur monster battling gains 2000 ATK until the end of the Battle Phase local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -83,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c3758046.lua b/official/c3758046.lua index 056a2ba8d4..f59e4ecad9 100644 --- a/official/c3758046.lua +++ b/official/c3758046.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.regtg) e1:SetOperation(s.regop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Search 1 "Dark Contract" card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -94,4 +94,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c37649320.lua b/official/c37649320.lua index 9152113399..e1180531e0 100644 --- a/official/c37649320.lua +++ b/official/c37649320.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --"Paleozoic" Trap cards can be activated from the hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c3790062.lua b/official/c3790062.lua index 8bd75a1073..600b430bdf 100644 --- a/official/c3790062.lua +++ b/official/c3790062.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=65 function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) then Duel.Damage(1-tp,500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c37926346.lua b/official/c37926346.lua index 3cbadb2268..da21bdc2c8 100644 --- a/official/c37926346.lua +++ b/official/c37926346.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsLevelAbove(5) @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local g=eg:Filter(s.filter,nil) Duel.NegateSummon(g) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c38026562.lua b/official/c38026562.lua index 8b3046c580..bc222c4a10 100644 --- a/official/c38026562.lua +++ b/official/c38026562.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.tgtg) e4:SetOperation(s.tgop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end function s.spfilter(c,e,tp) return c:IsType(TYPE_GEMINI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -87,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg,true) Duel.SendtoGrave(sg,REASON_RULE,PLAYER_NONE,1-tp) end -end \ No newline at end of file +end diff --git a/official/c3814632.lua b/official/c3814632.lua index 8f30232ec7..d51645a3bd 100644 --- a/official/c3814632.lua +++ b/official/c3814632.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.AND(Cost.Detach(1),s.descost)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -43,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c38180759.lua b/official/c38180759.lua index cf05487765..1f345e7a6f 100644 --- a/official/c38180759.lua +++ b/official/c38180759.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) @@ -46,4 +46,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/official/c38250531.lua b/official/c38250531.lua index edc310c185..8f418cebc9 100644 --- a/official/c38250531.lua +++ b/official/c38250531.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -83,4 +83,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c38273745.lua b/official/c38273745.lua index 3fe824917b..e05d12fe1d 100644 --- a/official/c38273745.lua +++ b/official/c38273745.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -83,4 +83,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c3828844.lua b/official/c3828844.lua index 0ababe2d6a..3ef0709c02 100644 --- a/official/c3828844.lua +++ b/official/c3828844.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --If tributed, special summon 1 rank 5+ plant Xyz from extra deck or GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Overlay(g:GetFirst(),c) end -end \ No newline at end of file +end diff --git a/official/c38495396.lua b/official/c38495396.lua index dba354471e..0af8088d87 100644 --- a/official/c38495396.lua +++ b/official/c38495396.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} function s.ovfilter(c,tp,xyzc) @@ -43,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c38694052.lua b/official/c38694052.lua index 823e8b6256..4ba5134a06 100644 --- a/official/c38694052.lua +++ b/official/c38694052.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.AND(Cost.Detach(2),s.descost)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --This is a Quick Effect if this card has a Dragon monster as material local e2=e1:Clone() e2:SetType(EFFECT_TYPE_QUICK_O) diff --git a/official/c39030163.lua b/official/c39030163.lua index af734cd88e..8d649131fe 100644 --- a/official/c39030163.lua +++ b/official/c39030163.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c39139935.lua b/official/c39139935.lua index 7288040bff..768ac83705 100644 --- a/official/c39139935.lua +++ b/official/c39139935.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=33 function s.filter(c) @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end end -end \ No newline at end of file +end diff --git a/official/c39272762.lua b/official/c39272762.lua index 548dfb970e..5e7ed72fad 100644 --- a/official/c39272762.lua +++ b/official/c39272762.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.attg) e3:SetOperation(s.atop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.valcheck(e,c) @@ -90,4 +90,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(#g-1) e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) -end \ No newline at end of file +end diff --git a/official/c39622156.lua b/official/c39622156.lua index f25efdb504..e5fd044bdd 100644 --- a/official/c39622156.lua +++ b/official/c39622156.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetTarget(Cost.Detach(1)) e1:SetOperation(s.btop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --control local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -101,4 +101,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.GetControl(tc,1-p) end -end \ No newline at end of file +end diff --git a/official/c3989465.lua b/official/c3989465.lua index 0be940681e..2290f048ca 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c39972129.lua b/official/c39972129.lua index 00717690d7..98d72ffdf7 100644 --- a/official/c39972129.lua +++ b/official/c39972129.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle or effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end \ No newline at end of file +end diff --git a/official/c39987164.lua b/official/c39987164.lua index 9dd26ec2d4..a9f29ed78b 100644 --- a/official/c39987164.lua +++ b/official/c39987164.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1) --destroy local e2=Effect.CreateEffect(c) @@ -76,4 +76,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dt:IsRelateToBattle() then Duel.Destroy(dt,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c4019153.lua b/official/c4019153.lua index cd8ceb3d08..71bcf67cc1 100644 --- a/official/c4019153.lua +++ b/official/c4019153.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=4 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c40390147.lua b/official/c40390147.lua index 2dcc024235..1444c46b91 100644 --- a/official/c40390147.lua +++ b/official/c40390147.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_PHOTON} s.listed_names={CARD_GALAXYEYES_P_DRAGON} @@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c40424929.lua b/official/c40424929.lua index 5f9c3d4f8d..a1fecc3c88 100644 --- a/official/c40424929.lua +++ b/official/c40424929.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end @@ -27,4 +27,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) Duel.Damage(p,ct*200,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c40673853.lua b/official/c40673853.lua index aadeb81009..d10ddbd53e 100644 --- a/official/c40673853.lua +++ b/official/c40673853.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy 1 face-down card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -58,4 +58,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c41147577.lua b/official/c41147577.lua index 5ea782c2e0..3908ceed5e 100644 --- a/official/c41147577.lua +++ b/official/c41147577.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.postg) e2:SetOperation(s.posop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={14152862} function s.efilter(e,te) @@ -58,4 +58,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c41309158.lua b/official/c41309158.lua index ad79374a70..784d167fad 100644 --- a/official/c41309158.lua +++ b/official/c41309158.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={15914410} function s.poscon(e,tp,eg,ep,ev,re,r,rp) @@ -55,4 +55,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c41375811.lua b/official/c41375811.lua index bd30960227..34579e396f 100644 --- a/official/c41375811.lua +++ b/official/c41375811.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) diff --git a/official/c41522092.lua b/official/c41522092.lua index f9936522b6..fc432502f8 100644 --- a/official/c41522092.lua +++ b/official/c41522092.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e5:SetCost(Cost.Detach(1)) e5:SetTarget(s.cttg) e5:SetOperation(s.ctop) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.xyz_number=0 function s.xyzcheck(g,tp,xyz) @@ -83,4 +83,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c41524885.lua b/official/c41524885.lua index 251a3c38ee..9d9d324743 100644 --- a/official/c41524885.lua +++ b/official/c41524885.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c42160203.lua b/official/c42160203.lua index 101c2c2079..4d2bd9c186 100644 --- a/official/c42160203.lua +++ b/official/c42160203.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -87,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c42230449.lua b/official/c42230449.lua index e0b2cfeb49..bd1ea118ca 100644 --- a/official/c42230449.lua +++ b/official/c42230449.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=2 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c42421606.lua b/official/c42421606.lua index 5389f34871..d31c175e8e 100644 --- a/official/c42421606.lua +++ b/official/c42421606.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.eftg) e2:SetOperation(s.efop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.roll_dice=true s.xyz_number=85 @@ -70,4 +70,4 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c42589641.lua b/official/c42589641.lua index ad3aa0d9fc..be5a6db09d 100644 --- a/official/c42589641.lua +++ b/official/c42589641.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.hdtg) e4:SetOperation(s.hdop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --spsummon local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,2)) @@ -137,4 +137,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c42741437.lua b/official/c42741437.lua index 37c6c549fc..30322da551 100644 --- a/official/c42741437.lua +++ b/official/c42741437.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -83,4 +83,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c42752141.lua b/official/c42752141.lua index e41196d70c..91e9938059 100644 --- a/official/c42752141.lua +++ b/official/c42752141.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c42940335.lua b/official/c42940335.lua index b19c3f8c4c..c89e994d25 100644 --- a/official/c42940335.lua +++ b/official/c42940335.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Equip this card to 1 "Mimighoul Master" you control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -95,4 +95,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c43047672.lua b/official/c43047672.lua index 81815864e0..50dc3f92dd 100644 --- a/official/c43047672.lua +++ b/official/c43047672.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --chain attack local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end \ No newline at end of file +end diff --git a/official/c440556.lua b/official/c440556.lua index 14ae85bf96..1192c99e64 100644 --- a/official/c440556.lua +++ b/official/c440556.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c,e,tp) return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c4423206.lua b/official/c4423206.lua index d78b3937ce..c4a9d313c3 100644 --- a/official/c4423206.lua +++ b/official/c4423206.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spfilter(c,e,tp) return c:IsRace(RACE_WARRIOR|RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) @@ -55,4 +55,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c44311445.lua b/official/c44311445.lua index 5f0910cad2..59ee344e73 100644 --- a/official/c44311445.lua +++ b/official/c44311445.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.spcost) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_MADOLCHE} s.listed_names={74641045} @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end \ No newline at end of file +end diff --git a/official/c44405066.lua b/official/c44405066.lua index 18a379195b..07f9b341a5 100644 --- a/official/c44405066.lua +++ b/official/c44405066.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_RED_EYES} function s.indcon(e) @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c44505297.lua b/official/c44505297.lua index 9694cfc72e..096e5f97b6 100644 --- a/official/c44505297.lua +++ b/official/c44505297.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() @@ -90,4 +90,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.SendtoGrave(tg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c44698398.lua b/official/c44698398.lua index 1f494a831d..2a3abb51f2 100644 --- a/official/c44698398.lua +++ b/official/c44698398.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_GALAXY,SET_TACHYON} function s.thfilter(c) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(sc,mc) end end -end \ No newline at end of file +end diff --git a/official/c45533023.lua b/official/c45533023.lua index e9c5361bfe..3204e6de1f 100644 --- a/official/c45533023.lua +++ b/official/c45533023.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCondition(s.descon) e2:SetTarget(s.destg1) e2:SetOperation(s.desop1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --destroy local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) @@ -66,4 +66,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c45742626.lua b/official/c45742626.lua index 62129ff339..2c62b1056d 100644 --- a/official/c45742626.lua +++ b/official/c45742626.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsAttribute,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,ATTRIBUTE_DARK)*200 @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) g1:Merge(g2) Duel.DisableShuffleCheck() Duel.SendtoGrave(g1,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c45852939.lua b/official/c45852939.lua index 25e375d7f8..3a9d57dece 100644 --- a/official/c45852939.lua +++ b/official/c45852939.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 1 Rank 4 or lower Xyz monster from the GY and attach another to it local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -86,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g:RemoveCard(sc) Duel.Overlay(sc,g) end -end \ No newline at end of file +end diff --git a/official/c46772449.lua b/official/c46772449.lua index 565ee3c36d..f8b5435599 100644 --- a/official/c46772449.lua +++ b/official/c46772449.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) if not ((Duel.IsTurnPlayer(tp) and Duel.IsMainPhase()) or (Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase())) then return false end @@ -49,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/official/c46871387.lua b/official/c46871387.lua index 97bb8b9813..afd536b64a 100644 --- a/official/c46871387.lua +++ b/official/c46871387.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --def local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -43,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c46895036.lua b/official/c46895036.lua index d8ec8a65c2..e4d6faf17d 100644 --- a/official/c46895036.lua +++ b/official/c46895036.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --to hand local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND) @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c47017574.lua b/official/c47017574.lua index 4cc823ca42..552167f0b1 100644 --- a/official/c47017574.lua +++ b/official/c47017574.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=92 s.listed_names={97403510} @@ -82,4 +82,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c47060528.lua b/official/c47060528.lua index 892cb0f6d6..3081c1fe3d 100644 --- a/official/c47060528.lua +++ b/official/c47060528.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Change the name of 1 other face-up monster on the field to "Sakra Vendirage" until the End Phase local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c47132793.lua b/official/c47132793.lua index 91a22a9b89..eb14e1b81e 100644 --- a/official/c47132793.lua +++ b/official/c47132793.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card from your GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end \ No newline at end of file +end diff --git a/official/c47349116.lua b/official/c47349116.lua index ad514827f2..e56995a00a 100644 --- a/official/c47349116.lua +++ b/official/c47349116.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --destroy replace local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -75,4 +75,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end \ No newline at end of file +end diff --git a/official/c47506081.lua b/official/c47506081.lua index 9a8f620a91..143bcd984b 100644 --- a/official/c47506081.lua +++ b/official/c47506081.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -31,4 +31,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c47579719.lua b/official/c47579719.lua index 90af745c69..e4d5aeda6a 100644 --- a/official/c47579719.lua +++ b/official/c47579719.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition() @@ -26,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE) -end \ No newline at end of file +end diff --git a/official/c47805931.lua b/official/c47805931.lua index d5197d76d3..8fde461cbd 100644 --- a/official/c47805931.lua +++ b/official/c47805931.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=20 function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c48348921.lua b/official/c48348921.lua index 52d61461ed..ac8d913582 100644 --- a/official/c48348921.lua +++ b/official/c48348921.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Unaffected by opponent's monster effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -60,4 +60,4 @@ function s.atkval(e,c) local g=c:GetOverlayGroup() local sum=g:GetSum(Card.GetLevel)+g:GetSum(Card.GetRank) return sum*100 -end \ No newline at end of file +end diff --git a/official/c48608796.lua b/official/c48608796.lua index c5b0fe023f..3b92ba74e2 100644 --- a/official/c48608796.lua +++ b/official/c48608796.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetCountLimit(1) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.indop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_LYRILUSC} function s.atkval(e,c) @@ -65,4 +65,4 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e3:SetValue(1) e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) -end \ No newline at end of file +end diff --git a/official/c48739166.lua b/official/c48739166.lua index 171dea3e29..391e1be231 100644 --- a/official/c48739166.lua +++ b/official/c48739166.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Protect itself from destruction local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -50,4 +50,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c48905153.lua b/official/c48905153.lua index 081b7fc9e2..dffef9468f 100644 --- a/official/c48905153.lua +++ b/official/c48905153.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) @@ -68,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c48928529.lua b/official/c48928529.lua index 61ac6e818f..66a54d315e 100644 --- a/official/c48928529.lua +++ b/official/c48928529.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=83 function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c49032236.lua b/official/c49032236.lua index f8325f9e12..779189fa2b 100644 --- a/official/c49032236.lua +++ b/official/c49032236.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=81 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -43,4 +43,4 @@ end function s.efilter(e,re) local c=e:GetHandler() return c~=re:GetOwner() and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end \ No newline at end of file +end diff --git a/official/c49121795.lua b/official/c49121795.lua index 622bdcb1f0..59c4e17810 100644 --- a/official/c49121795.lua +++ b/official/c49121795.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.datg) e1:SetOperation(s.daop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c49202331.lua b/official/c49202331.lua index 1987bddccb..812ddf9702 100644 --- a/official/c49202331.lua +++ b/official/c49202331.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCondition(s.atcon) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.atop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={3814632} function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -54,4 +54,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end \ No newline at end of file +end diff --git a/official/c49221191.lua b/official/c49221191.lua index 7ff2078dec..f2d9520071 100644 --- a/official/c49221191.lua +++ b/official/c49221191.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=32 s.listed_names={65676461} @@ -67,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c49456901.lua b/official/c49456901.lua index 345319ccb7..f5fa4c181d 100644 --- a/official/c49456901.lua +++ b/official/c49456901.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.xyz_number=104 @@ -66,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) end -end \ No newline at end of file +end diff --git a/official/c49678559.lua b/official/c49678559.lua index a184ad305f..4cded6a594 100644 --- a/official/c49678559.lua +++ b/official/c49678559.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction Replacement local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -73,4 +73,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RegisterEffect(e1,tp) return true else return false end -end \ No newline at end of file +end diff --git a/official/c4997565.lua b/official/c4997565.lua index ea1885fe46..a41cba6c16 100644 --- a/official/c4997565.lua +++ b/official/c4997565.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=3 function s.spfilter(c,e,tp) @@ -97,4 +97,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) sc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c5014629.lua b/official/c5014629.lua index 845672b4f8..e773788a49 100644 --- a/official/c5014629.lua +++ b/official/c5014629.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:IsMonster() @@ -31,4 +31,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_REMOVED,0,nil) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,ct*100,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c50260683.lua b/official/c50260683.lua index ec81aabb35..90e9e231ab 100644 --- a/official/c50260683.lua +++ b/official/c50260683.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()~=tc:GetBaseAttack() then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c50449881.lua b/official/c50449881.lua index 85bbbc0b28..a85c94cbc4 100644 --- a/official/c50449881.lua +++ b/official/c50449881.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Opponent can only target this card for attacks local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.atlimit(e,c) return c~=e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c50789693.lua b/official/c50789693.lua index 33c52d32a4..78b88156df 100644 --- a/official/c50789693.lua +++ b/official/c50789693.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.adop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) -- local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -72,4 +72,4 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/official/c5088741.lua b/official/c5088741.lua index 5b91f0fdb6..0cab045745 100644 --- a/official/c5088741.lua +++ b/official/c5088741.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCost(Cost.Detach(1,1,nil)) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Add 1 "A.I." Trap from your Deck to your hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -60,4 +60,4 @@ function s.thop(filter) Duel.ConfirmCards(1-tp,g) end end -end \ No newline at end of file +end diff --git a/official/c51497409.lua b/official/c51497409.lua index df593f92cb..4b081603f5 100644 --- a/official/c51497409.lua +++ b/official/c51497409.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ddtg) e1:SetOperation(s.ddop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --indes local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -73,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dc and Duel.Destroy(dc,REASON_EFFECT)>0 then Duel.Damage(1-tp,500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c51543904.lua b/official/c51543904.lua index 9be8f566df..8a1647ce4a 100644 --- a/official/c51543904.lua +++ b/official/c51543904.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_RANK_UP_MAGIC,SET_NUMBER} s.xyz_number=99 @@ -93,4 +93,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c51735257.lua b/official/c51735257.lua index f3aa3b4bd9..3166326af2 100644 --- a/official/c51735257.lua +++ b/official/c51735257.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=50 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c51960178.lua b/official/c51960178.lua index 5e6bb4e02e..d8c96b4f50 100644 --- a/official/c51960178.lua +++ b/official/c51960178.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -27,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) 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 +end diff --git a/official/c52323874.lua b/official/c52323874.lua index 70789d45ab..bc4d19e712 100644 --- a/official/c52323874.lua +++ b/official/c52323874.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_RAIDRAPTOR} function s.filter(c) @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c52558805.lua b/official/c52558805.lua index 7b196035de..4ebfd51976 100644 --- a/official/c52558805.lua +++ b/official/c52558805.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_DJINN} function s.filter(c,tp) @@ -49,4 +49,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c52653092.lua b/official/c52653092.lua index 64bd918ea6..b984d80b3e 100644 --- a/official/c52653092.lua +++ b/official/c52653092.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e6:SetCondition(s.actcon) e6:SetCost(Cost.Detach(1)) e6:SetOperation(s.actop) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) end s.listed_series={SET_NUMBER,SET_RANK_UP_MAGIC,SET_UTOPIA} s.xyz_number=0 @@ -94,4 +94,4 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c53054164.lua b/official/c53054164.lua index 76c9abd44b..69094a0c96 100644 --- a/official/c53054164.lua +++ b/official/c53054164.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return to the Extra Deck and Special Summon from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c53244294.lua b/official/c53244294.lua index dbc16b6607..8484942ec9 100644 --- a/official/c53244294.lua +++ b/official/c53244294.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.ztg) e2:SetOperation(s.zop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=57 function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -66,4 +66,4 @@ function s.zop(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp) return e:GetLabel() -end \ No newline at end of file +end diff --git a/official/c53334641.lua b/official/c53334641.lua index b854bee499..2a22f14307 100644 --- a/official/c53334641.lua +++ b/official/c53334641.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -77,4 +77,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c53701457.lua b/official/c53701457.lua index c8891d92bc..1503382487 100644 --- a/official/c53701457.lua +++ b/official/c53701457.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=28 function s.dircon(e) @@ -53,4 +53,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*500 Duel.Damage(p,dam,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c54358015.lua b/official/c54358015.lua index 137be567ca..ab1bf74f0f 100644 --- a/official/c54358015.lua +++ b/official/c54358015.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Prevent effect target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.tgtg(e,c) return c:IsSetCard(SET_GALAXY) and c~=e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c54366836.lua b/official/c54366836.lua index b18e7b51c2..89434e7c1d 100644 --- a/official/c54366836.lua +++ b/official/c54366836.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCondition(s.damcon2) e3:SetCost(s.damcost2) e3:SetOperation(s.damop2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=54 function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -71,4 +71,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end \ No newline at end of file +end diff --git a/official/c54719828.lua b/official/c54719828.lua index 05aa18609d..b6a9c28323 100644 --- a/official/c54719828.lua +++ b/official/c54719828.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=16 function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -50,4 +50,4 @@ function s.aclimit2(e,re,tp) end function s.aclimit3(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() -end \ No newline at end of file +end diff --git a/official/c5530780.lua b/official/c5530780.lua index 9c5f4d7441..3b3a7b82d1 100644 --- a/official/c5530780.lua +++ b/official/c5530780.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e3:SetCountLimit(1,{id,1}) e3:SetCost(s.atkcost) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -101,4 +101,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(800) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c55470553.lua b/official/c55470553.lua index bda4f9b7ad..0f1f9aa6bf 100644 --- a/official/c55470553.lua +++ b/official/c55470553.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -64,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c55727845.lua b/official/c55727845.lua index bd2ee51764..49dc0eb60f 100644 --- a/official/c55727845.lua +++ b/official/c55727845.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=96 function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,4 +43,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c55935416.lua b/official/c55935416.lua index d1b894db89..aed1250cde 100644 --- a/official/c55935416.lua +++ b/official/c55935416.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=56 function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -32,4 +32,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c56051086.lua b/official/c56051086.lua index 3d5a9248c3..f9550e15bc 100644 --- a/official/c56051086.lua +++ b/official/c56051086.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e1) --indest local e2=Effect.CreateEffect(c) @@ -88,4 +88,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) Duel.Damage(1-tp,ev,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c56292140.lua b/official/c56292140.lua index 6867a1409c..5ff1994a44 100644 --- a/official/c56292140.lua +++ b/official/c56292140.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --destroy local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -59,4 +59,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c56337500.lua b/official/c56337500.lua index 58864c0962..0cb2ffccc8 100644 --- a/official/c56337500.lua +++ b/official/c56337500.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -114,4 +114,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end \ No newline at end of file +end diff --git a/official/c56638325.lua b/official/c56638325.lua index fdf1128da1..934f82a426 100644 --- a/official/c56638325.lua +++ b/official/c56638325.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -97,4 +97,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c56832966.lua b/official/c56832966.lua index 8d02e99e40..089e5364eb 100644 --- a/official/c56832966.lua +++ b/official/c56832966.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCondition(s.atkcon) e3:SetCost(s.atkcost) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -61,4 +61,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(5000) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c56910167.lua b/official/c56910167.lua index 3a433afe0e..ffb6382c7f 100644 --- a/official/c56910167.lua +++ b/official/c56910167.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -27,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c57031794.lua b/official/c57031794.lua index 2ca958293c..4dcc2515b7 100644 --- a/official/c57031794.lua +++ b/official/c57031794.lua @@ -23,14 +23,14 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum Red Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCondition(s.quickeffcond) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Attach 1 "Super Quantum" monster from your hand or field to this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c57043117.lua b/official/c57043117.lua index ec683b14b6..b64f9c2039 100644 --- a/official/c57043117.lua +++ b/official/c57043117.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.efilter(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() @@ -57,4 +57,4 @@ end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 else return val end -end \ No newline at end of file +end diff --git a/official/c57314798.lua b/official/c57314798.lua index acfb964845..3e1de1cc15 100644 --- a/official/c57314798.lua +++ b/official/c57314798.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy as many monsters on the field as possible and each player sets 1 Spell/Trap from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -109,4 +109,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c57450198.lua b/official/c57450198.lua index b0d863cf7d..dcdb1e805d 100644 --- a/official/c57450198.lua +++ b/official/c57450198.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum White Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCondition(s.quickeffcond) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Attach 1 "Super Quantum" monster from your hand or field to this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -81,4 +81,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c57566760.lua b/official/c57566760.lua index c8b64c8173..1b805a31f9 100644 --- a/official/c57566760.lua +++ b/official/c57566760.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetCondition(s.atcon) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.atop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_MIKANKO} function s.thfilter(c) @@ -60,4 +60,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToBattle() then Duel.ChainAttack() end -end \ No newline at end of file +end diff --git a/official/c57707471.lua b/official/c57707471.lua index 7fbf337933..2cd4879271 100644 --- a/official/c57707471.lua +++ b/official/c57707471.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=21 function s.ovfilter(c,tp,xyzc) @@ -46,4 +46,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c58058134.lua b/official/c58058134.lua index 4f11743cac..b835f7143b 100644 --- a/official/c58058134.lua +++ b/official/c58058134.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 @@ -50,4 +50,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c58069384.lua b/official/c58069384.lua index 2fdf6a7307..7c50da1ec5 100644 --- a/official/c58069384.lua +++ b/official/c58069384.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Increase ATK by 2100 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c581014.lua b/official/c581014.lua index 974ae8a7cd..b41729ffc5 100644 --- a/official/c581014.lua +++ b/official/c581014.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spfilter(c,e,tp) return c:IsNonEffectMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -72,4 +72,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end diff --git a/official/c58504745.lua b/official/c58504745.lua index fd411b8a1d..6527581e77 100644 --- a/official/c58504745.lua +++ b/official/c58504745.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.filter1(c) @@ -39,4 +39,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c58600555.lua b/official/c58600555.lua index 5a48be649a..b389794bbd 100644 --- a/official/c58600555.lua +++ b/official/c58600555.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Change position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c58712976.lua b/official/c58712976.lua index 189b2a3289..cf0c1c623c 100644 --- a/official/c58712976.lua +++ b/official/c58712976.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -60,4 +60,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #rg>0 then Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c58720904.lua b/official/c58720904.lua index 34dfc1b7c9..84c7657348 100644 --- a/official/c58720904.lua +++ b/official/c58720904.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end @@ -56,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SetLP(1-tp,3000) end -end \ No newline at end of file +end diff --git a/official/c58820923.lua b/official/c58820923.lua index 5cc9562242..6c4e5b170e 100644 --- a/official/c58820923.lua +++ b/official/c58820923.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=95 function s.ovfilter(c,tp,xyzc) @@ -87,4 +87,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c59071624.lua b/official/c59071624.lua index e5c3f92b12..4682998c19 100644 --- a/official/c59071624.lua +++ b/official/c59071624.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --If an opponent's monster is in GY/banished due to your effect, special summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -40,10 +40,10 @@ function s.initial_effect(c) e3:SetCondition(s.sscon) e3:SetTarget(s.sstg) e3:SetOperation(s.ssop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) local e4=e3:Clone() e4:SetCode(EVENT_REMOVE) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end --Part of "Traptrix" archetype s.listed_series={SET_TRAPTRIX} diff --git a/official/c5916510.lua b/official/c5916510.lua index 599b79cd74..93d10e73db 100644 --- a/official/c5916510.lua +++ b/official/c5916510.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon itself from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -67,4 +67,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) and tc:IsRelateToEffect(e) and s.matfilter(tc) and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c59170782.lua b/official/c59170782.lua index 04f161119c..ffc3297131 100644 --- a/official/c59170782.lua +++ b/official/c59170782.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.tgcon1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.tgop1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Change battle target local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.tgcon2) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.tgop2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -91,4 +91,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c59208943.lua b/official/c59208943.lua index c3d231e021..4e7576b3db 100644 --- a/official/c59208943.lua +++ b/official/c59208943.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --attach local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -69,4 +69,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,g) end end -end \ No newline at end of file +end diff --git a/official/c59242457.lua b/official/c59242457.lua index dfdac7124b..73f633e395 100644 --- a/official/c59242457.lua +++ b/official/c59242457.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Return material to Extra Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -99,4 +99,4 @@ function s.teop(e,tp,eg,ep,ev,re,r,rp) tc:CompleteProcedure() end end -end \ No newline at end of file +end diff --git a/official/c59627393.lua b/official/c59627393.lua index 3d37048b91..ea00693eba 100644 --- a/official/c59627393.lua +++ b/official/c59627393.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_BATTLIN_BOXER} s.xyz_number=105 @@ -73,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetReset(RESETS_STANDARD_PHASE_END) at:RegisterEffect(e4) end -end \ No newline at end of file +end diff --git a/official/c60195675.lua b/official/c60195675.lua index a52e7923f8..9a61f8fd11 100644 --- a/official/c60195675.lua +++ b/official/c60195675.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,id) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon this card from the GY in Defense Position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c60517697.lua b/official/c60517697.lua index a59d5d7679..82b9878e3b 100644 --- a/official/c60517697.lua +++ b/official/c60517697.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 3 Level 3 or lower Fish, Sea Serpent, and/or Aqua monsters from your hand and/or GY. local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -88,4 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g==3 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c60645181.lua b/official/c60645181.lua index 4d7376f41c..5b47e3740d 100644 --- a/official/c60645181.lua +++ b/official/c60645181.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(2)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -26,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c60992364.lua b/official/c60992364.lua index 976cf47e11..c0cf8aaf88 100644 --- a/official/c60992364.lua +++ b/official/c60992364.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Equip this card on the field to 1 "Utopia" monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -123,4 +123,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c61307542.lua b/official/c61307542.lua index 4a66361639..725ec1e193 100644 --- a/official/c61307542.lua +++ b/official/c61307542.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.efilter(e,re) return re:IsMonsterEffect() and re:GetOwner()~=e:GetOwner() diff --git a/official/c61344030.lua b/official/c61344030.lua index 59fe12f3a3..715ad446d5 100644 --- a/official/c61344030.lua +++ b/official/c61344030.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ 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 +end diff --git a/official/c61374414.lua b/official/c61374414.lua index 25afbc871d..92a30d9ae8 100644 --- a/official/c61374414.lua +++ b/official/c61374414.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.listed_names={34876719} @@ -83,4 +83,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sc=e:GetLabelObject() Duel.Destroy(sc,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c61399402.lua b/official/c61399402.lua index d0fddc7996..d5267ad31c 100644 --- a/official/c61399402.lua +++ b/official/c61399402.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.descost) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -91,4 +91,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end \ No newline at end of file +end diff --git a/official/c6165656.lua b/official/c6165656.lua index cd4d502ffb..a7bed17a32 100644 --- a/official/c6165656.lua +++ b/official/c6165656.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --win local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -82,4 +82,4 @@ function s.wincon(e,tp,eg,ep,ev,re,r,rp) end function s.winop(e,tp,eg,ep,ev,re,r,rp) Duel.Win(tp,WIN_REASON_DISASTER_LEO) -end \ No newline at end of file +end diff --git a/official/c62070231.lua b/official/c62070231.lua index cc6c786f45..398b03e5dc 100644 --- a/official/c62070231.lua +++ b/official/c62070231.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=94 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c6247535.lua b/official/c6247535.lua index 7e13a454ac..f6c53ac599 100644 --- a/official/c6247535.lua +++ b/official/c6247535.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_BORREL} function s.mfilter(c,lc,sumtype,tp) @@ -111,4 +111,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c62541668.lua b/official/c62541668.lua index e8cbeb35da..bafca0c3ba 100644 --- a/official/c62541668.lua +++ b/official/c62541668.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Protect itself from destruction local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -66,4 +66,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c62709239.lua b/official/c62709239.lua index f51530087f..6c8544b24b 100644 --- a/official/c62709239.lua +++ b/official/c62709239.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -102,4 +102,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c) return not c:IsAttribute(ATTRIBUTE_DARK) -end \ No newline at end of file +end diff --git a/official/c6284176.lua b/official/c6284176.lua index c52764d729..e8cdf5cdb2 100644 --- a/official/c6284176.lua +++ b/official/c6284176.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -92,4 +92,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=Duel.GetFirstTarget() Duel.Release(tc,REASON_EFFECT|REASON_REPLACE) -end \ No newline at end of file +end diff --git a/official/c62967433.lua b/official/c62967433.lua index 908d8e20b4..8e1881e5c6 100644 --- a/official/c62967433.lua +++ b/official/c62967433.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon 1 Level 4 monster from your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c63746411.lua b/official/c63746411.lua index 9fe3874dc7..053bea8eb5 100644 --- a/official/c63746411.lua +++ b/official/c63746411.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=106 function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end \ No newline at end of file +end diff --git a/official/c63767246.lua b/official/c63767246.lua index 36900da489..d0bbb9049a 100644 --- a/official/c63767246.lua +++ b/official/c63767246.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()~=e:GetHandler() end) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.chngtgop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Make 1 of your Xyz monsters gain ATK local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -99,4 +99,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(g:GetFirst():GetBaseAttack()) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/official/c6387204.lua b/official/c6387204.lua index bde33d679a..e74f1611fd 100644 --- a/official/c6387204.lua +++ b/official/c6387204.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCondition(s.lpcon) e2:SetCost(s.lpcost) e2:SetOperation(s.lpop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=6 @@ -89,4 +89,4 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c64245689.lua b/official/c64245689.lua index 58e7bc7a0c..20a6f342b7 100644 --- a/official/c64245689.lua +++ b/official/c64245689.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.tgfilter(c) return c:IsRace(RACE_PLANT) and c:IsAbleToGrave() @@ -60,4 +60,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -end \ No newline at end of file +end diff --git a/official/c64276752.lua b/official/c64276752.lua index 7e842ca791..9cfb19eff7 100644 --- a/official/c64276752.lua +++ b/official/c64276752.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indescon(e) return e:GetHandler():IsXyzSummoned() @@ -83,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end \ No newline at end of file +end diff --git a/official/c64332231.lua b/official/c64332231.lua index f6bc6a2670..7f63e67a60 100644 --- a/official/c64332231.lua +++ b/official/c64332231.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsReleasableByEffect,1,nil) @@ -35,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c64414267.lua b/official/c64414267.lua index f41f5abf80..67c913f180 100644 --- a/official/c64414267.lua +++ b/official/c64414267.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.AND(Cost.Detach(1),Cost.Discard())) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(function(e,c,sump,sumtype) return (sumtype&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c64554883.lua b/official/c64554883.lua index 93a59b1e79..8488ecf325 100644 --- a/official/c64554883.lua +++ b/official/c64554883.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=25 function s.filter(c) @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c64689404.lua b/official/c64689404.lua index 485cf83396..8f8d620070 100644 --- a/official/c64689404.lua +++ b/official/c64689404.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ractg) e1:SetOperation(s.racop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -61,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c6511113.lua b/official/c6511113.lua index c344a429b8..e063f88ace 100644 --- a/official/c6511113.lua +++ b/official/c6511113.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e5:SetCost(s.cost) e5:SetTarget(s.target) e5:SetOperation(s.operation) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_names={id} s.listed_series={SET_TRAPTRIX,SET_TRAP_HOLE,SET_HOLE} @@ -90,4 +90,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end -end \ No newline at end of file +end diff --git a/official/c65301952.lua b/official/c65301952.lua index 08da822755..23158a467f 100644 --- a/official/c65301952.lua +++ b/official/c65301952.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(s.setcost) e2:SetTarget(s.settg) e2:SetOperation(s.setop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsSpell,c:GetControler(),LOCATION_GRAVE,0,nil)*200 @@ -54,4 +54,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end \ No newline at end of file +end diff --git a/official/c65676461.lua b/official/c65676461.lua index 87ee6eabce..36e304b8c0 100644 --- a/official/c65676461.lua +++ b/official/c65676461.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=32 function s.atcon(e,tp,eg,ep,ev,re,r,rp) @@ -58,4 +58,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c65884091.lua b/official/c65884091.lua index c8bca23033..4159a73d51 100644 --- a/official/c65884091.lua +++ b/official/c65884091.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) return te:IsActiveType(TYPE_EFFECT) and te:GetOwner()~=e:GetOwner() -end \ No newline at end of file +end diff --git a/official/c65892585.lua b/official/c65892585.lua index e32b74c3dd..ca53aded6b 100644 --- a/official/c65892585.lua +++ b/official/c65892585.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return itself to the Extra Deck and Special Summon "Gold Pride - Captain Carrie" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -78,4 +78,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end diff --git a/official/c66011101.lua b/official/c66011101.lua index d5ee56a410..ad7c14c31b 100644 --- a/official/c66011101.lua +++ b/official/c66011101.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=60 function s.spfilter(c,e,tp) @@ -109,4 +109,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/official/c66506689.lua b/official/c66506689.lua index a5ef91aff4..e1fde6c1f7 100644 --- a/official/c66506689.lua +++ b/official/c66506689.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tg) e1:SetOperation(s.op) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsCanChangePosition() @@ -35,4 +35,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) end -end \ No newline at end of file +end diff --git a/official/c66523544.lua b/official/c66523544.lua index 3244964b06..07c8a2363d 100644 --- a/official/c66523544.lua +++ b/official/c66523544.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsSpellTrap() @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.climit(e,lp,tp) return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end \ No newline at end of file +end diff --git a/official/c66547759.lua b/official/c66547759.lua index 6841d6e086..82f7558c38 100644 --- a/official/c66547759.lua +++ b/official/c66547759.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.xyz_number=23 @@ -68,4 +68,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c6659193.lua b/official/c6659193.lua index cb04fd58cf..53d9bb951c 100644 --- a/official/c6659193.lua +++ b/official/c6659193.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetCondition(s.atkcon) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetOperation(s.atkop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_names={17016362} --"Performage Trapeze Magician" function s.reflectcond(e) @@ -68,4 +68,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c66970002.lua b/official/c66970002.lua index 21cc02ced5..ff0ec7f6d0 100644 --- a/official/c66970002.lua +++ b/official/c66970002.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c67173574.lua b/official/c67173574.lua index afa51c3a85..fb0ad0c4ab 100644 --- a/official/c67173574.lua +++ b/official/c67173574.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=102 s.listed_names={49678559} @@ -93,4 +93,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c68300121.lua b/official/c68300121.lua index afb9715d3a..df6821b48c 100644 --- a/official/c68300121.lua +++ b/official/c68300121.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Make the opponent send a monste to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -64,4 +64,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() and bc:IsFaceup() then Duel.SendtoGrave(bc,REASON_RULE,PLAYER_NONE,1-tp) end -end \ No newline at end of file +end diff --git a/official/c68396121.lua b/official/c68396121.lua index 9a1521e99e..a4acb7d16f 100644 --- a/official/c68396121.lua +++ b/official/c68396121.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -86,4 +86,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c68597372.lua b/official/c68597372.lua index 960532daf6..ae742ed35e 100644 --- a/official/c68597372.lua +++ b/official/c68597372.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkval(e,c) return c:GetOverlayCount()*300 @@ -62,4 +62,4 @@ end function s.flipop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.ChangePosition(tc,POS_FACEUP_ATTACK) -end \ No newline at end of file +end diff --git a/official/c68618157.lua b/official/c68618157.lua index f6b96d8067..2fe069ee16 100644 --- a/official/c68618157.lua +++ b/official/c68618157.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --tohand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -33,7 +33,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(tp) @@ -74,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c68679595.lua b/official/c68679595.lua index d1d71014b3..7d1dd4f6e4 100644 --- a/official/c68679595.lua +++ b/official/c68679595.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -102,4 +102,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c68836428.lua b/official/c68836428.lua index e343873701..c765fedf6f 100644 --- a/official/c68836428.lua +++ b/official/c68836428.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.filter(c) return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or c:GetAttack()>0) @@ -61,4 +61,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetValue(-800) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c69058960.lua b/official/c69058960.lua index d68a0aa8c7..f3041f1c26 100644 --- a/official/c69058960.lua +++ b/official/c69058960.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be destroyed local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ end function s.refcon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and Duel.GetAttackTarget()==e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c69069911.lua b/official/c69069911.lua index 52497ebd0b..3322720c36 100644 --- a/official/c69069911.lua +++ b/official/c69069911.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.atcon) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -23,4 +23,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end \ No newline at end of file +end diff --git a/official/c69170557.lua b/official/c69170557.lua index a1cb897824..ddf2e2778a 100644 --- a/official/c69170557.lua +++ b/official/c69170557.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.counter_place_list={0x1024} s.xyz_number=40 @@ -58,4 +58,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(g) do tc:AddCounter(0x1024,1) end -end \ No newline at end of file +end diff --git a/official/c69610924.lua b/official/c69610924.lua index d9c1f4b0dc..f660863ff3 100644 --- a/official/c69610924.lua +++ b/official/c69610924.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot direct attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c69655484.lua b/official/c69655484.lua index ee2dc16b0a..b35e6fe453 100644 --- a/official/c69655484.lua +++ b/official/c69655484.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.edsptg) e1:SetOperation(s.edspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Add 1 "Rank-Up-Magic" Spell from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(s.thcost) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon 1 "Performage" monster from your GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -100,4 +100,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c69757518.lua b/official/c69757518.lua index caac9b8852..b863feffe8 100644 --- a/official/c69757518.lua +++ b/official/c69757518.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.atop) --Place 1 card from the GY on the top of the Deck, and if you do, attach another to this card as material - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TODECK) @@ -80,4 +80,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,sg) end end -end \ No newline at end of file +end diff --git a/official/c6983839.lua b/official/c6983839.lua index c4b64dee35..0bd87176ea 100644 --- a/official/c6983839.lua +++ b/official/c6983839.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c69840739.lua b/official/c69840739.lua index a358a9f688..0a72dcb706 100644 --- a/official/c69840739.lua +++ b/official/c69840739.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) local event_chaining,_,_,event_value,reason_effect,_,reason_player=Duel.CheckEvent(EVENT_CHAINING,true) diff --git a/official/c698785.lua b/official/c698785.lua index b2293f7dec..22bf9daa3c 100644 --- a/official/c698785.lua +++ b/official/c698785.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end @@ -25,4 +25,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c7020743.lua b/official/c7020743.lua index 8b57528695..2c3bdcaf1e 100644 --- a/official/c7020743.lua +++ b/official/c7020743.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) e6:SetCost(Cost.Detach(4,4,nil)) e6:SetTarget(s.destg) e6:SetOperation(s.desop) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) end function s.atchtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.GetFieldGroupCount(0,LOCATION_GRAVE,LOCATION_GRAVE)>0 end @@ -77,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c70636044.lua b/official/c70636044.lua index f5e4899135..b43f69179b 100644 --- a/official/c70636044.lua +++ b/official/c70636044.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --At start of Damage Step, destroy 1 card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c71068247.lua b/official/c71068247.lua index f9b918e92d..c7e4e72f73 100644 --- a/official/c71068247.lua +++ b/official/c71068247.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --ATK decrease local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.adcon(e) return e:GetHandler():GetOverlayCount()==0 -end \ No newline at end of file +end diff --git a/official/c71612253.lua b/official/c71612253.lua index 6204352e32..85d63c3e7c 100644 --- a/official/c71612253.lua +++ b/official/c71612253.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to grave local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOGRAVE) @@ -87,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c7194917.lua b/official/c7194917.lua index e1241cbdfd..ee89c885ea 100644 --- a/official/c7194917.lua +++ b/official/c7194917.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.adop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --pos local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -66,4 +66,4 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToBattle() and c:IsDefensePos() then Duel.ChangePosition(c,POS_FACEUP_ATTACK) end -end \ No newline at end of file +end diff --git a/official/c72409226.lua b/official/c72409226.lua index 082be83783..d06b597852 100644 --- a/official/c72409226.lua +++ b/official/c72409226.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.deckspthtg) e1:SetOperation(s.deckspthop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Add up to 2 cards attached to this card to your hand, including at least 1 "Materiactor" card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c72971064.lua b/official/c72971064.lua index 9679da9925..7644992668 100644 --- a/official/c72971064.lua +++ b/official/c72971064.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.retopthtg) e2:SetOperation(s.retopthop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Add 1 "Lyrilusc" monster from your GY to your hand, except this card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -87,4 +87,4 @@ function s.llthop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c73082255.lua b/official/c73082255.lua index 20bc7c52f7..08ac8075c3 100644 --- a/official/c73082255.lua +++ b/official/c73082255.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.gytg) e3:SetOperation(s.gyop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.lvtg(e,c) return c:IsLevelAbove(1) and c:GetOwner()~=e:GetHandlerPlayer() diff --git a/official/c73289035.lua b/official/c73289035.lua index 5dc2a6e6b2..96f5b217cd 100644 --- a/official/c73289035.lua +++ b/official/c73289035.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c73347079.lua b/official/c73347079.lua index d851a4c152..509913f7a2 100644 --- a/official/c73347079.lua +++ b/official/c73347079.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.adval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_WINGEDBEAST),c:GetControler(),LOCATION_MZONE,0,c)*500 @@ -44,4 +44,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c73445448.lua b/official/c73445448.lua index 30c7957d1d..6654992832 100644 --- a/official/c73445448.lua +++ b/official/c73445448.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=22 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -68,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c73659078.lua b/official/c73659078.lua index 307cf9dd50..8ad13394d7 100644 --- a/official/c73659078.lua +++ b/official/c73659078.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.countertg) e1:SetOperation(s.counterop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Non-WATER monsters lose 200 ATK for each Ice Counter on the field local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -50,4 +50,4 @@ function s.counterop(e,tp,eg,ep,ev,re,r,rp) tc=g:Select(tp,1,1,nil):GetFirst() tc:AddCounter(0x1015,1) end -end \ No newline at end of file +end diff --git a/official/c73887236.lua b/official/c73887236.lua index aaea9da5ea..51cd95d9bc 100644 --- a/official/c73887236.lua +++ b/official/c73887236.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkfilter(e,c) return c:IsSpecialSummoned() @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c73964868.lua b/official/c73964868.lua index d9952e7f7e..e4a6c07e1d 100644 --- a/official/c73964868.lua +++ b/official/c73964868.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c74294676.lua b/official/c74294676.lua index e630b27e30..fbc107abef 100644 --- a/official/c74294676.lua +++ b/official/c74294676.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate Normal Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,12 +29,12 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Negate Special Summon local e3=e2:Clone() e3:SetDescription(aux.Stringid(id,2)) e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.condition1(e,tp,eg,ep,ev,re,r,rp) @@ -65,4 +65,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c74371660.lua b/official/c74371660.lua index aa995ed37f..ed204b91e3 100644 --- a/official/c74371660.lua +++ b/official/c74371660.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.dscon(e) return e:GetHandler():GetOverlayCount()~=0 @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) Duel.NegateRelatedChain(tc,RESET_TURN_SET) end -end \ No newline at end of file +end diff --git a/official/c74416224.lua b/official/c74416224.lua index 5f402ba261..b5fbf9531f 100644 --- a/official/c74416224.lua +++ b/official/c74416224.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c74593218.lua b/official/c74593218.lua index 85a0531fe9..d924c4a6d6 100644 --- a/official/c74593218.lua +++ b/official/c74593218.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) @@ -46,4 +46,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c75083197.lua b/official/c75083197.lua index d350b04ec9..34a5bba8b7 100644 --- a/official/c75083197.lua +++ b/official/c75083197.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={id} --Filter for cards summoned from GY @@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c75253697.lua b/official/c75253697.lua index dc8620c56a..33dbb90a24 100644 --- a/official/c75253697.lua +++ b/official/c75253697.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=72 function s.dfilter(c,pos) @@ -46,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(HALF_DAMAGE) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c75367227.lua b/official/c75367227.lua index 5ff8096065..cd9ea59756 100644 --- a/official/c75367227.lua +++ b/official/c75367227.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) -- local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND) @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c75402014.lua b/official/c75402014.lua index e04799ceda..dc886e4591 100644 --- a/official/c75402014.lua +++ b/official/c75402014.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_ZW} s.xyz_number=39 @@ -112,4 +112,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/official/c75433814.lua b/official/c75433814.lua index 7cbf22ca2b..1be391620e 100644 --- a/official/c75433814.lua +++ b/official/c75433814.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy monsters with String counters and burn 500 for each local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -55,4 +55,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c75574498.lua b/official/c75574498.lua index debd577791..c892cfddfb 100644 --- a/official/c75574498.lua +++ b/official/c75574498.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_names={81587028} --"Box of Friends" function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -89,4 +89,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c75620895.lua b/official/c75620895.lua index 2e5f33665a..6c96dcd85f 100644 --- a/official/c75620895.lua +++ b/official/c75620895.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) c:CopyEffect(code,RESET_EVENT|RESETS_STANDARD,1) end -end \ No newline at end of file +end diff --git a/official/c75797046.lua b/official/c75797046.lua index 07c90db3f7..15d1cd64d5 100644 --- a/official/c75797046.lua +++ b/official/c75797046.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_BUTTERSPY} function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,4 +35,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,ct1*300,REASON_EFFECT,true) Duel.Damage(1-tp,ct2*300,REASON_EFFECT,true) Duel.RDComplete() -end \ No newline at end of file +end diff --git a/official/c75840616.lua b/official/c75840616.lua index eb1a9e4aa9..d70bd5f0a0 100644 --- a/official/c75840616.lua +++ b/official/c75840616.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --attack all local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) aux.ToHandOrElse(g:GetFirst(),tp) -end \ No newline at end of file +end diff --git a/official/c7593748.lua b/official/c7593748.lua index 490debf65b..8c040f0f82 100644 --- a/official/c7593748.lua +++ b/official/c7593748.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --level local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -89,4 +89,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c76067258.lua b/official/c76067258.lua index bf2cdd90d8..53b58eaf41 100644 --- a/official/c76067258.lua +++ b/official/c76067258.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --desrep local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -68,4 +68,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c7628844.lua b/official/c7628844.lua index 2cc0f3d7f4..1da1501404 100644 --- a/official/c7628844.lua +++ b/official/c7628844.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --This card can make a second attack during each Battle Phase local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -78,4 +78,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c76290637.lua b/official/c76290637.lua index 9e4575e99d..bfe1f65d2d 100644 --- a/official/c76290637.lua +++ b/official/c76290637.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card from your GY to either field in Defense Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -97,4 +97,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end \ No newline at end of file +end diff --git a/official/c76372778.lua b/official/c76372778.lua index 0b6cbacc0d..0a5fe7caed 100644 --- a/official/c76372778.lua +++ b/official/c76372778.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,4 +41,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c76419637.lua b/official/c76419637.lua index 9fffb55ebc..1e638e2498 100644 --- a/official/c76419637.lua +++ b/official/c76419637.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={40424929} function s.dccon(e,tp,eg,ep,ev,re,r,rp) @@ -57,4 +57,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD,LOCATION_ONFIELD) Duel.Damage(p,ct*300,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c76589815.lua b/official/c76589815.lua index 8a211902a1..4b70d4cc03 100644 --- a/official/c76589815.lua +++ b/official/c76589815.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(2)) e3:SetTarget(s.cftg) e3:SetOperation(s.cfop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_BATTLIN_BOXER} function s.atfilter(c) @@ -63,4 +63,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) end end Duel.ShuffleHand(1-tp) -end \ No newline at end of file +end diff --git a/official/c770365.lua b/official/c770365.lua index ef2084ffd3..c3446ad9f9 100644 --- a/official/c770365.lua +++ b/official/c770365.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_SPELLBOOK} function s.atkval(e,c) @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() end Duel.SortDecktop(tp,tp,5) -end \ No newline at end of file +end diff --git a/official/c77205367.lua b/official/c77205367.lua index 6ad258b2ed..8606ca2ca0 100644 --- a/official/c77205367.lua +++ b/official/c77205367.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=96 s.listed_names={55727845} @@ -65,4 +65,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c77571454.lua b/official/c77571454.lua index cd1cffe2e5..a66d0cd89c 100644 --- a/official/c77571454.lua +++ b/official/c77571454.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.namechangetg) e3:SetOperation(s.namechangeop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Negate the activated effects of "Unknown" your opponent controls local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -69,4 +69,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end end -end \ No newline at end of file +end diff --git a/official/c77799846.lua b/official/c77799846.lua index 526aae1559..2975224464 100644 --- a/official/c77799846.lua +++ b/official/c77799846.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,mg) end end -end \ No newline at end of file +end diff --git a/official/c78135071.lua b/official/c78135071.lua index 2af87057fd..6154ed14be 100644 --- a/official/c78135071.lua +++ b/official/c78135071.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c78144171.lua b/official/c78144171.lua index d84d254498..7bb23c31a0 100644 --- a/official/c78144171.lua +++ b/official/c78144171.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.ovfilter(c,tp,lc) return c:IsFaceup() and c:IsRace(RACE_DRAGON,lc,SUMMON_TYPE_XYZ,tp) and c:IsAttribute(ATTRIBUTE_DARK,lc,SUMMON_TYPE_XYZ,tp) and c:IsLevelAbove(5) diff --git a/official/c78625448.lua b/official/c78625448.lua index 1274d9537a..99b96894f0 100644 --- a/official/c78625448.lua +++ b/official/c78625448.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMERON} s.xyz_number=3 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c79559912.lua b/official/c79559912.lua index 8290d1f607..95b92cde60 100644 --- a/official/c79559912.lua +++ b/official/c79559912.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Search 1 "Dark Contract" card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c79625003.lua b/official/c79625003.lua index 77e60086e6..67b2387c35 100644 --- a/official/c79625003.lua +++ b/official/c79625003.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Special Summon this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -76,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c80117527.lua b/official/c80117527.lua index b57d7dcff2..c1a47c4a40 100644 --- a/official/c80117527.lua +++ b/official/c80117527.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=11 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end \ No newline at end of file +end diff --git a/official/c80764541.lua b/official/c80764541.lua index 898fa8adf7..a2fe077231 100644 --- a/official/c80764541.lua +++ b/official/c80764541.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=44 function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -38,4 +38,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c80796456.lua b/official/c80796456.lua index d7a66ccbde..b07e8bfcc7 100644 --- a/official/c80796456.lua +++ b/official/c80796456.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atkup local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c80993256.lua b/official/c80993256.lua index 31e7494a76..11fd217fc3 100644 --- a/official/c80993256.lua +++ b/official/c80993256.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.matkval(e,c) local oc=e:GetHandler():GetOverlayCount() diff --git a/official/c81122844.lua b/official/c81122844.lua index a5ae8638b7..0bae9ce3d6 100644 --- a/official/c81122844.lua +++ b/official/c81122844.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --salvage local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_WIND_UP} function s.spfilter(c,e,tp) @@ -68,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c8165596.lua b/official/c8165596.lua index 8ca63e30e8..20ac7fcbf7 100644 --- a/official/c8165596.lua +++ b/official/c8165596.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,function(e,og) e:SetLabel(og:GetFirst():IsSetCard(SET_GALAXY) and 1 or 0) end)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Take 1 "Photon" or "Galaxy" card from your Deck, and either add it to your hand or attach it to this card as material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) diff --git a/official/c81927732.lua b/official/c81927732.lua index 312d3dc8ec..8cd9d236a5 100644 --- a/official/c81927732.lua +++ b/official/c81927732.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk/def local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) @@ -92,4 +92,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c82308875.lua b/official/c82308875.lua index 9c88e3c42f..19fde79c32 100644 --- a/official/c82308875.lua +++ b/official/c82308875.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.roll_dice=true s.xyz_number=7 @@ -72,4 +72,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD) end -end \ No newline at end of file +end diff --git a/official/c82633039.lua b/official/c82633039.lua index 54b8fad727..eeaf10b152 100644 --- a/official/c82633039.lua +++ b/official/c82633039.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Shuffle 1 face-up card into the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.setfilter(c) return c:IsFaceup() and c:IsCanTurnSet() @@ -62,4 +62,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c82697249.lua b/official/c82697249.lua index 48f872c583..750bc0440c 100644 --- a/official/c82697249.lua +++ b/official/c82697249.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=59 function s.imcon(e) @@ -58,4 +58,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c82944432.lua b/official/c82944432.lua index 23c5c0a5b5..6a8a35ce67 100644 --- a/official/c82944432.lua +++ b/official/c82944432.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_NINJA} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c83531441.lua b/official/c83531441.lua index ca8cdac92a..6cd6496569 100644 --- a/official/c83531441.lua +++ b/official/c83531441.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -91,4 +91,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c83827392.lua b/official/c83827392.lua index 768f11bcff..820c22fd59 100644 --- a/official/c83827392.lua +++ b/official/c83827392.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) @@ -56,4 +56,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c84013237.lua b/official/c84013237.lua index b6c288d8c1..f4d72a6843 100644 --- a/official/c84013237.lua +++ b/official/c84013237.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(function() Duel.NegateAttack() end) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Self destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -39,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c84025439.lua b/official/c84025439.lua index b8e60ffe61..77e80d7e98 100644 --- a/official/c84025439.lua +++ b/official/c84025439.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Unaffected by other effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -99,4 +99,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c84124261.lua b/official/c84124261.lua index e8b2c7207f..c963f5067e 100644 --- a/official/c84124261.lua +++ b/official/c84124261.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=39 function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +33,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c84224627.lua b/official/c84224627.lua index 6bdc72f2cf..82b0fa76dd 100644 --- a/official/c84224627.lua +++ b/official/c84224627.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) @@ -56,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(tc:GetBaseDefense()*2) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c84401683.lua b/official/c84401683.lua index c439d394d1..e1dfb0a8c2 100644 --- a/official/c84401683.lua +++ b/official/c84401683.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c84417082.lua b/official/c84417082.lua index 46abe584d7..5776d72154 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost1) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy2 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(s.cost2) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=91 function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk) @@ -56,4 +56,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c8491961.lua b/official/c8491961.lua index 84a7137642..578021fe27 100644 --- a/official/c8491961.lua +++ b/official/c8491961.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsXyzSummoned() and e:GetHandler():GetOverlayCount()>0 @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c85004150.lua b/official/c85004150.lua index 10125e445e..99f5a89772 100644 --- a/official/c85004150.lua +++ b/official/c85004150.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) -- local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -48,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=g:GetMaxGroup(Card.GetDefense) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c85115440.lua b/official/c85115440.lua index 3d2ea8485e..992b60f1b6 100644 --- a/official/c85115440.lua +++ b/official/c85115440.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) @@ -67,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c85121942.lua b/official/c85121942.lua index 33ac6e8bfb..7bcefe4b00 100644 --- a/official/c85121942.lua +++ b/official/c85121942.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=105 s.listed_names={59627393} @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c85252081.lua b/official/c85252081.lua index 0b9f356ef7..4c7f4ba505 100644 --- a/official/c85252081.lua +++ b/official/c85252081.lua @@ -23,14 +23,14 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --This is a Quick effect if this card has "Super Quantum Blue Layer" as Xyz Material local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e3:SetCondition(s.quickeffcond) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Attach 1 "Super Quantum" monster from your hand or field to this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -76,4 +76,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c85692042.lua b/official/c85692042.lua index 4a8a1fbee3..37b4d925af 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,4)) @@ -142,4 +142,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c85747929.lua b/official/c85747929.lua index 28a6608cd7..9a08d5cd38 100644 --- a/official/c85747929.lua +++ b/official/c85747929.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Change levels to 4 or 8 local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -110,4 +110,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c8617563.lua b/official/c8617563.lua index f17f2ae311..f4c13da07f 100644 --- a/official/c8617563.lua +++ b/official/c8617563.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Search 1 "Rank-Up-Magic" Spell if it has a Winged Beast monster attached local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --A "Raidraptor" Xyz Monster that has this card as material gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_XMATERIAL) @@ -66,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c86221741.lua b/official/c86221741.lua index b2c08d0acd..f547839850 100644 --- a/official/c86221741.lua +++ b/official/c86221741.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Minus 1000 ATK for opp cards, optionally inflict damage local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -79,4 +79,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) else Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c86238081.lua b/official/c86238081.lua index b784f96cb9..618a9a0115 100644 --- a/official/c86238081.lua +++ b/official/c86238081.lua @@ -49,7 +49,7 @@ function s.initial_effect(c) e5:SetCost(Cost.Detach(1)) e5:SetTarget(s.destg) e5:SetOperation(s.desop) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) --Place itself into pendulum zone local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(id,2)) @@ -128,4 +128,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c86331741.lua b/official/c86331741.lua index 6cdf61c29d..a526d244fb 100644 --- a/official/c86331741.lua +++ b/official/c86331741.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Xyz Material local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -96,4 +96,4 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c86532744.lua b/official/c86532744.lua index 55b7d965c0..ff52d9499b 100644 --- a/official/c86532744.lua +++ b/official/c86532744.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=39 s.listed_names={84013237} --Number 39: Utopia @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(1-tp,ct*300,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c86848580.lua b/official/c86848580.lua index a64ac774f0..0c1aa61178 100644 --- a/official/c86848580.lua +++ b/official/c86848580.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end @@ -54,4 +54,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY,2) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c87327776.lua b/official/c87327776.lua index 6ed6c41581..1de8b23ef5 100644 --- a/official/c87327776.lua +++ b/official/c87327776.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return 1 monster on the field to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c87676171.lua b/official/c87676171.lua index d725c84cc2..4e633f536c 100644 --- a/official/c87676171.lua +++ b/official/c87676171.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_CRYSTAL_GOD_TISTINA) end) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon 1 "Tistina" monster from the GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c87911394.lua b/official/c87911394.lua index 8ab6016d70..32daba6455 100644 --- a/official/c87911394.lua +++ b/official/c87911394.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_UTOPIA} s.xyz_number=39 @@ -69,4 +69,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/official/c88021907.lua b/official/c88021907.lua index e335ab044b..b75c7966e6 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.tg) e1:SetOperation(s.op) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destruction replacement for "Mathmech" cards local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -138,4 +138,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end \ No newline at end of file +end diff --git a/official/c88120966.lua b/official/c88120966.lua index 55a8ce5de0..718d19a3d7 100644 --- a/official/c88120966.lua +++ b/official/c88120966.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=15 function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c88177324.lua b/official/c88177324.lua index b0099b3493..5819bcf6b2 100644 --- a/official/c88177324.lua +++ b/official/c88177324.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Can gain ATK and make a second attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -106,4 +106,4 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(1) e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e2) -end \ No newline at end of file +end diff --git a/official/c88581108.lua b/official/c88581108.lua index a7130c029c..e98fee6e70 100644 --- a/official/c88581108.lua +++ b/official/c88581108.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --"True Draco" and "True King" opponent destruction flag local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -68,4 +68,4 @@ function s.aclimit(e,re,tp) end function s.atktarget(e,c) return c:IsAttribute(e:GetLabel()) -end \ No newline at end of file +end diff --git a/official/c88722973.lua b/official/c88722973.lua index 026e35be63..d0192d8e8f 100644 --- a/official/c88722973.lua +++ b/official/c88722973.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_DRACOSLAYER} function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c88754763.lua b/official/c88754763.lua index 5be903838e..62ef332f53 100644 --- a/official/c88754763.lua +++ b/official/c88754763.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end \ No newline at end of file +end diff --git a/official/c88917691.lua b/official/c88917691.lua index e13b48b91c..44b55ffc27 100644 --- a/official/c88917691.lua +++ b/official/c88917691.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --A "Utopic Future" Xyz Monster that has this card as material gains this effect. --● If it is Xyz Summoned: Activate this effect; it can make a second attack during each Battle Phase this turn. local e2=Effect.CreateEffect(c) @@ -61,4 +61,4 @@ function s.secondattackop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c88942504.lua b/official/c88942504.lua index 5a0e67895c..27bfa26134 100644 --- a/official/c88942504.lua +++ b/official/c88942504.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_DJINN} function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c89477759.lua b/official/c89477759.lua index b46d2df2e7..4775600421 100644 --- a/official/c89477759.lua +++ b/official/c89477759.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Destroy and Special Summon (Battle Phase) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,0x53b,tp,tp,false,false,POS_FACEUP)>0 and e:GetHandler():IsRelateToEffect(e) then Duel.Overlay(tc,e:GetHandler()) end -end \ No newline at end of file +end diff --git a/official/c89516305.lua b/official/c89516305.lua index a1b8f864a9..212cdf1fd9 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.sttg) e1:SetOperation(s.stop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --turn set local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.settg) e2:SetOperation(s.setop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --atkup local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -42,7 +42,7 @@ function s.initial_effect(c) e3:SetCost(s.cost) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.xyz_number=87 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -108,4 +108,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c89642993.lua b/official/c89642993.lua index ec07df051e..65de697f5e 100644 --- a/official/c89642993.lua +++ b/official/c89642993.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eftg) e1:SetOperation(s.efop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=63 function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -44,4 +44,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c90098780.lua b/official/c90098780.lua index d70baf525a..e61ad2b3a8 100644 --- a/official/c90098780.lua +++ b/official/c90098780.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_DJINN} function s.filter(c,e,tp) @@ -68,4 +68,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c90162951.lua b/official/c90162951.lua index 12840437de..de98910ce5 100644 --- a/official/c90162951.lua +++ b/official/c90162951.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Register flag in order to avoid some loops with certain anime cards local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) @@ -68,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,c:GetAttack()) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c90664857.lua b/official/c90664857.lua index ed66ee57d5..172ca85946 100644 --- a/official/c90664857.lua +++ b/official/c90664857.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.indtg) e1:SetOperation(s.indop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Banish a battled monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) diff --git a/official/c90726340.lua b/official/c90726340.lua index cc379f315e..c9fbfcae2c 100644 --- a/official/c90726340.lua +++ b/official/c90726340.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indtg(e,c) return c:IsRace(RACE_DRAGON) and c:GetCode()~=id @@ -66,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c90809975.lua b/official/c90809975.lua index a48eb02319..ca5d5a804b 100644 --- a/official/c90809975.lua +++ b/official/c90809975.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Negate activation local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -125,4 +125,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c91279700.lua b/official/c91279700.lua index 07fac66b00..3316e53021 100644 --- a/official/c91279700.lua +++ b/official/c91279700.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_INFESTATION,SET_LSWARM} function s.dscon(e) @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c91499077.lua b/official/c91499077.lua index da3ceffd5c..8398a832a2 100644 --- a/official/c91499077.lua +++ b/official/c91499077.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --When your monster is targeted for attack, change the attack target to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -67,4 +67,4 @@ function s.cbop(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(at,c) end end -end \ No newline at end of file +end diff --git a/official/c9161357.lua b/official/c9161357.lua index 57aec67ad0..46751d96c7 100644 --- a/official/c9161357.lua +++ b/official/c9161357.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(s.lpcost) e2:SetOperation(s.lpop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=6 @@ -96,4 +96,4 @@ function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end \ No newline at end of file +end diff --git a/official/c91895091.lua b/official/c91895091.lua index 1130ea831a..9f57188177 100644 --- a/official/c91895091.lua +++ b/official/c91895091.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c92661479.lua b/official/c92661479.lua index a279fa791d..e13fc122bf 100644 --- a/official/c92661479.lua +++ b/official/c92661479.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c9272381.lua b/official/c9272381.lua index e4ce7627a2..c82ca739f2 100644 --- a/official/c9272381.lua +++ b/official/c9272381.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.target) e4:SetOperation(s.operation) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) diff --git a/official/c92918648.lua b/official/c92918648.lua index fcc06f657e..c797f9ef8e 100644 --- a/official/c92918648.lua +++ b/official/c92918648.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_series={SET_SPELLBOOK} function s.cfilter(c) @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c93039339.lua b/official/c93039339.lua index b12050ac8f..93ad6a1efe 100644 --- a/official/c93039339.lua +++ b/official/c93039339.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Register Special Summons from the Extra Deck aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g,true) Duel.SendtoHand(g,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c93568288.lua b/official/c93568288.lua index b307cb05c9..aca9914d3b 100644 --- a/official/c93568288.lua +++ b/official/c93568288.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=80 function s.filter(c) @@ -82,4 +82,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c93713837.lua b/official/c93713837.lua index c434818ad2..f5fa5dc37f 100644 --- a/official/c93713837.lua +++ b/official/c93713837.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -87,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c93730230.lua b/official/c93730230.lua index df496c2044..6b79c37db0 100644 --- a/official/c93730230.lua +++ b/official/c93730230.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/official/c94119480.lua b/official/c94119480.lua index f4c1383203..21e0c81dde 100644 --- a/official/c94119480.lua +++ b/official/c94119480.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -30,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c94151981.lua b/official/c94151981.lua index 28480485b9..b3a80fe629 100644 --- a/official/c94151981.lua +++ b/official/c94151981.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.drwtg) e2:SetOperation(s.drwop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Your opponent cannot activate cards or effects if the equipped monster battles local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -73,4 +73,4 @@ end function s.btlcond(e) local ec=e:GetHandler():GetEquipTarget() return ec and (Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec) -end \ No newline at end of file +end diff --git a/official/c94380860.lua b/official/c94380860.lua index 92cfe1824f..9ea801efad 100644 --- a/official/c94380860.lua +++ b/official/c94380860.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.xyz_number=103 function s.filter(c,e) @@ -48,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c9453320.lua b/official/c9453320.lua index 4017f958aa..2fb261aab7 100644 --- a/official/c9453320.lua +++ b/official/c9453320.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.settg) e4:SetOperation(s.setop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_ABYSS} function s.spfilter(c,e,tp) diff --git a/official/c9486959.lua b/official/c9486959.lua index 662c9cc370..9a461c7ffd 100644 --- a/official/c9486959.lua +++ b/official/c9486959.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Return to the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -90,4 +90,4 @@ function s.matpreop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetOverlayGroup() g:KeepAlive() e:GetLabelObject():SetLabelObject(g) -end \ No newline at end of file +end diff --git a/official/c95113856.lua b/official/c95113856.lua index aebb59c63c..70f5c27ea9 100644 --- a/official/c95113856.lua +++ b/official/c95113856.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,1,nil) end @@ -68,4 +68,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c95134948.lua b/official/c95134948.lua index be9f4c8ed2..051c3da207 100644 --- a/official/c95134948.lua +++ b/official/c95134948.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --disable attack local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -123,4 +123,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(0) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c95169481.lua b/official/c95169481.lua index 5015fdf9fa..4b074e5f68 100644 --- a/official/c95169481.lua +++ b/official/c95169481.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.desfilter(c) return c:IsFaceup() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) @@ -35,4 +35,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c95239444.lua b/official/c95239444.lua index bdf00b2efd..9b41737b0a 100644 --- a/official/c95239444.lua +++ b/official/c95239444.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.cfilter(c,lv) return c:IsRace(RACE_PLANT) and c:IsLevelBelow(lv) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() @@ -78,4 +78,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(mg:GetFirst(),1) end end -end \ No newline at end of file +end diff --git a/official/c95243515.lua b/official/c95243515.lua index db54f8ace1..00fba92d06 100644 --- a/official/c95243515.lua +++ b/official/c95243515.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Can attack directly local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) diff --git a/official/c95442074.lua b/official/c95442074.lua index 0ec57a4de7..e5a9e22686 100644 --- a/official/c95442074.lua +++ b/official/c95442074.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --cannot be destroyed local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ end function s.refcon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and Duel.GetAttackTarget()==e:GetHandler() -end \ No newline at end of file +end diff --git a/official/c95474755.lua b/official/c95474755.lua index 079e3a0b77..7b0b1bbd95 100644 --- a/official/c95474755.lua +++ b/official/c95474755.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.extg) e1:SetOperation(s.exop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Banish 1 card from the opponent's GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -100,4 +100,4 @@ function s.dkop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetDecktopGroup(1-tp,ct) Duel.DisableShuffleCheck() Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c95685352.lua b/official/c95685352.lua index a8fff2952f..8654fbb7a4 100644 --- a/official/c95685352.lua +++ b/official/c95685352.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.atkop2) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --place in pendulum zone local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -97,4 +97,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c95992081.lua b/official/c95992081.lua index 4258cfa505..038840eaf7 100644 --- a/official/c95992081.lua +++ b/official/c95992081.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c96157835.lua b/official/c96157835.lua index 67d010030e..478bc09877 100644 --- a/official/c96157835.lua +++ b/official/c96157835.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --extra attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -81,4 +81,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,c) end end -end \ No newline at end of file +end diff --git a/official/c96471335.lua b/official/c96471335.lua index 2191a8511c..ffbe960a58 100644 --- a/official/c96471335.lua +++ b/official/c96471335.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --remove local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -65,4 +65,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c96592102.lua b/official/c96592102.lua index 72c3b1c064..3556ab5950 100644 --- a/official/c96592102.lua +++ b/official/c96592102.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 and e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ @@ -61,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g,true) Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c96864105.lua b/official/c96864105.lua index afead73d09..f3240611a8 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --indes local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -54,4 +54,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) -end \ No newline at end of file +end diff --git a/official/c97170107.lua b/official/c97170107.lua index 725184b480..8d62bc98c5 100644 --- a/official/c97170107.lua +++ b/official/c97170107.lua @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SUMMON_SUCCESS) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsControler(1-tp) and c:GetAttack()>0 and (not e or c:IsRelateToEffect(e)) @@ -38,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c97403510.lua b/official/c97403510.lua index de3e00d351..acc2df16ee 100644 --- a/official/c97403510.lua +++ b/official/c97403510.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) @@ -109,4 +109,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c97453744.lua b/official/c97453744.lua index 085b4b121c..9f75a0910b 100644 --- a/official/c97453744.lua +++ b/official/c97453744.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end --Cannot target other monsters for attacks function s.tgtg(e,c) @@ -103,4 +103,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c97584719.lua b/official/c97584719.lua index f044176e18..e2a44e389c 100644 --- a/official/c97584719.lua +++ b/official/c97584719.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetMatchingGroupCount(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Special Summon this card from the GY in Defense Position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end \ No newline at end of file +end diff --git a/official/c99469936.lua b/official/c99469936.lua index 99aa1a329d..13523ca136 100644 --- a/official/c99469936.lua +++ b/official/c99469936.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:GetRank()==5 and c:IsAttribute(ATTRIBUTE_WATER,xyzc,SUMMON_TYPE_XYZ,tp) @@ -66,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c99666430.lua b/official/c99666430.lua index 27856fbbe5..2d09ce4d0c 100644 --- a/official/c99666430.lua +++ b/official/c99666430.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ctrltg) e1:SetOperation(s.ctrlop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Tribute 1 monster, and if you do, destroy 1 face-up card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -70,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua index 1c2bff4300..8536d879a2 100644 --- a/pre-release/c101302106.lua +++ b/pre-release/c101302106.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --A targeted "D/D" Effect Monster gains an effect until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -82,4 +82,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c100000178.lua b/unofficial/c100000178.lua index 876d104f48..15415cad73 100644 --- a/unofficial/c100000178.lua +++ b/unofficial/c100000178.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -27,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(800) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e:GetHandler():RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/unofficial/c100000179.lua b/unofficial/c100000179.lua index eff49a1dc8..782e9f33e8 100644 --- a/unofficial/c100000179.lua +++ b/unofficial/c100000179.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e:GetHandler():RegisterEffect(e2) -end \ No newline at end of file +end diff --git a/unofficial/c100000498.lua b/unofficial/c100000498.lua index b0f36c3acb..5c7d3b947a 100644 --- a/unofficial/c100000498.lua +++ b/unofficial/c100000498.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.negcost) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) @@ -40,4 +40,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then Duel.BreakEffect() end -end \ No newline at end of file +end diff --git a/unofficial/c100000549.lua b/unofficial/c100000549.lua index 4aaea8e51f..1ba619107c 100644 --- a/unofficial/c100000549.lua +++ b/unofficial/c100000549.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c111011803.lua b/unofficial/c111011803.lua index 80961c2f93..4d792ea0d7 100644 --- a/unofficial/c111011803.lua +++ b/unofficial/c111011803.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -34,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:SetStatus(STATUS_SET_TURN,false) end end -end \ No newline at end of file +end diff --git a/unofficial/c111011903.lua b/unofficial/c111011903.lua index efea63fb84..64947ed03b 100644 --- a/unofficial/c111011903.lua +++ b/unofficial/c111011903.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c111011904.lua b/unofficial/c111011904.lua index a6f4d18af5..ab78cf1601 100644 --- a/unofficial/c111011904.lua +++ b/unofficial/c111011904.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.actg) e2:SetOperation(s.acop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.thfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() @@ -165,4 +165,4 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp,chk) end end end -end \ No newline at end of file +end diff --git a/unofficial/c111011905.lua b/unofficial/c111011905.lua index 391033798b..8d2bf1573f 100644 --- a/unofficial/c111011905.lua +++ b/unofficial/c111011905.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dg=g:Select(1-tp,ct,ct,nil) Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511000034.lua b/unofficial/c511000034.lua index 49f96a1621..c7e4963279 100644 --- a/unofficial/c511000034.lua +++ b/unofficial/c511000034.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCondition(s.condition) e2:SetCost(s.cost) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.atktg(e,c) return c==e:GetHandler():GetBattleTarget() @@ -69,4 +69,4 @@ end function s.baseval(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler():GetBattleTarget() return c:GetBaseAttack() -end \ No newline at end of file +end diff --git a/unofficial/c511000041.lua b/unofficial/c511000041.lua index 9ac2c0070b..743b3f6337 100644 --- a/unofficial/c511000041.lua +++ b/unofficial/c511000041.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.catg) e2:SetOperation(s.caop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,4 +54,4 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChainAttack(tc) end -end \ No newline at end of file +end diff --git a/unofficial/c511000183.lua b/unofficial/c511000183.lua index 601253ca49..8a770685d6 100644 --- a/unofficial/c511000183.lua +++ b/unofficial/c511000183.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --battle indestructable local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) @@ -79,4 +79,4 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end \ No newline at end of file +end diff --git a/unofficial/c511000184.lua b/unofficial/c511000184.lua index 3d6da9ea34..4a685b935d 100644 --- a/unofficial/c511000184.lua +++ b/unofficial/c511000184.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.tbcon) e1:SetCost(s.tbcost) e1:SetOperation(s.tbop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -69,4 +69,4 @@ function s.dfilter(c,atk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511000192.lua b/unofficial/c511000192.lua index c61e684889..2d17cd110c 100644 --- a/unofficial/c511000192.lua +++ b/unofficial/c511000192.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetCountLimit(1) e4:SetCost(s.cost) e4:SetOperation(s.op2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Prevent Effect damage local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(20450925,0)) @@ -51,7 +51,7 @@ function s.initial_effect(c) e5:SetCountLimit(1) e5:SetCost(s.cost) e5:SetOperation(s.op3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.xyz_number=0 function s.xyzfilter(c,xyz,sumtype,tp) @@ -104,4 +104,4 @@ function s.damval(e,re,val,r,rp,rc) else return val end -end \ No newline at end of file +end diff --git a/unofficial/c511000230.lua b/unofficial/c511000230.lua index 8695cf0778..50fdca17b9 100644 --- a/unofficial/c511000230.lua +++ b/unofficial/c511000230.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000231.lua b/unofficial/c511000231.lua index c0b60518c1..2581ae73c3 100644 --- a/unofficial/c511000231.lua +++ b/unofficial/c511000231.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000232.lua b/unofficial/c511000232.lua index 9ea5bb9c53..e86efdd636 100644 --- a/unofficial/c511000232.lua +++ b/unofficial/c511000232.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000233.lua b/unofficial/c511000233.lua index 0e136fcf1b..ab8fb3afb9 100644 --- a/unofficial/c511000233.lua +++ b/unofficial/c511000233.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511000277.lua b/unofficial/c511000277.lua index c4f8476f1e..f7e1e41bc2 100644 --- a/unofficial/c511000277.lua +++ b/unofficial/c511000277.lua @@ -98,7 +98,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.damop) e1:SetLabel(e:GetLabel()) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) end end @@ -114,4 +114,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511000294.lua b/unofficial/c511000294.lua index 5e6fe90250..ac6304cfc4 100644 --- a/unofficial/c511000294.lua +++ b/unofficial/c511000294.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetCost(s.descost) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Destroy and Special Summon (Battle Phase) local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) @@ -143,4 +143,4 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp) g=g:Select(tp,ft,ft,nil) end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end \ No newline at end of file +end diff --git a/unofficial/c511000296.lua b/unofficial/c511000296.lua index fd9de74524..21d0ddca9b 100644 --- a/unofficial/c511000296.lua +++ b/unofficial/c511000296.lua @@ -61,7 +61,7 @@ function s.initial_effect(c) e7:SetCost(s.nacost) e7:SetTarget(s.natg) e7:SetOperation(s.naop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) --number generic effect local e8=Effect.CreateEffect(c) e8:SetType(EFFECT_TYPE_SINGLE) @@ -136,4 +136,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then Duel.Recover(tp,Duel.GetAttacker():GetAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511000369.lua b/unofficial/c511000369.lua index a1e28861a0..d86f693aeb 100644 --- a/unofficial/c511000369.lua +++ b/unofficial/c511000369.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.regop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Cannot be destroyed by battle local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) @@ -184,4 +184,4 @@ function s.stcheck(e,tp,eg,ep,ev,re,r,rp) tc=g:GetNext() end end -end \ No newline at end of file +end diff --git a/unofficial/c511000512.lua b/unofficial/c511000512.lua index a64dbe176d..92a5be8d02 100644 --- a/unofficial/c511000512.lua +++ b/unofficial/c511000512.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511000513.lua b/unofficial/c511000513.lua index 0b9fd3eaf2..2c070450f2 100644 --- a/unofficial/c511000513.lua +++ b/unofficial/c511000513.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.desatchtg) e2:SetOperation(s.desatchop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --If this card would be banished, you can detach 1 material from this card instead local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -55,4 +55,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_COST) return true else return false end -end \ No newline at end of file +end diff --git a/unofficial/c511000515.lua b/unofficial/c511000515.lua index e289a2e9cc..a14c92ef50 100644 --- a/unofficial/c511000515.lua +++ b/unofficial/c511000515.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCondition(s.atcon) e3:SetCost(s.atcost) e3:SetOperation(s.atop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --remove local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) @@ -122,4 +122,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511000674.lua b/unofficial/c511000674.lua index 2ebcb10001..6e639b13f2 100644 --- a/unofficial/c511000674.lua +++ b/unofficial/c511000674.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetCost(s.cost) e4:SetTarget(s.target) e4:SetOperation(s.operation) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end function s.bttg(e,c) return not c:IsSpecialSummoned() @@ -60,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) e:GetHandler():RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511000675.lua b/unofficial/c511000675.lua index 8b32cacad9..5a27bc578d 100644 --- a/unofficial/c511000675.lua +++ b/unofficial/c511000675.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkfilter(c) return c:IsLevelAbove(5) and c:HasNonZeroAttack() @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/unofficial/c511001247.lua b/unofficial/c511001247.lua index e6ab665c66..5ed3e62872 100644 --- a/unofficial/c511001247.lua +++ b/unofficial/c511001247.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -34,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511001273.lua b/unofficial/c511001273.lua index 5f716870c2..cfb7ff2135 100644 --- a/unofficial/c511001273.lua +++ b/unofficial/c511001273.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to grave local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -143,4 +143,4 @@ function s.numspop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511001275.lua b/unofficial/c511001275.lua index 50b8e107de..33b6a7d6bb 100644 --- a/unofficial/c511001275.lua +++ b/unofficial/c511001275.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCondition(s.con) e3:SetCost(s.cost) e3:SetOperation(s.op) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --gain atk local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) @@ -150,4 +150,4 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511001338.lua b/unofficial/c511001338.lua index 674d2c3443..1e29a53212 100644 --- a/unofficial/c511001338.lua +++ b/unofficial/c511001338.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(s.descost) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --battle indestructable local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) @@ -102,4 +102,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511001339.lua b/unofficial/c511001339.lua index ae4969f7d3..619aba5692 100644 --- a/unofficial/c511001339.lua +++ b/unofficial/c511001339.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle, expect with "Number" monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -82,4 +82,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e) return e:GetHandler():GetCounter(0x1101)>0 -end \ No newline at end of file +end diff --git a/unofficial/c511001371.lua b/unofficial/c511001371.lua index 1008150b6c..7f7c0e9aec 100644 --- a/unofficial/c511001371.lua +++ b/unofficial/c511001371.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_RANKUP_EFFECT) e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) c:RegisterEffect(e6) @@ -96,4 +96,4 @@ 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 +end diff --git a/unofficial/c511001372.lua b/unofficial/c511001372.lua index eccd10d66e..394ae48ee9 100644 --- a/unofficial/c511001372.lua +++ b/unofficial/c511001372.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_RANKUP_EFFECT) e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) c:RegisterEffect(e6) @@ -71,4 +71,4 @@ function s.winop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetOverlayCount()==0 then Duel.Win(tp,WIN_REASON_DISASTER_LEO) end -end \ No newline at end of file +end diff --git a/unofficial/c511001374.lua b/unofficial/c511001374.lua index 21d8ead76b..5749b901fd 100644 --- a/unofficial/c511001374.lua +++ b/unofficial/c511001374.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.listed_names={CARD_UNKNOWN} @@ -112,4 +112,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) bc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511001376.lua b/unofficial/c511001376.lua index 6b961880f5..e7e7074040 100644 --- a/unofficial/c511001376.lua +++ b/unofficial/c511001376.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetCost(s.cost) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --return local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -46,7 +46,7 @@ function s.initial_effect(c) e4:SetCost(s.cost) e4:SetTarget(s.rettg) e4:SetOperation(s.retop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --special summon local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -124,4 +124,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(tc,tp,tp,tc:GetPreviousLocation(),tc:GetPreviousPosition(),true,(1<0 and Duel.SpecialSummon(g,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then g:GetFirst():CompleteProcedure() end -end \ No newline at end of file +end diff --git a/unofficial/c511002076.lua b/unofficial/c511002076.lua index e4ca7c8659..1696d7abc0 100644 --- a/unofficial/c511002076.lua +++ b/unofficial/c511002076.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) tc=g:GetNext() end -end \ No newline at end of file +end diff --git a/unofficial/c511002077.lua b/unofficial/c511002077.lua index be61301aa6..e86a00fd2a 100644 --- a/unofficial/c511002077.lua +++ b/unofficial/c511002077.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002079.lua b/unofficial/c511002079.lua index 70ffb3c5d7..2214f44f4e 100644 --- a/unofficial/c511002079.lua +++ b/unofficial/c511002079.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.negcost) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -143,4 +143,4 @@ function s.endop(e,tp,eg,ep,ev,re,r,rp) end function s.unval(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() -end \ No newline at end of file +end diff --git a/unofficial/c511002088.lua b/unofficial/c511002088.lua index 6d1f50ad3e..4495ad655a 100644 --- a/unofficial/c511002088.lua +++ b/unofficial/c511002088.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle by non-"Number" monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002090.lua b/unofficial/c511002090.lua index ad188aceaa..6f8b62a74e 100644 --- a/unofficial/c511002090.lua +++ b/unofficial/c511002090.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCost(s.lpcost) e2:SetOperation(s.lpop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --lp - 0 materials local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(52090844,0)) @@ -144,4 +144,4 @@ function s.lpchk(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002091.lua b/unofficial/c511002091.lua index a5aa2e1176..91bca600f6 100644 --- a/unofficial/c511002091.lua +++ b/unofficial/c511002091.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002092.lua b/unofficial/c511002092.lua index 7acea091ea..fc071c21a0 100644 --- a/unofficial/c511002092.lua +++ b/unofficial/c511002092.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -46,4 +46,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002111.lua b/unofficial/c511002111.lua index deb5715dc9..d80c9de1b7 100644 --- a/unofficial/c511002111.lua +++ b/unofficial/c511002111.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Destroy monster targeted by previous effect when it declares an attack local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(50491121,0)) @@ -83,4 +83,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,tc:GetPreviousAttackOnField(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002112.lua b/unofficial/c511002112.lua index c872a18bb0..c00140df87 100644 --- a/unofficial/c511002112.lua +++ b/unofficial/c511002112.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(p,Duel.GetLP(p)/2) end end -end \ No newline at end of file +end diff --git a/unofficial/c511002384.lua b/unofficial/c511002384.lua index 285336143d..7a5563bdcc 100644 --- a/unofficial/c511002384.lua +++ b/unofficial/c511002384.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Disable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -71,4 +71,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT+0x57a0000) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/unofficial/c511002482.lua b/unofficial/c511002482.lua index 9dfc15b6df..d21a1c4d22 100644 --- a/unofficial/c511002482.lua +++ b/unofficial/c511002482.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_RANKUP_EFFECT) e3:SetLabelObject(e2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_NUMBER} s.listed_names={88120966} @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002543.lua b/unofficial/c511002543.lua index ff030a8259..3183bebd1f 100644 --- a/unofficial/c511002543.lua +++ b/unofficial/c511002543.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.discost) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Double Snare local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -71,4 +71,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e4:SetValue(-atk) tg:RegisterEffect(e4) end -end \ No newline at end of file +end diff --git a/unofficial/c511002599.lua b/unofficial/c511002599.lua index 53dc14bfc8..1e021f932a 100644 --- a/unofficial/c511002599.lua +++ b/unofficial/c511002599.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCondition(function(e) return Duel.GetAttacker() and not e:GetHandler():IsStatus(STATUS_CHAINING) end) e2:SetCost(Cost.Detach(1)) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} -s.xyz_number=39 \ No newline at end of file +s.xyz_number=39 diff --git a/unofficial/c511002658.lua b/unofficial/c511002658.lua index 48ac9d7d43..5debd36d0e 100644 --- a/unofficial/c511002658.lua +++ b/unofficial/c511002658.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002727.lua b/unofficial/c511002727.lua index 58efdf2783..cfe385027c 100644 --- a/unofficial/c511002727.lua +++ b/unofficial/c511002727.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetCondition(function(e,tp) return Duel.GetBattleDamage(tp)>=Duel.GetLP(tp) end) e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.damop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.xyz_number=54 @@ -48,4 +48,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) Duel.SetLP(tp,100,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002737.lua b/unofficial/c511002737.lua index 3b8208450a..d48f4ab33f 100644 --- a/unofficial/c511002737.lua +++ b/unofficial/c511002737.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -42,4 +42,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002749.lua b/unofficial/c511002749.lua index 7774d0aceb..b1a1ba14f9 100644 --- a/unofficial/c511002749.lua +++ b/unofficial/c511002749.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --desrep local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -75,4 +75,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/unofficial/c511002762.lua b/unofficial/c511002762.lua index 9b7e67e6cd..c8e21e8c96 100644 --- a/unofficial/c511002762.lua +++ b/unofficial/c511002762.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_START) e2:SetCost(s.cost) e2:SetOperation(s.op) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -37,4 +37,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e) return Duel.GetLP(e:GetHandlerPlayer())>500 -end \ No newline at end of file +end diff --git a/unofficial/c511002763.lua b/unofficial/c511002763.lua index c3ba900c7b..f71e52a68f 100644 --- a/unofficial/c511002763.lua +++ b/unofficial/c511002763.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) @@ -45,4 +45,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511002764.lua b/unofficial/c511002764.lua index 39d25cf594..1b9da64166 100644 --- a/unofficial/c511002764.lua +++ b/unofficial/c511002764.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.retcost) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end @@ -37,4 +37,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,ct1*500,REASON_EFFECT,true) Duel.Damage(1-tp,ct2*500,REASON_EFFECT,true) Duel.RDComplete() -end \ No newline at end of file +end diff --git a/unofficial/c511002778.lua b/unofficial/c511002778.lua index faf71ab0e0..aebbd28f28 100644 --- a/unofficial/c511002778.lua +++ b/unofficial/c511002778.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(96470883,1)) @@ -84,4 +84,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,atk,REASON_EFFECT,true) Duel.RDComplete() end -end \ No newline at end of file +end diff --git a/unofficial/c511002829.lua b/unofficial/c511002829.lua index 4eb9c6178b..8acfeaff74 100644 --- a/unofficial/c511002829.lua +++ b/unofficial/c511002829.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) g:AddCard(tc2) Duel.SendtoGrave(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002830.lua b/unofficial/c511002830.lua index 8476c34d44..708e43beed 100644 --- a/unofficial/c511002830.lua +++ b/unofficial/c511002830.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.ctcost) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy & damage local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(75433814,1)) @@ -84,4 +84,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002839.lua b/unofficial/c511002839.lua index 5afdd13383..8ed0fc9251 100644 --- a/unofficial/c511002839.lua +++ b/unofficial/c511002839.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/unofficial/c511002855.lua b/unofficial/c511002855.lua index 0c74702e77..e7217c27c5 100644 --- a/unofficial/c511002855.lua +++ b/unofficial/c511002855.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_RANKUP_EFFECT) e3:SetLabelObject(e2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_names={30741334} function s.uncon(e,tp,eg,ep,ev,re,r,rp) @@ -132,4 +132,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.BreakEffect() Duel.SendtoGrave(sg,REASON_EFFECT) Duel.ShuffleHand(1-tp) -end \ No newline at end of file +end diff --git a/unofficial/c511002858.lua b/unofficial/c511002858.lua index ad84c9b2d7..07e53ec77b 100644 --- a/unofficial/c511002858.lua +++ b/unofficial/c511002858.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCost(s.descost) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp @@ -65,4 +65,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002864.lua b/unofficial/c511002864.lua index 9b9fff94db..9b3b705eba 100644 --- a/unofficial/c511002864.lua +++ b/unofficial/c511002864.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/unofficial/c511002866.lua b/unofficial/c511002866.lua index f87e938e14..d7fe1f1146 100644 --- a/unofficial/c511002866.lua +++ b/unofficial/c511002866.lua @@ -41,10 +41,10 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e2) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) local e5=e4:Clone() e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_series={SET_NUMBER} s.listed_names={2407234} @@ -86,4 +86,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002870.lua b/unofficial/c511002870.lua index f3d0c76533..3927cf4589 100644 --- a/unofficial/c511002870.lua +++ b/unofficial/c511002870.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.disatkchtg) e2:SetOperation(s.disatkchop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Detach all materials from this to prevent this card's destruction (Battle) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -137,4 +137,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) end c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511002871.lua b/unofficial/c511002871.lua index 98d53206bf..0c3ef577bd 100644 --- a/unofficial/c511002871.lua +++ b/unofficial/c511002871.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.listed_names={2061963} @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) end end -end \ No newline at end of file +end diff --git a/unofficial/c511002872.lua b/unofficial/c511002872.lua index 264e0e5eac..a2186fcbd2 100644 --- a/unofficial/c511002872.lua +++ b/unofficial/c511002872.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.listed_names={59627393} @@ -73,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then Duel.Damage(1-tp,g:GetFirst():GetPreviousAttackOnField(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002873.lua b/unofficial/c511002873.lua index 6bf2fb912b..4fbd672b55 100644 --- a/unofficial/c511002873.lua +++ b/unofficial/c511002873.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.eqcost) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --direct local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -96,4 +96,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002896.lua b/unofficial/c511002896.lua index 3986a57fc4..d4660e9fbe 100644 --- a/unofficial/c511002896.lua +++ b/unofficial/c511002896.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Draw 1 card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -77,4 +77,4 @@ 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 +end diff --git a/unofficial/c511002912.lua b/unofficial/c511002912.lua index 34cfcc9ffe..d4adb04c09 100644 --- a/unofficial/c511002912.lua +++ b/unofficial/c511002912.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511002913.lua b/unofficial/c511002913.lua index 85fe32df51..d94b30cbd5 100644 --- a/unofficial/c511002913.lua +++ b/unofficial/c511002913.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511003224.lua b/unofficial/c511003224.lua index 5cf80dc9b5..624c9112aa 100644 --- a/unofficial/c511003224.lua +++ b/unofficial/c511003224.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.xyzcheck(g,tp,xyz) local mg=g:Filter(Card.IsAttribute,nil,ATTRIBUTE_EARTH) @@ -70,4 +70,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) bc:RegisterEffect(e1) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) end -end \ No newline at end of file +end diff --git a/unofficial/c511003236.lua b/unofficial/c511003236.lua index f25e5d7d91..bd3602b7b5 100644 --- a/unofficial/c511003236.lua +++ b/unofficial/c511003236.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Always Battle Destroy local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -60,4 +60,4 @@ function s.tg(e,c) end function s.val(e,re,c) return re:GetOwnerPlayer()~=e:GetHandlerPlayer() -end \ No newline at end of file +end diff --git a/unofficial/c511009002.lua b/unofficial/c511009002.lua index 7ed30c9097..44bfa814bb 100644 --- a/unofficial/c511009002.lua +++ b/unofficial/c511009002.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCost(s.btcost) e2:SetTarget(s.bttg) e2:SetOperation(s.btop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.filter(c) return c:IsSpecialSummoned() and c:HasNonZeroAttack() @@ -115,4 +115,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511009026.lua b/unofficial/c511009026.lua index 8ee800bf40..f62fc418e0 100644 --- a/unofficial/c511009026.lua +++ b/unofficial/c511009026.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.tgfilter(c) return c:IsRace(RACE_MACHINE) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) and c:IsFaceup() diff --git a/unofficial/c511009062.lua b/unofficial/c511009062.lua index a7afc28519..45eee02058 100644 --- a/unofficial/c511009062.lua +++ b/unofficial/c511009062.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()==PHASE_MAIN1 @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511009074.lua b/unofficial/c511009074.lua index bc77583387..1cd352f824 100644 --- a/unofficial/c511009074.lua +++ b/unofficial/c511009074.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.efcon) e2:SetTarget(s.eftg) e2:SetLabelObject(e1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --negate local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetOperation(s.disop) local e4=e2:Clone() e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --Double Snare local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) @@ -112,4 +112,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.NegateEffect(ev) end -end \ No newline at end of file +end diff --git a/unofficial/c511009136.lua b/unofficial/c511009136.lua index 62e8706216..b89ba93130 100644 --- a/unofficial/c511009136.lua +++ b/unofficial/c511009136.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCondition(s.efcon) e2:SetTarget(s.eftg) e2:SetLabelObject(e1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_MATERIAL_CHECK) @@ -136,4 +136,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) else e:GetLabelObject():SetLabel(0) end -end \ No newline at end of file +end diff --git a/unofficial/c511009321.lua b/unofficial/c511009321.lua index 28bba89dc6..57bf6189c5 100644 --- a/unofficial/c511009321.lua +++ b/unofficial/c511009321.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e3) end -end \ No newline at end of file +end diff --git a/unofficial/c511009340.lua b/unofficial/c511009340.lua index 3a9458def2..7e668424ce 100644 --- a/unofficial/c511009340.lua +++ b/unofficial/c511009340.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) --To Pendulum local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(id,2)) @@ -150,4 +150,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511009387.lua b/unofficial/c511009387.lua index d03c569588..0719c10070 100644 --- a/unofficial/c511009387.lua +++ b/unofficial/c511009387.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --pendulum local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(90036274,0)) @@ -91,4 +91,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511009462.lua b/unofficial/c511009462.lua index f70756e465..6b9c84d8d1 100644 --- a/unofficial/c511009462.lua +++ b/unofficial/c511009462.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index a15393e23b..cdd8f2c453 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) @@ -192,4 +192,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end end -end \ No newline at end of file +end diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index cb3074ca07..0a87b8b98b 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.indcon) e1:SetCost(s.indcost) e1:SetOperation(s.indop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -80,7 +80,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -127,4 +127,4 @@ function s.dirregop(e,tp,eg,ep,ev,re,r,rp) end function s.dircon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 -end \ No newline at end of file +end diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index 551392e609..234901353a 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rtgtg) e1:SetOperation(s.rtgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Allow 1 "Raidraptor" monster to attack multiple times in a row local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -106,4 +106,4 @@ function s.chainatkop(c,ac) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ac:RegisterEffect(e1) -end \ No newline at end of file +end diff --git a/unofficial/c511009951.lua b/unofficial/c511009951.lua index c34495ce27..99df687dd7 100644 --- a/unofficial/c511009951.lua +++ b/unofficial/c511009951.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,alias) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --to deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(alias,1)) @@ -83,4 +83,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.cfilter,1,nil,tp) then e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010007.lua b/unofficial/c511010007.lua index 4297d020fc..b49e8e2706 100644 --- a/unofficial/c511010007.lua +++ b/unofficial/c511010007.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=7 s.roll_dice=true @@ -50,4 +50,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010009.lua b/unofficial/c511010009.lua index 2e02693b48..ef1bf8f6a2 100644 --- a/unofficial/c511010009.lua +++ b/unofficial/c511010009.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCondition(s.dacon) e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.daop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Cannot be destroyed by battle, except by "Number" monsters local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) @@ -90,4 +90,4 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010010.lua b/unofficial/c511010010.lua index 52b04f36b9..1d4b0db55d 100644 --- a/unofficial/c511010010.lua +++ b/unofficial/c511010010.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010011.lua b/unofficial/c511010011.lua index cddc6fa48d..2fa0243f6f 100644 --- a/unofficial/c511010011.lua +++ b/unofficial/c511010011.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010020.lua b/unofficial/c511010020.lua index 8ef5e133ea..52e23d964b 100644 --- a/unofficial/c511010020.lua +++ b/unofficial/c511010020.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010021.lua b/unofficial/c511010021.lua index c37b6d0af3..918f1f6455 100644 --- a/unofficial/c511010021.lua +++ b/unofficial/c511010021.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -52,4 +52,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010025.lua b/unofficial/c511010025.lua index 8aea3553d6..69d422e329 100644 --- a/unofficial/c511010025.lua +++ b/unofficial/c511010025.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Cannot be destroyed by battle, except with "Number" monsters local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -63,4 +63,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010032.lua b/unofficial/c511010032.lua index d2b61a0af7..ddd6ff25ec 100644 --- a/unofficial/c511010032.lua +++ b/unofficial/c511010032.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.atcost) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -61,4 +61,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010034.lua b/unofficial/c511010034.lua index 8421d4cd99..e2f5db3e81 100644 --- a/unofficial/c511010034.lua +++ b/unofficial/c511010034.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010039.lua b/unofficial/c511010039.lua index e14df67fac..89fe409e34 100644 --- a/unofficial/c511010039.lua +++ b/unofficial/c511010039.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -68,4 +68,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010047.lua b/unofficial/c511010047.lua index 6193298cb2..2466bb953b 100644 --- a/unofficial/c511010047.lua +++ b/unofficial/c511010047.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(s.indes) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.xyz_number=47 function s.matfilter(c) @@ -87,4 +87,4 @@ function s.ftarget(e,c) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010053.lua b/unofficial/c511010053.lua index 990773ff78..b5b85679ff 100644 --- a/unofficial/c511010053.lua +++ b/unofficial/c511010053.lua @@ -60,7 +60,7 @@ function s.initial_effect(c) e6:SetCost(s.bdcost) e6:SetTarget(s.rectg) e6:SetOperation(s.recop) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) --battle damage local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(93730230,0)) @@ -74,7 +74,7 @@ function s.initial_effect(c) e7:SetCost(s.bdcost) e7:SetTarget(s.bdtg) e7:SetOperation(s.bdop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) --93 Summon local e8=Effect.CreateEffect(c) e8:SetDescription(aux.Stringid(64414267,0)) @@ -211,4 +211,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end \ No newline at end of file +end diff --git a/unofficial/c511010056.lua b/unofficial/c511010056.lua index ab6caf1384..c2cfe47837 100644 --- a/unofficial/c511010056.lua +++ b/unofficial/c511010056.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.drcost) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -45,4 +45,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010064.lua b/unofficial/c511010064.lua index 1b96bc9da5..0eb0026ed4 100644 --- a/unofficial/c511010064.lua +++ b/unofficial/c511010064.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -63,4 +63,4 @@ function s.ifilter(c) end function s.indcon(e) return Duel.IsExistingMatchingCard(s.ifilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end \ No newline at end of file +end diff --git a/unofficial/c511010065.lua b/unofficial/c511010065.lua index 42876fec53..e0d8a5a584 100644 --- a/unofficial/c511010065.lua +++ b/unofficial/c511010065.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.negdamtg) e2:SetOperation(s.negdamop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=65 diff --git a/unofficial/c511010083.lua b/unofficial/c511010083.lua index f4b68d9643..e00217e3df 100644 --- a/unofficial/c511010083.lua +++ b/unofficial/c511010083.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010096.lua b/unofficial/c511010096.lua index eca92322ea..a13643fc5f 100644 --- a/unofficial/c511010096.lua +++ b/unofficial/c511010096.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) @@ -56,4 +56,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010103.lua b/unofficial/c511010103.lua index ffd345a68f..ceaf19e90e 100644 --- a/unofficial/c511010103.lua +++ b/unofficial/c511010103.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=103 @@ -47,4 +47,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010104.lua b/unofficial/c511010104.lua index ee564cdf40..114946911b 100644 --- a/unofficial/c511010104.lua +++ b/unofficial/c511010104.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) -- local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(2061963,1)) @@ -82,4 +82,4 @@ function s.deckop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010105.lua b/unofficial/c511010105.lua index 53441635d7..8d2b0daa19 100644 --- a/unofficial/c511010105.lua +++ b/unofficial/c511010105.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=105 @@ -53,4 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e3=e1:Clone() e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) -end \ No newline at end of file +end diff --git a/unofficial/c511010107.lua b/unofficial/c511010107.lua index d6c40c5929..0403dda427 100644 --- a/unofficial/c511010107.lua +++ b/unofficial/c511010107.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Workaround to make the extra attack part work on your turn local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCountLimit(1) e3:SetCondition(s.discon) e3:SetCost(s.discost) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) --Global effects to keep track of total effect resolutions and the last attacker aux.GlobalCheck(s,function() --Keep track of how many effects have resolved during each Battle Phase @@ -175,4 +175,4 @@ function s.endbpop(e,tp,eg,ep,ev,re,r,rp) e2:SetOperation(function(e) e:Reset() Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end) e2:SetReset(RESET_PHASE|PHASE_END|PHASE_BATTLE) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/unofficial/c511010132.lua b/unofficial/c511010132.lua index 85faa979ba..903f8df1fb 100644 --- a/unofficial/c511010132.lua +++ b/unofficial/c511010132.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --selfdes local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -94,4 +94,4 @@ function s.descon(e) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010139.lua b/unofficial/c511010139.lua index 17115ef34f..2955c66b53 100644 --- a/unofficial/c511010139.lua +++ b/unofficial/c511010139.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --selfdes local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -91,4 +91,4 @@ function s.descon(e) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010165.lua b/unofficial/c511010165.lua index aec31d9676..50786c17b4 100644 --- a/unofficial/c511010165.lua +++ b/unofficial/c511010165.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Prevent the activation of effects local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -63,4 +63,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010173.lua b/unofficial/c511010173.lua index fd28ad468c..87aa92efc2 100644 --- a/unofficial/c511010173.lua +++ b/unofficial/c511010173.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) @@ -46,4 +46,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(bc:GetAttack()) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010192.lua b/unofficial/c511010192.lua index 5d11b0670a..b2b3b6f44e 100644 --- a/unofficial/c511010192.lua +++ b/unofficial/c511010192.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) aux.DoubleSnareValidity(c,LOCATION_MZONE) aux.GlobalCheck(s,function() s[0]=0 @@ -122,4 +122,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010196.lua b/unofficial/c511010196.lua index e6aedbc553..4feea34ce9 100644 --- a/unofficial/c511010196.lua +++ b/unofficial/c511010196.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_RANKUP_EFFECT) e4:SetLabelObject(e3) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) end s.listed_series={SET_NUMBER} s.listed_names={55727845} @@ -124,4 +124,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangeBattleDamage(1-ep,ev,false) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010205.lua b/unofficial/c511010205.lua index 9e723f2f46..f1492b97e3 100644 --- a/unofficial/c511010205.lua +++ b/unofficial/c511010205.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetCondition(s.atkcon) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e4) --halve atk local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -205,4 +205,4 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/unofficial/c511010207.lua b/unofficial/c511010207.lua index d83653061a..67866bd859 100644 --- a/unofficial/c511010207.lua +++ b/unofficial/c511010207.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Double Snare aux.DoubleSnareValidity(c,LOCATION_MZONE) --Three attacks @@ -184,4 +184,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010238.lua b/unofficial/c511010238.lua index 88e17a870c..f8b765bdc6 100644 --- a/unofficial/c511010238.lua +++ b/unofficial/c511010238.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_RANKUP_EFFECT) e3:SetLabelObject(e2) - c:RegisterEffect(e3,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e3) end s.listed_series={SET_NUMBER} s.listed_names={92365601} @@ -54,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010239.lua b/unofficial/c511010239.lua index a15225479c..11fdd0c334 100644 --- a/unofficial/c511010239.lua +++ b/unofficial/c511010239.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) local e5=e4:Clone() e5:SetLabelObject(e3) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_series={SET_NUMBER} s.listed_names={84013237} @@ -92,4 +92,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010504.lua b/unofficial/c511010504.lua index 6dd5b2180a..e27b340371 100644 --- a/unofficial/c511010504.lua +++ b/unofficial/c511010504.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -65,4 +65,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e5) end -end \ No newline at end of file +end diff --git a/unofficial/c511010515.lua b/unofficial/c511010515.lua index c8d74ce7a8..61bb3d112b 100644 --- a/unofficial/c511010515.lua +++ b/unofficial/c511010515.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e7:SetCost(s.descost) e7:SetTarget(s.destg) e7:SetOperation(s.desop) - c:RegisterEffect(e7,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e7) end s.listed_series={0x10af} s.listed_names={47198668} @@ -109,4 +109,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetTargetCards(e) Duel.Destroy(dg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511015129.lua b/unofficial/c511015129.lua index 33242c0c62..6699c03a34 100644 --- a/unofficial/c511015129.lua +++ b/unofficial/c511015129.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) @@ -40,4 +40,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil,e:GetHandler():GetSequence(),e:GetHandler():GetFlagEffect(id+1)) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511020000.lua b/unofficial/c511020000.lua index fa915a7488..bc311bb472 100644 --- a/unofficial/c511020000.lua +++ b/unofficial/c511020000.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --atk/def local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) @@ -109,4 +109,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c511023000.lua b/unofficial/c511023000.lua index 92b08aae37..0a076f0d88 100644 --- a/unofficial/c511023000.lua +++ b/unofficial/c511023000.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.copycost) e1:SetTarget(s.copytg) e1:SetOperation(s.copyop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -38,4 +38,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then c:CopyEffect(tc:GetCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) end -end \ No newline at end of file +end diff --git a/unofficial/c511027117.lua b/unofficial/c511027117.lua index 5cd7078597..d101afc7a4 100644 --- a/unofficial/c511027117.lua +++ b/unofficial/c511027117.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.diszatg) e2:SetOperation(s.diszaop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end function s.desfilter(c,e) return c:GetAttack()==0 and c:IsPosition(POS_FACEUP) and c:IsDestructable(e) and not c:IsImmuneToEffect(e) @@ -57,4 +57,4 @@ function s.diszaop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511600284.lua b/unofficial/c511600284.lua index 7df3073087..bee226a4fc 100644 --- a/unofficial/c511600284.lua +++ b/unofficial/c511600284.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_RANKUP_EFFECT) e2:SetLabelObject(e1) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) end s.listed_names={15914410} function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -48,4 +48,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511600298.lua b/unofficial/c511600298.lua index 09c734f2f9..d3a62b334a 100644 --- a/unofficial/c511600298.lua +++ b/unofficial/c511600298.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(alias,1)) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c511600369.lua b/unofficial/c511600369.lua index 6a35853857..102dfc5b31 100644 --- a/unofficial/c511600369.lua +++ b/unofficial/c511600369.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.atcost) e1:SetTarget(s.attg) e1:SetOperation(s.atop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --change target local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -67,4 +67,4 @@ function s.cbop(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(at,c) end end -end \ No newline at end of file +end diff --git a/unofficial/c511600384.lua b/unofficial/c511600384.lua index 1d00c0cb3e..949d236664 100644 --- a/unofficial/c511600384.lua +++ b/unofficial/c511600384.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c513000017.lua b/unofficial/c513000017.lua index 3a77ca90a8..12b6b65898 100644 --- a/unofficial/c513000017.lua +++ b/unofficial/c513000017.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --destroy replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -62,4 +62,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/unofficial/c513000018.lua b/unofficial/c513000018.lua index a6c5f69b49..82b0530ba1 100644 --- a/unofficial/c513000018.lua +++ b/unofficial/c513000018.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCost(s.cost) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -82,4 +82,4 @@ function s.disoperation(e,tp,eg,ep,ev,re,r,rp) if re:IsActiveType(type) and re:GetHandler():IsControler(1-tp) then Duel.NegateEffect(ev) end -end \ No newline at end of file +end diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index 025557e546..d3a38eff89 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_RANKUP_EFFECT) e5:SetLabelObject(e4) - c:RegisterEffect(e5,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e5) end s.listed_series={SET_NUMBER} s.listed_names={48739166} @@ -110,4 +110,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c513000060.lua b/unofficial/c513000060.lua index 3f43bf4efc..b0df726ff8 100644 --- a/unofficial/c513000060.lua +++ b/unofficial/c513000060.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) local e6=e5:Clone() e6:SetLabelObject(e4) - c:RegisterEffect(e6,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e6) end s.listed_series={SET_NUMBER} s.listed_names={84013237} @@ -96,4 +96,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,g2:GetFirst():GetAttack()/2,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/unofficial/c513000061.lua b/unofficial/c513000061.lua index dcc2f67dbe..b5c8408c43 100644 --- a/unofficial/c513000061.lua +++ b/unofficial/c513000061.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCondition(s.negcon) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -101,4 +101,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local sum=dg:GetSum(Card.GetAttack) Duel.Damage(1-tp,sum,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c513000062.lua b/unofficial/c513000062.lua index 294790f6a8..8945781a41 100644 --- a/unofficial/c513000062.lua +++ b/unofficial/c513000062.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetCost(s.rmcost) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -207,4 +207,4 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) -end \ No newline at end of file +end diff --git a/unofficial/c513000063.lua b/unofficial/c513000063.lua index b42356bef4..e3616e8f79 100644 --- a/unofficial/c513000063.lua +++ b/unofficial/c513000063.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e2) --Equip to a monster you control local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -205,4 +205,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local op=Duel.SelectEffect(tp,{b1,1002},{b2,1003}) local bg=sg:Filter(Card.IsLocation,nil,op==1 and LOCATION_MZONE or LOCATION_STZONE) Duel.Remove(bg,POS_FACEUP,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c700000026.lua b/unofficial/c700000026.lua index 55ac674968..692738b650 100644 --- a/unofficial/c700000026.lua +++ b/unofficial/c700000026.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -42,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/unofficial/c700000027.lua b/unofficial/c700000027.lua index 8f718d6a2b..2ed3869b30 100644 --- a/unofficial/c700000027.lua +++ b/unofficial/c700000027.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) end function s.cost(e,tp,ep,eg,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -56,4 +56,4 @@ function s.operation(e,tp,ep,eg,ev,re,r,rp) ct=g:GetNext() until rc<=0 or not Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil,e) or not Duel.SelectYesNo(tp,210) -end \ No newline at end of file +end diff --git a/unofficial/c810000081.lua b/unofficial/c810000081.lua index 1e63982f65..b65813fa3a 100644 --- a/unofficial/c810000081.lua +++ b/unofficial/c810000081.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCondition(s.discon) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --battle indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -67,4 +67,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end From a49c981d0ddbb2021dde8a769103ff2eafb7649f Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 18:12:27 +0800 Subject: [PATCH 094/165] update "Ultimate Full Burst" * use new function for checking effects with a detach cost * modernization --- unofficial/c511003038.lua | 193 ++++++++++++++------------------------ 1 file changed, 68 insertions(+), 125 deletions(-) diff --git a/unofficial/c511003038.lua b/unofficial/c511003038.lua index e4b2dc9b05..594ed7ff1b 100644 --- a/unofficial/c511003038.lua +++ b/unofficial/c511003038.lua @@ -2,168 +2,111 @@ --Ultimate Full Burst local s,id=GetID() function s.initial_effect(c) - --Activate + --Activate an Xyz monster's effect that is activated by detaching its own Xyz Material(s) local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(s.acttg) + e1:SetOperation(s.actop) c:RegisterEffect(e1) end -s.listed_series={0x95} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() -end -function s.cfilter(c,tp) +s.listed_series={SET_RANK_UP_MAGIC} +function s.actfilter(c,tp) local re=c:GetReasonEffect() return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsType(TYPE_XYZ) and c:IsXyzSummoned() - and re and re:GetHandler():IsSetCard(SET_RANK_UP_MAGIC) and re:IsActiveType(TYPE_SPELL) + and re and re:GetHandler():IsSetCard(SET_RANK_UP_MAGIC) and re:IsSpellEffect() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=eg:Filter(s.cfilter,nil,tp) +function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=eg:Filter(s.actfilter,nil,tp) if chkc then return g:IsContains(chkc) end if chk==0 then return g:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local tc=g:FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e) Duel.SetTargetCard(tc) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) +function s.actop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(51103038,RESET_EVENT+RESETS_STANDARD,0,1,fid) + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + local c=e:GetHandler() + local fid=c:GetFieldID() + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) if Duel.GetCurrentChain()==1 then - local e1=Effect.CreateEffect(e:GetHandler()) + --Activate that monster's effect immediately after this effect resolves + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) + e1:SetTarget(s.efftg) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) tc:RegisterEffect(e1,true) end - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetLabel(fid) - e2:SetLabelObject(tc) - e2:SetCondition(s.descon) - e2:SetOperation(s.desop) - Duel.RegisterEffect(e2,tp) + --During the End Phase, destroy that monster + aux.DelayedOperation(tc,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0) end end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then - if not c:IsHasEffect(id) then return false end - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==ev then return tge:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - end - return false + local effs={} + for _,eff in ipairs({c:GetOwnEffects(id)}) do + if eff:HasDetachCost() then table.insert(effs,eff) end end - if chk==0 then - if not c:IsHasEffect(511002571) then return false end - local effs={c:GetCardEffect(511002571)} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - return true - end + if chkc then + for _,eff in ipairs(effs) do + if eff:GetLabel()==ev then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end - local effs={c:GetCardEffect(511002571)} - local acd={} - local ac={} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) + local options={} + local has_option=false + for _,eff in ipairs(effs) do + e:SetCategory(eff:GetCategory()) + e:SetProperty(eff:GetProperty()) + local con=eff:GetCondition() + local cost=eff:GetCost() + local tg=eff:GetTarget() + local eff_chk=(not con or con(e,tp,eg,ep,ev,re,r,rp)) and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end - end - local te=nil - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(acd))+1 - te=ac[op] + and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) + if eff_chk then has_option=true end + table.insert(options,{eff_chk,eff:GetDescription()}) end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end + e:SetCategory(0) + e:SetProperty(0) + if chk==0 then return has_option end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() if cost then cost(e,tp,eg,ep,ev,re,r,rp,1) end local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1,chkc) end + if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end te:UseCountLimit(tp) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(id) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetLabel(Duel.GetCurrentChain()) - e1:SetLabelObject(te) - e1:SetReset(RESET_CHAIN) - c:RegisterEffect(e1) + e:SetOperation(s.effop(te:GetOperation())) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(id) then - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==Duel.GetCurrentChain() then - local te=tge:GetLabelObject() - local operation=te:GetOperation() - if operation then operation(e,tp,eg,ep,ev,re,r,rp) end - end +function s.effop(fn) + return function(e,...) + fn(e,...) + local c=e:GetHandler() + if c:IsFaceup() and c:IsRelateToEffect(e) then + Duel.BreakEffect() + --That monster must attack all monsters your opponent controls, once each, during each Battle Phase this turn + local e1=Effect.CreateEffect(e:GetOwner()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_MUST_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_ATTACK_ALL) + e2:SetValue(1) + c:RegisterEffect(e2) end - end - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.BreakEffect() - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetOwner()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - end - e:Reset() -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffectLabel(51103038)==e:GetLabel() then - return true - else e:Reset() - return false end end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Destroy(tc,REASON_EFFECT) -end \ No newline at end of file From 6b24b36a532a117317bc36889ccf6ebf0e1ce06a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 1 Jul 2025 13:23:15 +0300 Subject: [PATCH 095/165] "Allure Queen" updates --- official/c23756165.lua | 2 +- official/c87257460.lua | 2 +- unofficial/c511310036.lua | 170 +++++++++++++++++++------------------- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/official/c23756165.lua b/official/c23756165.lua index 77906be217..f7554355aa 100644 --- a/official/c23756165.lua +++ b/official/c23756165.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e1) - c:RegisterEffect(e3,false,EFFECT_MARKER_ALLURE_LVUP) + c:RegisterEffect(e3) end s.listed_names={87257460,50140163} --"Allure Queen LV3", "Allure Queen LV7" s.LVnum=5 diff --git a/official/c87257460.lua b/official/c87257460.lua index 8e188d9faa..7d5c261f97 100644 --- a/official/c87257460.lua +++ b/official/c87257460.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e1) - c:RegisterEffect(e3,false,EFFECT_MARKER_ALLURE_LVUP) + c:RegisterEffect(e3) end s.listed_names={23756165} --"Allure Queen LV5" s.LVnum=3 diff --git a/unofficial/c511310036.lua b/unofficial/c511310036.lua index ebdc08da10..48d947dc79 100644 --- a/unofficial/c511310036.lua +++ b/unofficial/c511310036.lua @@ -2,109 +2,109 @@ --Allure Palace --Scripted by AlphaKretin local s,id=GetID() +local EFFECT_ALLURE_PALACE_ANIME=511310036 function s.initial_effect(c) - --workaround for e4 + --Activate local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e0:SetCode(EVENT_ADJUST) - e0:SetCountLimit(1) - e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_NO_TURN_RESET) - e0:SetRange(LOCATION_ALL) - e0:SetOperation(s.regop) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk&def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ALLURE_QUEEN)) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e3) - --become ignition - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(511310036) --hardcode - e4:SetRange(LOCATION_FZONE) - e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ALLURE_QUEEN)) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(122520,0)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetRange(LOCATION_FZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCondition(s.spcon) - e5:SetTarget(s.sptg) - e5:SetOperation(s.spop) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e6) + --All "Allure Queen" monsters you control gain 500 ATK/DEF + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_FZONE) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ALLURE_QUEEN)) + e1a:SetValue(500) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --Also, you can activate their effects that activate by sending themselves to the GY during your Main Phase + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2a:SetCode(EFFECT_ALLURE_PALACE_ANIME) + e2a:SetRange(LOCATION_FZONE) + e2a:SetTargetRange(1,0) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2b:SetCode(EVENT_ADJUST) + e2b:SetRange(LOCATION_FZONE) + e2b:SetOperation(s.regop) + c:RegisterEffect(e2b) + --Special Summon to your opponent's field, 1 monster with the same name as an "Allure Queen" monster that was Normal or Special Summoned to your field + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,0)) + e3a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetRange(LOCATION_FZONE) + e3a:SetCondition(s.spcon) + e3a:SetTarget(s.sptg) + e3a:SetOperation(s.spop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) end s.listed_series={SET_ALLURE_QUEEN} -function s.regop(e) - if s.global_check then return end - s.global_check = true - local g=Duel.GetMatchingGroup(Card.IsOriginalSetCard,0,LOCATION_ALL,LOCATION_ALL,nil,SET_ALLURE_QUEEN) - for tc in g:Iter() do - local effs={tc:GetCardEffect(511310036)} - for _,teh in ipairs(effs) do - local eff=teh:GetLabelObject() - local e1=eff:Clone() - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCode(0) - e1:SetCondition(s.igcon) - tc:RegisterEffect(e1) +function s.regop(e,tp) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ALLURE_QUEEN),tp,LOCATION_MZONE,0,nil):Match(aux.NOT(Card.HasFlagEffect),nil,id) + if #g==0 then return end + for allure_card in g:Iter() do + local effs={allure_card:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCost()==Cost.SelfToGrave and eff:GetCode()&(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)>0 then + allure_card:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) + local condition=eff:GetCondition() + --Ignition Effect version of the "Allure Queen" monster's Trigger Effect + local e1=eff:Clone() + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCode(0) + e1:SetCondition(function(e,tp) return Duel.IsPlayerAffectedByEffect(tp,EFFECT_ALLURE_PALACE_ANIME) and condition(e,tp) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + allure_card:RegisterEffect(e1) + end end end end -function s.eqfilter(c,code) - return c:GetFlagEffect(code)~=0 -end -function s.igcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsHasEffect(511310036) and #c:GetEquipGroup():Filter(s.eqfilter,nil,c:GetOriginalCode())>0 -end -function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(SET_ALLURE_QUEEN) and c:IsControler(tp) +function s.spconfilter(c,tp) + return c:IsSetCard(SET_ALLURE_QUEEN) and c:IsControler(tp) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.tgfilter(c,e,tp) + return c:IsCanBeEffectTarget(e) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end -function s.tgfilter(c,e,tp,eg) - return c:IsFaceup() and eg:IsContains(c) and - Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp,eg) end - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and - Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,eg) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,eg) + local g=eg:Filter(s.spconfilter,nil,tp):Match(s.tgfilter,nil,e,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and g:IsContains(chkc) and s.tgfilter(chkc,e,tp) end + if chk==0 then return #g>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 end + local tg=nil + if #g==1 then + tg=g + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + tg=g:Select(tp,1,1,nil) + end + Duel.SetTargetCard(tg) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not tc:IsFaceup() or not tc:IsRelateToEffect(e) or - Duel.GetLocationCount(1-tp,LOCATION_MZONE)<1 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,tc:GetCode()) - if #g>0 then - Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP) + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(1-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,tc:GetCode()) + if #g>0 then + Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP) + end end end \ No newline at end of file From 56dbf694f3232c7baa4da9b31d8284e3638d3950 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 1 Jul 2025 13:48:30 +0300 Subject: [PATCH 096/165] "Constellar" updates --- official/c14759024.lua | 28 ++++++++++++++-------------- official/c15871676.lua | 12 ++++++------ official/c16906241.lua | 10 +++++----- official/c40143123.lua | 12 ++++++------ official/c41269771.lua | 12 ++++++------ official/c42391240.lua | 37 ++++++++++++++++++------------------- official/c43513897.lua | 24 ++++++++++++------------ official/c78486968.lua | 20 ++++++++++---------- 8 files changed, 77 insertions(+), 78 deletions(-) diff --git a/official/c14759024.lua b/official/c14759024.lua index 2c282b6f3d..22e1f9a61c 100644 --- a/official/c14759024.lua +++ b/official/c14759024.lua @@ -2,29 +2,29 @@ --Constellar Zubeneschamali local s,id=GetID() function s.initial_effect(c) - --Add 1 "Constellar" monster from the Deck to the 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) + --Add 1 "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:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) end s.listed_series={SET_CONSTELLAR} function s.thfilter(c) return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thtg(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.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +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 diff --git a/official/c15871676.lua b/official/c15871676.lua index 009c80f4da..847ad7eada 100644 --- a/official/c15871676.lua +++ b/official/c15871676.lua @@ -2,7 +2,7 @@ --Constellar Aldebaran local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 Level 3 "Constellar" monster from the hand + --Special Summon 1 Level 3 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) - return c:IsSetCard(SET_CONSTELLAR) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsLevel(3) and c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c16906241.lua b/official/c16906241.lua index 8ee72dd27f..75e85f7db0 100644 --- a/official/c16906241.lua +++ b/official/c16906241.lua @@ -2,7 +2,7 @@ --Constellar Alrescha local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 "Constellar" monster from the hand + --Special Summon 1 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + 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 diff --git a/official/c40143123.lua b/official/c40143123.lua index 45b433b416..d19a2eba99 100644 --- a/official/c40143123.lua +++ b/official/c40143123.lua @@ -2,7 +2,7 @@ --Constellar Virgo local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 Level 5 "Constellar" monster from the hand + --Special Summon 1 Level 5 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) - return c:IsSetCard(SET_CONSTELLAR) and c:IsLevel(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +function s.spfilter(c,e,tp) + return c:IsLevel(5) and c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + 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 diff --git a/official/c41269771.lua b/official/c41269771.lua index c150745133..fc3b48c2e9 100644 --- a/official/c41269771.lua +++ b/official/c41269771.lua @@ -2,7 +2,7 @@ --Constellar Algiedi local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 Level 4 monster from the hand + --Special Summon 1 Level 4 "Constellar" monster from your hand in face-up Defense Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c,e,tp) - return c:IsSetCard(SET_CONSTELLAR) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsLevel(4) and c:IsSetCard(SET_CONSTELLAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) 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.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c42391240.lua b/official/c42391240.lua index 210ce0c81b..6b6cacec72 100644 --- a/official/c42391240.lua +++ b/official/c42391240.lua @@ -2,35 +2,34 @@ --Constellar Antares local s,id=GetID() function s.initial_effect(c) - --Add 1 "Constellar" monster from the GY to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) + --Add 1 "Constellar" monster from your GY to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) end s.listed_series={SET_CONSTELLAR} -function s.tgfilter(c) +function s.thfilter(c) return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() 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.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end + 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.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + 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) - Duel.ConfirmCards(1-tp,tc) end end \ No newline at end of file diff --git a/official/c43513897.lua b/official/c43513897.lua index 3faf4a55c5..21fd574dfc 100644 --- a/official/c43513897.lua +++ b/official/c43513897.lua @@ -2,17 +2,17 @@ --Constellar Acubens local s,id=GetID() function s.initial_effect(c) - --Increase the ATK of all "Constellar" monsters you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) + --Make all "Constellar" monsters you currently control gain 500 ATK + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_ATKCHANGE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetOperation(s.atkop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) end s.listed_series={SET_CONSTELLAR} function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -20,7 +20,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local c=e:GetHandler() for tc in g:Iter() do - --Increase ATK + --All "Constellar" monsters you currently control gain 500 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) diff --git a/official/c78486968.lua b/official/c78486968.lua index 38381d5dc5..714f64d178 100644 --- a/official/c78486968.lua +++ b/official/c78486968.lua @@ -2,28 +2,28 @@ --Constellar Sheratan local s,id=GetID() function s.initial_effect(c) - --Add 1 "Constellar" monster from the Deck to the hand + --Add 1 "Constellar" monster from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) end s.listed_series={SET_CONSTELLAR} -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToHand() end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thtg(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.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.op(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + 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) From 47db747546457a8ce197607d9f6784ccab6addd5 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 21:05:53 +0800 Subject: [PATCH 097/165] update "Utopia Rising" --- unofficial/c511004123.lua | 119 ++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 69 deletions(-) diff --git a/unofficial/c511004123.lua b/unofficial/c511004123.lua index 541af4a192..9673e2e090 100644 --- a/unofficial/c511004123.lua +++ b/unofficial/c511004123.lua @@ -1,18 +1,18 @@ --ライジング・ホープ --Utopia Rising ---Scripted by urielkama, fixed by ML, updated by the Razgriz local s,id=GetID() function s.initial_effect(c) - --Special Summon N39 Utopia from GY and equip with this card + --Special Summon 1 "Number 39: Utopia" from your Graveyard and equip it with this card local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCost(aux.RemainFieldCost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Destroy Summoned monster if this card leaves the field + --When this card leaves the field, destroy the equipped monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetCode(EVENT_LEAVE_FIELD) @@ -23,96 +23,77 @@ s.listed_names={84013237} function s.spfilter(c,e,tp) return c:IsCode(84013237) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end -function s.eqlimit(e,c) - return e:GetOwner()==c -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end 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) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end - Duel.HintSelection(g,true) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 + and c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then + Duel.HintSelection(tc,true) Duel.Equip(tp,c,tc) + local eff_id=e:GetFieldID() + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,eff_id) --Equip Limit local e0=Effect.CreateEffect(tc) e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetReset(RESET_EVENT+RESETS_STANDARD) - e0:SetValue(s.eqlimit) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(function(e,c) return e:GetOwner()==c end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e0) - --Equipped monster gains effects of all other Xyz monsters on your field + --Equipped monster gains the effects of all Xyz Monsters you control that are activated by detaching their own Xyz Material(s) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ADJUST) - e1:SetRange(LOCATION_MZONE) + e1:SetLabelObject({}) + e1:SetLabel(eff_id) e1:SetOperation(s.copyop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - tc:RegisterEffect(e1) + Duel.RegisterEffect(e1,tp) end end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end +function s.src_check(src_eff) + if src_eff:IsDeleted() or not src_eff:HasDetachCost() then return false end + local src_c=src_eff:GetHandler() + return src_c:IsFaceup() and src_c:IsType(TYPE_XYZ) end function s.copyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:GetEquipGroup():IsContains(e:GetOwner()) then e:Reset() return end - if c:IsDisabled() then return end - local map={} - for _,eff in ipairs({c:GetCardEffect(511002571)}) do - map[eff:GetLabel()]=true + local c=e:GetOwner() + local tc=c:GetEquipTarget() + local effs=e:GetLabelObject() + --it the card is no longer equipped, reset everything including this effect + if not tc or tc:GetFlagEffectLabel(id)~=e:GetLabel() then + for src_eff,eff in pairs(effs) do eff:Reset() end + return e:Reset() end - for tc in Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,e:GetHandler()):Iter() do - local code=tc:GetOriginalCode() - if not map[code] then - for _,te in ipairs({tc:GetCardEffect(511002571)}) do - if te:GetLabel()==code then - local teh=te:GetLabelObject() - if teh:GetCode()&511001822==511001822 or teh:GetLabel()==511001822 then teh=teh:GetLabelObject() end - local tec2=teh:Clone() - c:RegisterEffect(tec2) - local tec=te:Clone() - c:RegisterEffect(tec) - local rste=Effect.CreateEffect(e:GetOwner()) - rste:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - rste:SetCode(EVENT_ADJUST) - rste:SetLabelObject({tec2,tec}) - rste:SetLabel(code) - rste:SetOperation(s.resetop) - Duel.RegisterEffect(rste,tp) - end + --reset copied effects that are no longer applicable, or if the equip card is currently negated + for src_eff,eff in pairs(effs) do + if c:IsDisabled() or not tc:IsCode(84013237) or not s.src_check(src_eff) then + eff:Reset() + effs[src_eff]=nil + end + end + --copy effects that have not been copied already + local xg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,tc) + for xc in xg:Iter() do + for _,eff in ipairs({xc:GetOwnEffects()}) do + if not effs[eff] and eff:HasDetachCost() then + local ce=eff:Clone() + tc:RegisterEffect(ce) + effs[eff]=ce end end end end -function s.codechk(c,code) - if not c:IsFaceup() or not c:IsType(TYPE_XYZ) then return false end - for _,te in ipairs({c:GetCardEffect(511002571)}) do - if te:GetLabel()==code then return true end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=e:GetHandler():GetFirstCardTarget() + if tc and tc:IsLocation(LOCATION_MZONE) then + Duel.Destroy(tc,REASON_EFFECT) end - return false end -function s.resetop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetOwner():GetEquipTarget() - if not tc or tc:IsDisabled() or e:GetOwner():IsDisabled() - or not Duel.IsExistingMatchingCard(s.codechk,tp,LOCATION_MZONE,0,1,tc,e:GetLabel()) then - for _,eff in ipairs(e:GetLabelObject()) do - if eff then - eff:Reset() - end - end - e:Reset() - end -end \ No newline at end of file From b2fb1dccca61d260effc2df8ad313557d29d872b Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:50:06 +0800 Subject: [PATCH 098/165] update "XYZ Wings" --- unofficial/c511600191.lua | 138 +++++++++++--------------------------- 1 file changed, 38 insertions(+), 100 deletions(-) diff --git a/unofficial/c511600191.lua b/unofficial/c511600191.lua index f3f07b04fe..6a3742577c 100644 --- a/unofficial/c511600191.lua +++ b/unofficial/c511600191.lua @@ -1,18 +1,21 @@ --エクシーズ・ウイング --XYZ Wings ---Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsType,TYPE_XYZ)) - --twice per turn + --You can activate the equipped monster's "once per turn" effects that are activated by detaching its own Xyz Material(s) once again per turn local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ADJUST) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipTarget():GetFlagEffect(id)>0 end) - e1:SetOperation(s.tptop) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(id) c:RegisterEffect(e1) - --damage + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_ADJUST) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) + --Inflict 500 damage to your opponent local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DAMAGE) @@ -23,104 +26,43 @@ function s.initial_effect(c) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) - --Halve Battle Damage + --Any battle damage you take becomes halved local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_LEAVE_FIELD) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e3:SetCode(EVENT_LEAVE_FIELD) e3:SetOperation(s.bdop) c:RegisterEffect(e3) - aux.GlobalCheck(s,function() - OPTEffs={} - AffectedEffs={} - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_CHAINING) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_ADJUST) - ge2:SetCountLimit(1) - ge2:SetOperation(s.clear) - Duel.RegisterEffect(ge2,0) - end) end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if not rc:IsHasEffect(511002571) or re:IsHasProperty(EFFECT_FLAG_NO_TURN_RESET) then return end - local effs={rc:GetCardEffect(511002571)} - local chk=true - for _,eff in ipairs(effs) do - local temp=eff:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - if temp==re then - chk=false - end - end - if chk then return end - local _,ctmax,_,ctflag=re:GetCountLimit() - if ctflag&~EFFECT_COUNT_CODE_SINGLE>0 or ctmax~=1 then return end - if rc:GetFlagEffect(id)==0 then - OPTEffs[rc]={} - AffectedEffs[rc]={} - rc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END,0,1) - end - for _,te in ipairs(OPTEffs[rc]) do - if te==re then return end - end - table.insert(OPTEffs[rc],re) - if ctflag&EFFECT_COUNT_CODE_SINGLE>0 then - for _,eff in ipairs(effs) do - local te=eff:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local _,_,_,ctlflag=te:GetCountLimit() - if ctlflag&EFFECT_COUNT_CODE_SINGLE>0 then - local chk=true - for _,te2 in ipairs(OPTEffs[rc]) do - if te==te2 then chk=false end - end - if chk then - table.insert(OPTEffs[rc],te) - end - end - end - end +s.affected_effects={} +function s.xyzfilter(c) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsHasEffect(id) end -function s.clear(e,tp,eg,ep,ev,re,r,rp) - OPTEffs={} - for _,c in pairs(AffectedEffs) do - for _,te in ipairs(c) do - local _,_,ctcode,ctflag,hopt=te:GetCountLimit() - if ctflag&EFFECT_COUNT_CODE_SINGLE>0 then - te:SetCountLimit(1,{ctcode,hopt},ctflag) +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + --affect the effects of Xyz monsters that are equipped + local xg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + for xc in xg:Iter() do + for _,eff in ipairs({xc:GetOwnEffects()}) do + local usect,ctmax,ctcode,ctflag,hopt=eff:GetCountLimit() + if eff:HasDetachCost() and not eff:IsHasProperty(EFFECT_FLAG_NO_TURN_RESET) + and ctmax==1 and (ctflag&~EFFECT_COUNT_CODE_SINGLE)==0 + and not s.affected_effects[eff] then + eff:SetCountLimit(2,{ctcode,hopt},ctflag) + if usect==0 then eff:UseCountLimit(eff:GetHandlerPlayer()) end + s.affected_effects[eff]=true end end end - AffectedEffs={} -end -function s.tptop(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - for _,te in ipairs(OPTEffs[eqc]) do - local chk=true - for _,te2 in ipairs(AffectedEffs[eqc]) do - if te2==te then chk=false end - end - if chk then - local _,ctmax,ctcode,ctflag,hopt=te:GetCountLimit() - if ctflag&EFFECT_COUNT_CODE_SINGLE>0 then - te:SetCountLimit(ctmax+1,{ctcode,hopt},ctflag) - else - te:SetCountLimit(ctmax,{ctcode,hopt},ctflag) - end - table.insert(AffectedEffs[eqc],te) + --stop affecting effects that are no longer applicable + for eff in pairs(s.affected_effects) do + if not eff:HasDetachCost() or not xg:IsContains(eff:GetHandler()) then + local usect,_,ctcode,ctflag,hopt=eff:GetCountLimit() + eff:SetCountLimit(1,{ctcode,hopt},ctflag) + if usect<2 then eff:UseCountLimit(eff:GetHandlerPlayer()) end + s.affected_effects[eff]=nil end end end -function s.filter(c,eqc) - return c:GetPreviousTypeOnField()&TYPE_MONSTER==TYPE_MONSTER - and (c:GetReasonCard()==eqc or c:GetReasonEffect() and c:GetReasonEffect():GetHandler()==eqc) -end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() return ec and eg:IsContains(ec) @@ -136,18 +78,14 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.bdop(e,tp,eg,ep,ev,re,r,rp) + --For the rest of this turn, any battle damage you take becomes halved local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetTargetRange(1,0) - e1:SetValue(s.val) + e1:SetValue(function(_,_,dam,r) return (r&REASON_BATTLE)~=0 and (dam//2) or dam end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -function s.val(e,re,dam,r,rp,rc) - if (r&REASON_BATTLE)~=0 then - return math.floor(dam/2) - else return dam end -end \ No newline at end of file From d0ab09f1439ad262fd7521cc039c46ba65249b7e Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:57:36 +0800 Subject: [PATCH 099/165] Update c511004123.lua --- unofficial/c511004123.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/unofficial/c511004123.lua b/unofficial/c511004123.lua index 9673e2e090..2857aab27b 100644 --- a/unofficial/c511004123.lua +++ b/unofficial/c511004123.lua @@ -58,29 +58,26 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e1,tp) end end -function s.src_check(src_eff) - if src_eff:IsDeleted() or not src_eff:HasDetachCost() then return false end - local src_c=src_eff:GetHandler() - return src_c:IsFaceup() and src_c:IsType(TYPE_XYZ) -end function s.copyop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetOwner() local tc=c:GetEquipTarget() local effs=e:GetLabelObject() --it the card is no longer equipped, reset everything including this effect if not tc or tc:GetFlagEffectLabel(id)~=e:GetLabel() then - for src_eff,eff in pairs(effs) do eff:Reset() end + for _,eff in pairs(effs) do eff:Reset() end return e:Reset() end --reset copied effects that are no longer applicable, or if the equip card is currently negated + local xg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,tc) for src_eff,eff in pairs(effs) do - if c:IsDisabled() or not tc:IsCode(84013237) or not s.src_check(src_eff) then + if c:IsDisabled() or not tc:IsCode(84013237) + or src_eff:IsDeleted() or not src_eff:HasDetachCost() + or not xg:IsContains(src_eff:GetHandler()) then eff:Reset() effs[src_eff]=nil end end --copy effects that have not been copied already - local xg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,tc) for xc in xg:Iter() do for _,eff in ipairs({xc:GetOwnEffects()}) do if not effs[eff] and eff:HasDetachCost() then From 6a4a528af981a059186d3a3abee526546aa712f0 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 00:29:43 +0800 Subject: [PATCH 100/165] update "Rank-Up-Magic Cipher Pursuit" --- unofficial/c511018510.lua | 171 ++++++++++++++------------------------ 1 file changed, 64 insertions(+), 107 deletions(-) diff --git a/unofficial/c511018510.lua b/unofficial/c511018510.lua index d6b6cef483..7ee90f3f01 100644 --- a/unofficial/c511018510.lua +++ b/unofficial/c511018510.lua @@ -1,148 +1,105 @@ --RUM-光波追撃 --Rank-Up-Magic Cipher Pursuit ---cleaned up by MLD local s,id=GetID() function s.initial_effect(c) - --Activate - local re1=Effect.CreateEffect(c) - re1:SetDescription(aux.Stringid(41201386,0)) - re1:SetCategory(CATEGORY_SPECIAL_SUMMON) - re1:SetType(EFFECT_TYPE_ACTIVATE) - re1:SetCode(EVENT_FREE_CHAIN) - re1:SetProperty(EFFECT_FLAG_CARD_TARGET) - re1:SetCondition(s.condition) - re1:SetTarget(s.target) - re1:SetOperation(s.activate) - c:RegisterEffect(re1) -end -s.listed_series={0xe5} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))>=2000 -end -function s.filter1(c,e,tp) - local rk=c:GetRank() - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return #pg<=1 and c:IsFaceup() and c:IsSetCard(SET_CIPHER) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,pg) + --Special Summon from your Extra Deck, 1 "Cipher" Xyz Monster that is 1 Rank higher than 1 "Cipher" Xyz Monster you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(41201386,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCondition(function() return math.abs(Duel.GetLP(0)-Duel.GetLP(1))>=2000 end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) end -function s.filter2(c,e,tp,mc,rk,pg) +s.listed_series={SET_CIPHER} +function s.spfilter(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return c:IsType(TYPE_XYZ) and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(SET_CIPHER) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ) and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) + and c:IsRank(rk) and c:IsSetCard(SET_CIPHER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and (#pg<=0 or pg:IsContains(mc)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end +function s.matfilter(c,e,tp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return #pg<=1 and c:IsFaceup() and c:IsSetCard(SET_CIPHER) and c:HasRank() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,pg) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.matfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.matfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SelectTarget(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end +function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not tc or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end + if tc:IsFacedown() or not tc:IsRelateToEffect(e) + or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) + or not tc:HasRank() then return end local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,pg) - local sc=g:GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,pg):GetFirst() if sc then sc:SetMaterial(tc) Duel.Overlay(sc,tc) + --You can activate that Xyz Monster's effect that is activated by detaching its own Xyz Material(s) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) + e1:SetTarget(s.acttg) + e1:SetOperation(s.actop) e1:SetReset(RESETS_STANDARD&~RESET_TOFIELD) sc:RegisterEffect(e1,true) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then - if not c:IsHasEffect(id) then return false end - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==ev then return tge:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - end - return false + local effs={} + for _,eff in ipairs({c:GetOwnEffects(id)}) do + if eff:HasDetachCost() then table.insert(effs,eff) end end - if chk==0 then - if not c:IsHasEffect(511002571) then return false end - local effs={c:GetCardEffect(511002571)} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - return true - end + if chkc then + for _,eff in ipairs(effs) do + if eff:GetFieldID()==e:GetLabel() then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end - local effs={c:GetCardEffect(511002571)} - local acd={} - local ac={} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) + local options={} + local has_option=false + for _,eff in ipairs(effs) do + e:SetCategory(eff:GetCategory()) + e:SetProperty(eff:GetProperty()) + local con=eff:GetCondition() + local cost=eff:GetCost() + local tg=eff:GetTarget() + local eff_chk=(not con or con(e,tp,eg,ep,ev,re,r,rp)) and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end + and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) + if eff_chk then has_option=true end + table.insert(options,{eff_chk,eff:GetDescription()}) end - local te=nil - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(acd))+1 - te=ac[op] - end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end + e:SetCategory(0) + e:SetProperty(0) + if chk==0 then return has_option end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end + e:SetLabel(te:GetFieldID()) e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() if cost then cost(e,tp,eg,ep,ev,re,r,rp,1) end local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1,chkc) end + if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end te:UseCountLimit(tp) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(id) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetLabel(Duel.GetCurrentChain()) - e1:SetLabelObject(te) - e1:SetReset(RESET_CHAIN) - c:RegisterEffect(e1) + e:SetOperation(function(e,...) + te:GetOperation()(e,...) + e:Reset() + end) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(id) then - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==Duel.GetCurrentChain() then - local te=tge:GetLabelObject() - local operation=te:GetOperation() - if operation then operation(e,tp,eg,ep,ev,re,r,rp) end - end - end - end - e:Reset() -end \ No newline at end of file From 492154660e0c94912b951cd4bebf3347cf0958b1 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 00:30:20 +0800 Subject: [PATCH 101/165] Update c511003038.lua --- unofficial/c511003038.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unofficial/c511003038.lua b/unofficial/c511003038.lua index 594ed7ff1b..76b21f1ef2 100644 --- a/unofficial/c511003038.lua +++ b/unofficial/c511003038.lua @@ -56,7 +56,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end if chkc then for _,eff in ipairs(effs) do - if eff:GetLabel()==ev then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end + if eff:GetFieldID()==e:GetLabel() then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end @@ -81,6 +81,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if not op then return end local te=effs[op] if not te then return end + e:SetLabel(te:GetFieldID()) e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() From 82d83a194f82cf2f2a3d36d1d20ffa37986b9da1 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 00:50:41 +0800 Subject: [PATCH 102/165] update "Raidraptor - Rapid Xyz" --- unofficial/c511002868.lua | 133 ++++++++++++-------------------------- 1 file changed, 41 insertions(+), 92 deletions(-) diff --git a/unofficial/c511002868.lua b/unofficial/c511002868.lua index ccbbabb36b..d8af97368e 100644 --- a/unofficial/c511002868.lua +++ b/unofficial/c511002868.lua @@ -2,24 +2,19 @@ --Raidraptor - Rapid Xyz local s,id=GetID() function s.initial_effect(c) - --Activate + --Immediately after this effect resolves, Xyz Summon 1 "Raidraptor" Xyz Monster using monsters you control local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e1:SetCondition(s.xyzcon) + e1:SetCondition(function(_,tp) return Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(Card.IsSpecialSummoned,tp,0,LOCATION_MZONE,1,nil) end) e1:SetTarget(s.xyztg) e1:SetOperation(s.xyzop) c:RegisterEffect(e1) end -s.listed_series={0xba} -function s.cfilter(c) - return c:IsSpecialSummoned() -end -function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil) -end +s.listed_series={SET_RAIDRAPTOR} function s.xyzfilter(c) return c:IsXyzSummonable() and c:IsSetCard(SET_RAIDRAPTOR) end @@ -31,107 +26,61 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() if tc then + --The Summoned monster can activate its effects that activate by detaching an Xyz Material(s) local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) - e1:SetReset(RESET_EVENT+RESETS_STANDARD&~RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(s.acttg) + e1:SetOperation(s.actop) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1,true) Duel.XyzSummon(tp,tc) end end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - e:SetCategory(0) - e:SetProperty(0) - if chkc then - if not c:IsHasEffect(id) then return false end - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==ev then return tge:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - end - return false + local effs={} + for _,eff in ipairs({c:GetOwnEffects(id)}) do + if eff:HasDetachCost() then table.insert(effs,eff) end end - if chk==0 then - if not c:IsHasEffect(511002571) or not Duel.IsBattlePhase() then return false end - local effs={c:GetCardEffect(511002571)} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - if temp:IsHasType(EFFECT_TYPE_IGNITION) then - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or co(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - return true - end - end + if chkc then + for _,eff in ipairs(effs) do + if eff:GetFieldID()==e:GetLabel() then return eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end return false end - local effs={c:GetCardEffect(511002571)} - local acd={} - local ac={} - for _,teh in ipairs(effs) do - local temp=teh:GetLabelObject() - if temp:GetCode()&511001822==511001822 or temp:GetLabel()==511001822 then temp=temp:GetLabelObject() end - if temp:IsHasType(EFFECT_TYPE_IGNITION) then - e:SetCategory(temp:GetCategory()) - e:SetProperty(temp:GetProperty()) - local con=temp:GetCondition() - local cost=temp:GetCost() - local tg=temp:GetTarget() - if (not con or con(e,tp,eg,ep,ev,re,r,rp)) - and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) - and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)) then - table.insert(ac,teh) - table.insert(acd,temp:GetDescription()) - end - end + local options={} + local has_option=false + for _,eff in ipairs(effs) do + e:SetCategory(eff:GetCategory()) + e:SetProperty(eff:GetProperty()) + local con=eff:GetCondition() + local cost=eff:GetCost() + local tg=eff:GetTarget() + local eff_chk=eff:GetCountLimit()>0 + and (not con or con(e,tp,eg,ep,ev,re,r,rp)) + and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) + and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) + if eff_chk then has_option=true end + table.insert(options,{eff_chk,eff:GetDescription()}) end - local te=nil - if #ac==1 then te=ac[1] elseif #ac>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(acd))+1 - te=ac[op] - end - local teh=te - te=teh:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end + e:SetCategory(0) + e:SetProperty(0) + if chk==0 then return has_option end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + if not op then return end + local te=effs[op] + if not te then return end + e:SetLabel(te:GetFieldID()) e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) local cost=te:GetCost() if cost then cost(e,tp,eg,ep,ev,re,r,rp,1) end local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1,chkc) end + if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end te:UseCountLimit(tp) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(id) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetLabel(Duel.GetCurrentChain()) - e1:SetLabelObject(te) - e1:SetReset(RESET_CHAIN) - c:RegisterEffect(e1) + e:SetOperation(te:GetOperation()) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(id) then - local tgeffs={c:GetCardEffect(id)} - for _,tge in ipairs(tgeffs) do - if tge:GetLabel()==Duel.GetCurrentChain() then - local te=tge:GetLabelObject() - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - local operation=te:GetOperation() - if operation then operation(e,tp,eg,ep,ev,re,r,rp) end - end - end - end -end \ No newline at end of file From 2a3c3995a7b8e5896eaeedaf298bfd3d65087731 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 01:04:16 +0800 Subject: [PATCH 103/165] update "Overlay Wedge" --- unofficial/c511027118.lua | 41 ++++++++++++++------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/unofficial/c511027118.lua b/unofficial/c511027118.lua index d001aaaf93..0e3f7c6598 100644 --- a/unofficial/c511027118.lua +++ b/unofficial/c511027118.lua @@ -3,19 +3,18 @@ --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) - --Activate + --Negate an effect that was activated by detaching an Xyz Monster's own Xyz Material(s) local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetCondition(s.discon) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) c:RegisterEffect(e1) --Check for effects that detach material aux.GlobalCheck(s,function() - s[0]=nil local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetCode(EVENT_DETACH_MATERIAL) @@ -29,37 +28,27 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) s[0]=Duel.GetChainInfo(cid,CHAININFO_CHAIN_ID) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==s[0] and re:GetHandler():IsType(TYPE_XYZ) and Duel.IsChainDisablable(ev) +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==s[0] and re:GetHandler():IsType(TYPE_XYZ) and Duel.IsChainDisablable(ev) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) --Cannot detach for the rest of this turn local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) - e2:SetCondition(s.accon) e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end -function s.accon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end function s.aclimit(e,re) - local g=Duel.GetMatchingGroup(s.acfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - if not re:IsActiveType(TYPE_XYZ) or g:GetMaxGroup(Card.GetRank):IsContains(re:GetHandler()) then return false end - local eff={re:GetHandler():GetCardEffect(511002571)} - for _,ree in ipairs(eff) do - local te=ree:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - if re==te then return true end - end - return false -end \ No newline at end of file + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),0,LOCATION_MZONE,LOCATION_MZONE,nil) + return g:GetMaxGroup(Card.GetRank):IsContains(re:GetHandler()) or not re:HasDetachCost() +end From 839c48e32c22ea71a0e7636d0dfd6a7b00f8c442 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:48:18 +0300 Subject: [PATCH 104/165] "tellarknight" updates --- official/c1050186.lua | 44 ++++++++--------- official/c13851202.lua | 82 +++++++++++++++---------------- official/c22617205.lua | 77 ++++++++++++++--------------- official/c2273734.lua | 60 +++++++++++------------ official/c26057276.lua | 59 ++++++++++++----------- official/c38667773.lua | 40 +++++++-------- official/c42822433.lua | 89 +++++++++++++++++----------------- official/c58858807.lua | 107 ++++++++++++++++++++++++----------------- official/c63274863.lua | 63 ++++++++++++------------ official/c65056481.lua | 34 ++++++------- official/c75878039.lua | 44 ++++++++--------- official/c79210531.lua | 44 ++++++++--------- official/c86466163.lua | 69 ++++++++++++-------------- official/c96223501.lua | 75 +++++++++++++---------------- official/c99668578.lua | 48 +++++++++--------- 15 files changed, 461 insertions(+), 474 deletions(-) diff --git a/official/c1050186.lua b/official/c1050186.lua index 39891e0234..fc327aa1a0 100644 --- a/official/c1050186.lua +++ b/official/c1050186.lua @@ -2,36 +2,36 @@ --Satellarknight Unukalhai local s,id=GetID() function s.initial_effect(c) - --Send 1 "tellarknight" card to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Send 1 "tellarknight" card from your Deck to the GY, except "Satellarknight Unukalhai" + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOGRAVE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.tgtg) + e1a:SetOperation(s.tgop) + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c) +function s.tgfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) and c:IsAbleToGrave() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end diff --git a/official/c13851202.lua b/official/c13851202.lua index cf7ecbb31c..cf6f2a946b 100644 --- a/official/c13851202.lua +++ b/official/c13851202.lua @@ -2,53 +2,47 @@ --Satellarknight Rigel local s,id=GetID() function s.initial_effect(c) - --Increase the ATK of a "tellarknight" monster by 500 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Make 1 "tellarknight" monster on the field gain 500 ATK, but send it to the GY during the End Phase + 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+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.atktg) + e1a:SetOperation(s.atkop) + 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) end s.listed_series={SET_TELLARKNIGHT} -function s.filter(c) - return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT) +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_TELLARKNIGHT) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_TELLARKNIGHT),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_TELLARKNIGHT),tp,LOCATION_MZONE,LOCATION_MZONE,1,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 s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCountLimit(1) - e2:SetOperation(s.tgop) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e2) + if tc:IsRelateToEffect(e) then + if 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 + --Send it to the GY during the End Phase + aux.DelayedOperation(tc,PHASE_END,id,e,tp, + function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, + nil,0,1,aux.Stringid(id,1),aux.Stringid(id,2) + ) end -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end \ No newline at end of file diff --git a/official/c22617205.lua b/official/c22617205.lua index 1b798c0a71..aa7d423f96 100644 --- a/official/c22617205.lua +++ b/official/c22617205.lua @@ -2,58 +2,51 @@ --Stellarknight Zefraxciton local s,id=GetID() function s.initial_effect(c) - --Pendulum Summon procedure Pendulum.AddProcedure(c) - --You cannot Pendulum Summon, except "tellarknight" and "Zefra" monsters + --You cannot Pendulum Summon monsters, except "tellarknight" and "Zefra" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_PZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c,sump,sumtype) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) end) c:RegisterEffect(e1) - --Destroy 1 card you control and 1 Set card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_TELLAR) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - c:RegisterEffect(e4) + --Destroy 1 other "tellarknight" or "Zefra" card in your Monster Zone or Pendulum Zone and 1 Set card your opponent controls + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_DESTROY) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + e2c:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + c:RegisterEffect(e2c) end s.listed_series={SET_TELLARKNIGHT,SET_ZEFRA} -function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) then return false end - return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function s.filter1(c) - return c:IsFaceup() and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) +function s.desfilter(c,e,tp) + return ((c:IsControler(tp) and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) and c:IsFaceup()) or (c:IsControler(1-tp) and c:IsFacedown())) + and c:IsCanBeEffectTarget(e) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.destg(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_MZONE|LOCATION_PZONE,0,1,e:GetHandler()) - and Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE|LOCATION_PZONE,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,#g1,0,0) + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,LOCATION_ONFIELD,e:GetHandler(),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_DESTROY) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,2,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetTargetCards(e) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c2273734.lua b/official/c2273734.lua index 15b0e1dd49..7632a489ec 100644 --- a/official/c2273734.lua +++ b/official/c2273734.lua @@ -2,52 +2,50 @@ --Satellarknight Altair local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 "tellarknight" monster from the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Special Summon 1 "tellarknight" monster from your GY in Defense Position, except "Satellarknight Altair" + 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+EFFECT_FLAG_CARD_TARGET) + 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) end -s.listed_names={id} s.listed_series={SET_TELLARKNIGHT} -function s.filter(c,e,tp) - return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) 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.filter(chkc,e,tp) end + 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.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + 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.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) + 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 - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) + --Monsters you control cannot attack for the rest of this turn, except "tellarknight" monsters + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.atktg) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_TELLARKNIGHT) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) -end -function s.atktg(e,c) - return not c:IsSetCard(SET_TELLARKNIGHT) end \ No newline at end of file diff --git a/official/c26057276.lua b/official/c26057276.lua index 10868e1e29..e2012421e1 100644 --- a/official/c26057276.lua +++ b/official/c26057276.lua @@ -2,42 +2,43 @@ --Satellarknight Betelgeuse local s,id=GetID() function s.initial_effect(c) - --Send itself to the GY and add 1 "tellarknight" monster from the GY to the 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Send this card to the GY, and if you do, add 1 "tellarknight" card from your GY to your hand, except "Satellarknight Betelgeuse" + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) 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 + local c=e:GetHandler() + if chk==0 then return c:IsAbleToGrave() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)>0 and c:IsLocation(LOCATION_GRAVE) + and tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c38667773.lua b/official/c38667773.lua index 262ec89bc0..8915d95d87 100644 --- a/official/c38667773.lua +++ b/official/c38667773.lua @@ -2,38 +2,38 @@ --Satellarknight Vega local s,id=GetID() function s.initial_effect(c) - --Special Summon 1 "tellarknight" monster from the hand - 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Special Summon 1 "tellarknight" monster from your hand, except "Satellarknight Vega" + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end + 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.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c42822433.lua b/official/c42822433.lua index 817964ef22..dbb4a6dd2b 100644 --- a/official/c42822433.lua +++ b/official/c42822433.lua @@ -3,62 +3,61 @@ --Scripted by Satella local s,id=GetID() function s.initial_effect(c) - --Destroy cards on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + --Destroy cards on the field up to the number of LIGHT and DARK Xyz Monsters you control + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DESTROY) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.destg) + e1a:SetOperation(s.desop) + 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) + --Special Summon this card from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --Special Summon itself from the GY - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.spcon) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +s.listed_series={SET_CONSTELLAR,SET_TELLARKNIGHT} s.listed_names={id} -function s.cfilter(c) - return c:IsType(TYPE_XYZ) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) +function s.ctfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsFaceup() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return ct>0 and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetTargetCards(e) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) end end -function s.spcfilter(c,tp) - return c:IsFaceup() and c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsControler(tp) and not c:IsCode(id) +function s.spconfilter(c,tp) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsControler(tp) and c:IsFaceup() and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spcfilter,1,nil,tp) + return eg:IsExists(s.spconfilter,1,nil,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -71,14 +70,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end - --Cannot declare attack with non-Xyz monsters + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil) + --You cannot declare attacks for the rest of this turn, except with Xyz Monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(_,c) return not c:IsType(TYPE_XYZ) end) + e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil) end \ No newline at end of file diff --git a/official/c58858807.lua b/official/c58858807.lua index f28dd90670..f085798945 100644 --- a/official/c58858807.lua +++ b/official/c58858807.lua @@ -4,27 +4,27 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure + --Xyz Summon procedure: 2+ Level 4 monsters Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) - --Add 1 "tellarknight" and/or 1 "Constellar" card from the GY to the hand + --Add 1 "tellarknight" and/or 1 "Constellar" card from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Apply the effect of 1 "tellarknight" or "Constellar" monster + --This effect becomes the effect of the banished "tellarknight" or "Constellar" monster that activates when it is Normal Summoned local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.applycost) + e2:SetCost(Cost.AND(s.applycost,Cost.Detach(1))) e2:SetTarget(s.applytg) e2:SetOperation(s.applyop) c:RegisterEffect(e2) @@ -33,7 +33,7 @@ s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} function s.thfilter(c,e) return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end -function s.rescon(sg) +function s.rescon(sg,e,tp,mg) return #sg==1 or (sg:IsExists(Card.IsSetCard,1,nil,SET_TELLARKNIGHT) and sg:IsExists(Card.IsSetCard,1,nil,SET_CONSTELLAR)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -49,61 +49,78 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) end end -function s.rmvfilter(c,tp) - if not (c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsAbleToRemoveAsCost() - and c:IsHasEffect(id)) then - return false - end - local eff=c:GetCardEffect(id) - local te=eff:GetLabelObject() - local con=te:GetCondition() - local tg=te:GetTarget() - if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) - and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) then - return true +function s.rmfilter(c,e,tp) + if not (c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsMonster() and c:IsAbleToRemoveAsCost()) then return false end + local effs={c:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCode()==EVENT_SUMMON_SUCCESS then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (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.applycost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.rmvfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sc=Duel.SelectMatchingCard(tp,s.rmvfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() - Duel.Remove(sc,POS_FACEUP,REASON_COST) - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - e:SetLabelObject(sc:GetCardEffect(id):GetLabelObject()) - c:RemoveOverlayCard(tp,1,1,REASON_COST) + local rc=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + Duel.Remove(rc,POS_FACEUP,REASON_COST) + local available_effs={} + local effs={rc:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:GetCode()==EVENT_SUMMON_SUCCESS then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (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 + e:SetLabelObject(available_effs) end function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local te=e:GetLabelObject() - local tg=te and te:GetTarget() or nil - if chkc then return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end + if chkc then + local eff=e:GetLabelObject() + return eff and eff:GetTarget() and eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) + end if chk==0 then return true end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + local eff=nil + local available_effs=e:GetLabelObject() + 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()) + e:SetLabel(eff:GetLabel()) + e:SetLabelObject(eff:GetLabelObject()) + e:SetProperty(eff:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + local tg=eff:GetTarget() if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end - e:SetLabelObject(te) + e:SetLabelObject(eff) Duel.ClearOperationInfo(0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if not te then return end - local sc=te:GetHandler() - if sc:GetFlagEffect(id)==0 then - e:SetLabel(0) - e:SetLabelObject(nil) - return - end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - local op=te:GetOperation() + local eff=e:GetLabelObject() + if not eff 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 +end \ No newline at end of file diff --git a/official/c63274863.lua b/official/c63274863.lua index 03ec5dd5f1..e30d108f94 100644 --- a/official/c63274863.lua +++ b/official/c63274863.lua @@ -2,46 +2,45 @@ --Satellarknight Sirius local s,id=GetID() function s.initial_effect(c) - --Shuffle 5 "tellarknight" monsters into the Deck and draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Shuffle 5 "tellarknight" monsters from your GY into the Deck, then draw 1 card + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.tdtg) + e1a:SetOperation(s.tdop) + 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) end s.listed_series={SET_TELLARKNIGHT} -function s.filter(c) +function s.tdfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and c:IsAbleToDeck() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,5,nil) end + and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,5,5,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) - if #tg~=5 then return end - Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) - if ct==5 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) + if #tg==5 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 + and tg:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA)==5 then + if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end end end \ No newline at end of file diff --git a/official/c65056481.lua b/official/c65056481.lua index ff8864a47e..6d51bd3f27 100644 --- a/official/c65056481.lua +++ b/official/c65056481.lua @@ -2,23 +2,23 @@ --Satellarknight Alsahm local s,id=GetID() function s.initial_effect(c) - --Inflict 1000 damage to the opponent - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Inflict 1000 damage to your opponent + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DAMAGE) + 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.damtg) + e1a:SetOperation(s.damop) + 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) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c75878039.lua b/official/c75878039.lua index 18ab174d99..626217e0eb 100644 --- a/official/c75878039.lua +++ b/official/c75878039.lua @@ -2,36 +2,36 @@ --Satellarknight Deneb local s,id=GetID() function s.initial_effect(c) - --Add 1 "tellarknight" monsters from the Deck to the 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Add 1 "tellarknight" monster from your Deck to your hand, except "Satellarknight Deneb" + 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) end s.listed_series={SET_TELLARKNIGHT} s.listed_names={id} -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) 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.operation(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + 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) diff --git a/official/c79210531.lua b/official/c79210531.lua index aca1943810..ddfc5b9910 100644 --- a/official/c79210531.lua +++ b/official/c79210531.lua @@ -3,7 +3,7 @@ --scripted by Naim local s,id=GetID() function s.initial_effect(c) - --Special Summon itself from the hand + --Special Summon this card from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,31 +16,31 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Add 1 "tellarknight" Spell from the Deck to the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_TELLAR) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) + --Add 1 "tellarknight" Spell 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_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2c) end -s.listed_series={SET_TELLARKNIGHT,SET_CONSTELLAR} +s.listed_series={SET_CONSTELLAR,SET_TELLARKNIGHT} s.listed_names={id} -function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and not c:IsCode(id) +function s.spconfilter(c,tp) + return c:IsSetCard({SET_TELLARKNIGHT,SET_CONSTELLAR}) and c:IsControler(tp) and c:IsFaceup() and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) + return eg:IsExists(s.spconfilter,1,nil,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c86466163.lua b/official/c86466163.lua index 27f250b207..f01e9d8049 100644 --- a/official/c86466163.lua +++ b/official/c86466163.lua @@ -2,42 +2,37 @@ --Satellarknight Capella local s,id=GetID() function s.initial_effect(c) - --Treat "tellarknight" monsters as Level 5 for Xyz Summons - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Apply a "You can treat Level 4 or lower "tellarknight" monsters you control as Level 5 when Xyz Summoning using 3 or more monsters as Xyz Materials" effect + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetOperation(s.effop) + c:RegisterEffect(e1a) + local e1ab=e1a:Clone() + e1ab:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e1ab) + local e1ac=e1a:Clone() + e1ac:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1ac) end s.listed_series={SET_TELLARKNIGHT} -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.xyztg) - e1:SetValue(s.xyzlv) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_SATELLARKNIGHT_CAPELLA) - e2:SetLabelObject(e1) - e2:SetValue(0x30003) --0x1 >, 0x2 =, 0x4 <, value == last digit(s) - Duel.RegisterEffect(e2,tp) -end -function s.xyztg(e,c) - return c:IsLevelBelow(4) and c:IsSetCard(SET_TELLARKNIGHT) -end -function s.xyzlv(e,c,rc) - return 0x50000+c:GetLevel() -end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + --For the rest of this turn, you can treat Level 4 or lower "tellarknight" monsters you control as Level 5 when Xyz Summoning using 3 or more monsters as Xyz Materials + local e1a=Effect.CreateEffect(e:GetHandler()) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1a:SetCode(EFFECT_XYZ_LEVEL) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(function(e,c) return c:IsLevelBelow(4) and c:IsSetCard(SET_TELLARKNIGHT) end) + e1a:SetValue(function(e,c,rc) return 0x50000+c:GetLevel() end) + e1a:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1a,tp) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_SATELLARKNIGHT_CAPELLA) + e1b:SetLabelObject(e1a) + e1b:SetValue(0x30003) --0x1 >, 0x2 =, 0x4 <, value == last digit(s) + Duel.RegisterEffect(e1b,tp) +end \ No newline at end of file diff --git a/official/c96223501.lua b/official/c96223501.lua index e7f19c6e05..64b1b899a1 100644 --- a/official/c96223501.lua +++ b/official/c96223501.lua @@ -2,58 +2,51 @@ --Satellarknight Zefrathuban local s,id=GetID() function s.initial_effect(c) - --Pendulum Summon procedure Pendulum.AddProcedure(c) - --You cannot Pendulum Summon, except "tellarknight" and "Zefra" monsters + --You cannot Pendulum Summon monsters, except "tellarknight" and "Zefra" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c,sump,sumtype) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) end) c:RegisterEffect(e1) - --Destroy 1 card you control and 1 face-up card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2,false,EFFECT_MARKER_TELLAR) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - c:RegisterEffect(e4) + --Destroy 1 other "tellarknight" or "Zefra" card in your Monster Zone or Pendulum Zone and 1 face-up card your opponent controls + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_DESTROY) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + e2c:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + c:RegisterEffect(e2c) end s.listed_series={SET_TELLARKNIGHT,SET_ZEFRA} -function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(SET_TELLARKNIGHT) or c:IsSetCard(SET_ZEFRA) then return false end - return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function s.filter1(c) - return c:IsFaceup() and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) +function s.desfilter(c,e,tp) + return ((c:IsControler(tp) and c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA})) or c:IsControler(1-tp)) and c:IsFaceup() + and c:IsCanBeEffectTarget(e) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.destg(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_MZONE|LOCATION_PZONE,0,1,e:GetHandler()) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE|LOCATION_PZONE,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,LOCATION_ONFIELD,e:GetHandler(),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_DESTROY) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,2,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetTargetCards(e) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c99668578.lua b/official/c99668578.lua index a04e757a25..3b7c5c512d 100644 --- a/official/c99668578.lua +++ b/official/c99668578.lua @@ -2,39 +2,37 @@ --Satellarknight Procyon local s,id=GetID() function s.initial_effect(c) - --Send 1 "tellarknight" monster to the GY and draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_TELLAR) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) + --Send 1 "tellarknight" monster from your hand to the GY, and if you do, draw 1 card + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) + 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.drtg) + e1a:SetOperation(s.drop) + 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) end s.listed_series={SET_TELLARKNIGHT} -function s.filter(c) - return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() +function s.tgfilter(c) + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsMonster() and c:IsAbleToGrave() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(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.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,s.filter,1,1,REASON_EFFECT)==0 then return end - local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) - if ct>0 then +function s.drop(e,tp,eg,ep,ev,re,r,rp) + if Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_EFFECT)>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Draw(tp,1,REASON_EFFECT) end end \ No newline at end of file From ce6425f171a5c5bc420b535e881237bb892c8fff Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 21:23:21 +0800 Subject: [PATCH 105/165] update "Number C65: King Overfiend" --- official/c49195710.lua | 61 +++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/official/c49195710.lua b/official/c49195710.lua index a3a35fe37b..e5e99018f6 100644 --- a/official/c49195710.lua +++ b/official/c49195710.lua @@ -1,63 +1,46 @@ ---CNo.65 裁断魔王ジャッジ・デビル +--CNo.65 裁断魔王ジャッジ・デビル --Number C65: King Overfiend local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,3) c:EnableReviveLimit() - --addown + --Xyz Summon procedure: 3 Level 3 DARK monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,3) + --Make 1 face-up monster your opponent controls lose 1000 ATK and DEF local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetTarget(s.atkdeftg) + e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) - --act limit + --Effect Monsters your opponent controls cannot activate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_CANNOT_TRIGGER) + e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(s.accon) + e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3790062) end) c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e3:SetCode(511002571) - e3:SetLabelObject(e1) - e3:SetLabel(c:GetOriginalCode()) - c:RegisterEffect(e3) end s.xyz_number=65 s.listed_names={3790062} -function s.filter(c) - return c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end +function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,tc,1,tp,-1000) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() +function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - tc:RegisterEffect(e2) + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + tc:UpdateAttack(-1000,nil,c) + tc:UpdateDefense(-1000,nil,c) end end -function s.accon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3790062) -end \ No newline at end of file From 57539e938947086b55cba28fe749b55ab25e9ff1 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 2 Jul 2025 21:23:34 +0800 Subject: [PATCH 106/165] update "Number F0: Utopic Future Slash" --- official/c43490025.lua | 56 ++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/official/c43490025.lua b/official/c43490025.lua index 2c35d39524..807cec93dd 100644 --- a/official/c43490025.lua +++ b/official/c43490025.lua @@ -2,42 +2,34 @@ --Number F0: Utopic Future Slash local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz summon procedure: 2 Xyz Monsters with the same Rank, except "Number" monsters Xyz.AddProcedure(c,s.xyzfilter,nil,2,s.ovfilter,aux.Stringid(id,1),nil,nil,false,s.xyzcheck) --Gains 500 ATK per "Number" Xyz monsters in the GYs + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 end) + c:RegisterEffect(e1) + --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.atkval) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) c:RegisterEffect(e2) - --Cannot be destroyed by battle + --Make this card able to make a second attack local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCondition(function() return Duel.IsAbleToEnterBP() end) + e3:SetCost(Cost.Detach(1)) + e3:SetTarget(s.atktg) + e3:SetOperation(s.atkop) c:RegisterEffect(e3) - --Make itself be able to make a second attack - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(s.atkcon) - e4:SetCost(Cost.Detach(1)) - e4:SetTarget(s.atktg) - e4:SetOperation(s.atkop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e5:SetCode(511002571) - e5:SetLabelObject(e4) - e5:SetLabel(c:GetOriginalCode()) - c:RegisterEffect(e5) end s.listed_series={SET_NUMBER,SET_UTOPIA} s.xyz_number=0 @@ -55,19 +47,13 @@ end function s.atkfilter(c) return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - --Can make a second attack + --This card can make a second attack during each Battle Phase this turn local e1=Effect.CreateEffect(c) e1:SetDescription(3201) e1:SetType(EFFECT_TYPE_SINGLE) From a7e308d07431d19d52925dbce13e5feff825a5f4 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 3 Jul 2025 00:53:18 +0300 Subject: [PATCH 107/165] Updated some Xyz Monsters that weren't using the "Cost.Detach" function --- official/c10000030.lua | 20 ++++------ official/c65301952.lua | 38 +++++++------------ official/c73445448.lua | 85 +++++++++++++++--------------------------- official/c83531441.lua | 70 +++++++++++++--------------------- official/c86532744.lua | 68 +++++++++++++++------------------ 5 files changed, 107 insertions(+), 174 deletions(-) diff --git a/official/c10000030.lua b/official/c10000030.lua index 12fe23edd7..e7dcd3c0c9 100644 --- a/official/c10000030.lua +++ b/official/c10000030.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure + --Xyz Summon procedure: 2 Level 6 Spellcaster monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),6,2) --Activate 1 of these effects local e1=Effect.CreateEffect(c) @@ -12,23 +12,17 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.effcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.effcost)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) end function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then if not chkc:IsControler(1-tp) then return false end @@ -36,12 +30,12 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if op==1 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControlerCanBeChanged() elseif op==2 then - return chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) + return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end end local b1=Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) + and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) if chk==0 then return b1 or b2 end local op=Duel.SelectEffect(tp, {b1,aux.Stringid(id,1)}, @@ -55,7 +49,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) elseif op==2 then e:SetCategory(CATEGORY_SPECIAL_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) end end @@ -70,4 +64,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Special Summon 1 monster from your opponent's GY Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65301952.lua b/official/c65301952.lua index 23158a467f..42078326d3 100644 --- a/official/c65301952.lua +++ b/official/c65301952.lua @@ -2,56 +2,46 @@ --Alchemic Magician local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,3) c:EnableReviveLimit() - --atkup + --Xyz Summon procedure: 3 Level 4 Spellcaster monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,3) + --This card gains 200 ATK for each Spell in your GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(s.atkval) + e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(Card.IsSpell,c:GetControler(),LOCATION_GRAVE,0,nil)*200 end) c:RegisterEffect(e1) - --set + --Set 1 Spell from your Deck to your Spell & Trap Zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCondition(s.setcon) - e2:SetCost(s.setcost) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetCost(Cost.AND(Cost.Detach(1),s.setcost)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsSpell,c:GetControler(),LOCATION_GRAVE,0,nil)*200 -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) -end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end -function s.filter(c) - return c:IsSpell() and not c:IsType(TYPE_FIELD) and c:IsSSetable() +function s.setfilter(c) + return c:IsSpell() and not c:IsFieldSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end + 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) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then - Duel.SSet(tp,g:GetFirst()) + Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c73445448.lua b/official/c73445448.lua index 6654992832..8603d878c4 100644 --- a/official/c73445448.lua +++ b/official/c73445448.lua @@ -1,71 +1,48 @@ ---No.22 不乱健 +--No.22 不乱健 --Number 22: Zombiestein local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),8,2) c:EnableReviveLimit() - --spsummon limit + --Xyz Summon procedure: 2 Level 8 DARK monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),8,2) + c:AddMustBeXyzSummoned() + --Change this card to Defense Position, and if you do, negate the effects of 1 face-up card your opponent controls until the end of this turn local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.xyzlimit) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(Cost.AND(Cost.Detach(1),s.discost)) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(s.cost) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) - c:RegisterEffect(e2) end s.xyz_number=22 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end - if chk==0 then return e:GetHandler():IsAttackPos() + local c=e:GetHandler() + if chk==0 then return c:IsAttackPos() and c:IsCanChangePosition() and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,POS_DEFENSE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsDefensePos() then return end - Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0) local tc=Duel.GetFirstTarget() - if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e3) - end + if c:IsRelateToEffect(e) and c:IsAttackPos() and c:IsCanChangePosition() + and Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)>0 + and tc:IsRelateToEffect(e) and tc:IsFaceup()then + --Negate that targeted card's effects, until the end of this turn + tc:NegateEffects(c,RESET_PHASE|PHASE_END,true) end -end +end \ No newline at end of file diff --git a/official/c83531441.lua b/official/c83531441.lua index 6cd6496569..28f89fac09 100644 --- a/official/c83531441.lua +++ b/official/c83531441.lua @@ -2,34 +2,34 @@ --Dante, Traveler of the Burning Abyss local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,2) c:EnableReviveLimit() - --atkup + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) + --This card gains 500 ATK for each sent to the GY for the cost local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.atkcost)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - --to defense + --If this card attacks, it is changed to Defense Position at the end of the Battle Phase local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE|PHASE_BATTLE) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCondition(s.poscon) - e2:SetOperation(s.posop) + e2:SetCondition(function(e) return e:GetHandler():GetAttackedCount()>0 end) + e2:SetOperation(function(e) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) end) c:RegisterEffect(e2) - --to hand + --Add 1 other "Burning Abyss" card from your GY to your hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_TO_GRAVE) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) @@ -37,58 +37,38 @@ function s.initial_effect(c) end s.listed_series={SET_BURNING_ABYSS} function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local ct={} - for i=3,1,-1 do - if Duel.IsPlayerCanDiscardDeckAsCost(tp,i) then - table.insert(ct,i) - end - end - if #ct==1 then - Duel.DiscardDeck(tp,ct[1],REASON_COST) - e:SetLabel(1) - else - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local ac=Duel.AnnounceNumber(tp,table.unpack(ct)) - Duel.DiscardDeck(tp,ac,REASON_COST) - e:SetLabel(ac) - end + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end + local max_ct=math.min(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0),3) + local op=max_ct==1 and 1 or Duel.AnnounceNumberRange(tp,1,max_ct) + e:SetLabel(op) + Duel.DiscardDeck(tp,op,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=e:GetLabel() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --Until the end of this turn, this card gains 500 ATK for each card sent to the GY this way local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(e:GetLabel()*500) e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - e1:SetValue(ct*500) c:RegisterEffect(e1) end end -function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENSE) - end -end -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_BURNING_ABYSS) 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.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc~=c and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) + 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 +end \ No newline at end of file diff --git a/official/c86532744.lua b/official/c86532744.lua index ff52d9499b..7ff3ca8027 100644 --- a/official/c86532744.lua +++ b/official/c86532744.lua @@ -1,55 +1,47 @@ ---SNo.39 希望皇ホープONE +--SNo.39 希望皇ホープONE --Number S39: Utopia Prime local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3,s.ovfilter,aux.Stringid(id,1)) - --Destroy Special Summoned monsters and inflict damage + --Xyz Summon procedure: 3 Level 4 LIGHT monsters OR 1 "Number 39: Utopia" you control + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3,s.ovfilter,aux.Stringid(id,0)) + --Destroy as many Special Summoned monsters your opponent controls as possible, and if you do, banish them, then inflict 300 damage to your opponent for each monster banished local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCondition(function(e,tp) return Duel.GetLP(1-tp)>=Duel.GetLP(tp)+3000 end) + e1:SetCost(Cost.AND(Cost.Detach(3),Cost.PayLP(10,true))) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) c:RegisterEffect(e1) end s.xyz_number=39 -s.listed_names={84013237} --Number 39: Utopia +s.listed_names={84013237} --"Number 39: Utopia" function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) + return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) and c:IsFaceup() end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 +function s.desfilter(c) + return c:IsSpecialSummoned() and c:IsAbleToRemove() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLP(tp)>10 and e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) - Duel.PayLPCost(tp,Duel.GetLP(tp)-10) +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*300) end -function s.filter(c) - return c:IsAbleToRemove() - and (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -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(1-tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#sg*300) -end -function s.ctfilter(c) +function s.rmctfilter(c) return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED) - local ct=Duel.GetOperatedGroup():FilterCount(s.ctfilter,nil) - if ct>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,ct*300,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED)>0 then + local ct=Duel.GetOperatedGroup():FilterCount(s.rmctfilter,nil) + if ct>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,ct*300,REASON_EFFECT) + end end -end +end \ No newline at end of file From 053acce55291ac6646f8910825e91bc8f833cfa2 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 3 Jul 2025 17:28:51 +0800 Subject: [PATCH 108/165] Update utility.lua track functions created by SelfDiscard and SelfDiscardToGrave --- utility.lua | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/utility.lua b/utility.lua index 8125c07dcc..3bb4819e6a 100644 --- a/utility.lua +++ b/utility.lua @@ -1481,22 +1481,27 @@ function Cost.SelfToExtra(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c:IsAbleToExtraAsCost() end Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) end +function Cost.SelfReveal(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + Duel.ConfirmCards(1-tp,c) + Duel.ShuffleHand(tp) +end + +local self_discard_costs={} function Cost.SelfDiscard(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() end Duel.SendtoGrave(c,REASON_DISCARD|REASON_COST) end +self_discard_costs[Cost.SelfDiscard]=true function Cost.SelfDiscardToGrave(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() end Duel.SendtoGrave(c,REASON_DISCARD|REASON_COST) end -function Cost.SelfReveal(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsPublic() end - Duel.ConfirmCards(1-tp,c) - Duel.ShuffleHand(tp) -end +self_discard_costs[Cost.SelfDiscardToGrave]=true + --Aliases for historical reasons: Cost.SelfRelease=Cost.SelfTribute Auxiliary.bfgcost=Cost.SelfBanish @@ -1552,10 +1557,13 @@ function Cost.Detach(min,max,op) return cost_func end -function Effect.HasDetachCost(e) - return detach_costs[e:GetCost()] +local function cost_table_check(t) + return function(eff) return t[eff:GetCost()] end end +Effect.HasSelfDiscardCost=cost_table_check(self_discard_costs) +Effect.HasDetachCost=cost_table_check(detach_costs) + --Default cost for "You can pay X LP;" function Cost.PayLP(lp_value,pay_until) if not pay_until then @@ -1616,6 +1624,7 @@ function Cost.AND(...) for _,fn in ipairs(fns) do if detach_costs[fn] then detach_costs[full_cost]=true end + if self_discard_costs[fn] then self_discard_costs[full_cost]=true end end return full_cost end From 53986ee2e1651a070e043f83ddc2e0ea914ec5ec Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 3 Jul 2025 17:29:11 +0800 Subject: [PATCH 109/165] update "Thunder Dragon" monsters --- goat/c504700054.lua | 27 ++++++++----------- official/c12081875.lua | 25 ++++++++++-------- official/c20318029.lua | 44 ++++++++++++------------------- official/c29596581.lua | 41 +++++++---------------------- official/c31786629.lua | 20 +++++++------- official/c56713174.lua | 59 +++++++++++++++++------------------------- official/c83107873.lua | 41 ++++++++++++++--------------- 7 files changed, 106 insertions(+), 151 deletions(-) diff --git a/goat/c504700054.lua b/goat/c504700054.lua index d2803998cd..206a321bf6 100644 --- a/goat/c504700054.lua +++ b/goat/c504700054.lua @@ -3,37 +3,32 @@ --"“Thunder Dragon” may be discarded to search for 0 “Thunder Dragons” in the player’s deck." netrep ruling local s,id=GetID() function s.initial_effect(c) - --search + --Add up to 2 "Thunder Dragon" cards from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) end s.listed_names={31786629} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function s.filter(c) +function s.thfilter(c) return c:IsCode(31786629) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,0,2,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,0,2,nil) if g and #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) - else - if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) then Duel.GoatConfirm(tp,LOCATION_DECK) end + elseif not Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then + Duel.GoatConfirm(tp,LOCATION_DECK) end end diff --git a/official/c12081875.lua b/official/c12081875.lua index dbd9dcb1ff..71a9310800 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -34,11 +34,11 @@ end function s.applyfilter(c,e,tp) if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) - and c:IsHasEffect(EFFECT_MARKER_THUNDRA) and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()) then + and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()) then return false end - for _,eff in ipairs(c:GetMarkedEffects(EFFECT_MARKER_THUNDRA)) do - if s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end + for _,eff in ipairs({c:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end end function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -51,24 +51,27 @@ end function s.applyop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end - local effs=tc:GetMarkedEffects(EFFECT_MARKER_THUNDRA) + local effs={} local options={} - for _,eff in ipairs(effs) do - local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) - table.insert(options,{eff_chk,eff:GetDescription()}) + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) + end end local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) if not op then return end local te=effs[op] if not te then return end Duel.ClearTargetCard() - s.runfn(te:GetTarget(),te,tp) + s.runfn(te:GetTarget(),te,tp,1) Duel.BreakEffect() tc:CreateEffectRelation(te) Duel.BreakEffect() - local tg=Duel.GetTargetCards(te) + local tg=Duel.GetTargetCards(e) tg:ForEach(Card.CreateEffectRelation,te) - s.runfn(te:GetOperation(),te,tp,1) + s.runfn(te:GetOperation(),te,tp) tg:ForEach(Card.ReleaseEffectRelation,te) local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) @@ -88,4 +91,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/official/c20318029.lua b/official/c20318029.lua index 6c0a56f37d..30c2d5a5d4 100644 --- a/official/c20318029.lua +++ b/official/c20318029.lua @@ -3,12 +3,12 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --atk + --Make 1 Thunder monster you control gain 500 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) 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:SetHintTiming(TIMING_DAMAGE_STEP) @@ -16,8 +16,8 @@ function s.initial_effect(c) e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --to hand + c:RegisterEffect(e1) + --You can add 1 "Thunder Dragonmatrix" from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -30,28 +30,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(s.thcon) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) c:RegisterEffect(e3) end -s.listed_names={20318029} -function s.atkfilter(c) - return c:IsFaceup() and c:IsRace(RACE_THUNDER) -end +s.listed_names={id} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsRace(RACE_THUNDER) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsRace,RACE_THUNDER),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsRace,RACE_THUNDER),tp,LOCATION_MZONE,0,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - e1:SetValue(500) - tc:RegisterEffect(e1) + tc:UpdateAttack(500,nil,e:GetHandler()) end end function s.thfilter(c) @@ -59,15 +51,13 @@ function s.thfilter(c) 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.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) +function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) + 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.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end \ No newline at end of file diff --git a/official/c29596581.lua b/official/c29596581.lua index e0cd66ebe8..3007c9ab40 100644 --- a/official/c29596581.lua +++ b/official/c29596581.lua @@ -3,7 +3,7 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Add 1 "Thunder Dragon" card to hand + --Add to your hand, 1 of your "Thunder Dragon" cards that is banished or in your GY, except "Thunder Dragonroar" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -13,8 +13,8 @@ function s.initial_effect(c) e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --Special summon 1 "Thunder Dragon" monster + c:RegisterEffect(e1) + --Special Summon 1 "Thunder Dragon" monster from your Deck in Defense Position, but return it to the hand during the End Phase local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -33,7 +33,8 @@ end s.listed_series={SET_THUNDER_DRAGON} s.listed_names={id} function s.thfilter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_THUNDER_DRAGON) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_THUNDER_DRAGON) and c:IsAbleToHand() and not c:IsCode(id) + and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end @@ -41,10 +42,10 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #tc>0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,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) @@ -56,33 +57,11 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) 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 Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(tc) - e1:SetCondition(s.thcon2) - e1:SetOperation(s.thop2) - Duel.RegisterEffect(e1,tp) + aux.DelayedOperation(tc,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end,nil,0) end Duel.SpecialSummonComplete() end -function s.thcon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffectLabel(id)~=e:GetLabel() then - e:Reset() - return false - else return true end -end -function s.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end \ No newline at end of file diff --git a/official/c31786629.lua b/official/c31786629.lua index 8f907ac25b..2eb3f889da 100644 --- a/official/c31786629.lua +++ b/official/c31786629.lua @@ -2,30 +2,30 @@ --Thunder Dragon local s,id=GetID() function s.initial_effect(c) - --search + --Add up to 2 "Thunder Dragon" from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) end s.listed_names={id} -function s.filter(c) +function s.thfilter(c) return c:IsCode(id) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) +function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,2,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,2,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c56713174.lua b/official/c56713174.lua index aff01402ba..bcc5298b34 100644 --- a/official/c56713174.lua +++ b/official/c56713174.lua @@ -3,7 +3,7 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Discard itself to dd to hand + --Add 1 "Thunder Dragondark" from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --Add to hand when banished or sent to the GY + e1:SetTarget(s.thtg(s.dragondarkfilter)) + e1:SetOperation(s.thop(s.dragondarkfilter)) + c:RegisterEffect(e1) + --Add 1 "Thunder Dragon" card from your Deck to your hand, except "Thunder Dragondark" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -23,46 +23,35 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_REMOVE) e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg2) - e2:SetOperation(s.thop2) + e2:SetTarget(s.thtg(s.thundrafilter)) + e2:SetOperation(s.thop(s.thundrafilter)) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(s.thcon) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) c:RegisterEffect(e3) end s.listed_series={SET_THUNDER_DRAGON} s.listed_names={id} -function s.thfilter(c) +function s.dragondarkfilter(c) return 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 tc=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function s.thfilter2(c) +function s.thundrafilter(c) return c:IsSetCard(SET_THUNDER_DRAGON) and not c:IsCode(id) and c:IsAbleToHand() end -function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +function s.thtg(filter) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end end -function s.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil) - if #tc>0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) +function s.thop(filter) + return function(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end end -end \ No newline at end of file +end diff --git a/official/c83107873.lua b/official/c83107873.lua index 18edeec8e9..419c860bef 100644 --- a/official/c83107873.lua +++ b/official/c83107873.lua @@ -3,7 +3,7 @@ --scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --special summon + --Special Summon 1 of your "Thunder Dragon" monsters that is banished or in your GY, except "Thunder Dragonhawk" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -13,8 +13,8 @@ function s.initial_effect(c) e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_THUNDRA) - --to deck + c:RegisterEffect(e1) + --Shuffle any number of cards from your hand into the Deck, then draw the same number of cards local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) @@ -27,13 +27,14 @@ function s.initial_effect(c) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(s.tdcon) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) c:RegisterEffect(e3) end s.listed_names={id} s.listed_series={SET_THUNDER_DRAGON} function s.spfilter(c,e,tp) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_THUNDER_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THUNDER_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -44,27 +45,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,63,nil) - if #g==0 then return end - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,#g,REASON_EFFECT) -end \ No newline at end of file + local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil) + if #hg==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=hg:Select(tp,1,#hg,nil) + if #g==0 or Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK) + if ct>0 then + Duel.ShuffleDeck(tp) + Duel.BreakEffect() + Duel.Draw(tp,ct,REASON_EFFECT) + end +end From bcf04f18c491acdd8fdf6e7162247617068262e7 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 3 Jul 2025 20:53:05 +0800 Subject: [PATCH 110/165] update "Thunder Dragon Thunderstormech" --- official/c12081875.lua | 73 +++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index 71a9310800..3bb987515e 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -15,8 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.applytg) - e1:SetOperation(s.applyop) + e1:SetTarget(s.applytg(nil)) c:RegisterEffect(e1) --If a Thunder monster(s) you control would be destroyed by battle or card effect, you can banish 3 cards from your GY instead local e2=Effect.CreateEffect(c) @@ -41,40 +40,48 @@ function s.applyfilter(c,e,tp) if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end end -function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.applyfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) +function s.applytg(chkc_tg) + return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return not chkc_tg or chkc_tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end + if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) + local effs={} + local options={} + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) + end + end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + local te=effs[op] + Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + local targ_fn=te:GetTarget() + if targ_fn then + Duel.ClearTargetCard() + tc:CreateEffectRelation(e) + s.runfn(targ_fn,te,tp,1) + end + e:SetTarget(s.applytg(targ_fn)) + e:SetOperation(s.applyop(tc,te:GetOperation())) + end end -function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local effs={} - local options={} - for _,eff in ipairs({tc:GetOwnEffects()}) do - if eff:HasSelfDiscardCost() then - table.insert(effs,eff) - local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) - table.insert(options,{eff_chk,eff:GetDescription()}) +function s.applyop(tc,op) + return function(e,tp,eg,ep,ev,re,r,rp) + if tc:IsRelateToEffect(e) then + if op then op(e,tp,eg,ep,ev,re,r,rp) end + if tc:IsAbleToDeck() then + local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + Duel.BreakEffect() + Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) + end end + e:SetTarget(s.applytg(nil)) + e:SetOperation(nil) end - local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) - if not op then return end - local te=effs[op] - if not te then return end - Duel.ClearTargetCard() - s.runfn(te:GetTarget(),te,tp,1) - Duel.BreakEffect() - tc:CreateEffectRelation(te) - Duel.BreakEffect() - local tg=Duel.GetTargetCards(e) - tg:ForEach(Card.CreateEffectRelation,te) - s.runfn(te:GetOperation(),te,tp) - tg:ForEach(Card.ReleaseEffectRelation,te) - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_THUNDER) From 88038f8ee5e75d2fdaec18de9071162529966682 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 00:03:23 +0800 Subject: [PATCH 111/165] Update c12081875.lua --- official/c12081875.lua | 89 +++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index 3bb987515e..d07ca49fc7 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -15,7 +15,8 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.applytg(nil)) + e1:SetTarget(s.applytg) + e1:SetOperation(s.applyop) c:RegisterEffect(e1) --If a Thunder monster(s) you control would be destroyed by battle or card effect, you can banish 3 cards from your GY instead local e2=Effect.CreateEffect(c) @@ -31,56 +32,56 @@ function s.runfn(fn,eff,tp,chk) return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,nil,REASON_EFFECT,PLAYER_NONE,chk) end function s.applyfilter(c,e,tp) - if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() - and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) - and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()) then - return false - end + if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() and c:IsAbleToDeck() + and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))) then return false end for _,eff in ipairs({c:GetOwnEffects()}) do if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end end -function s.applytg(chkc_tg) - return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return not chkc_tg or chkc_tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - if chk==0 then return Duel.IsExistingTarget(s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) - local effs={} - local options={} - for _,eff in ipairs({tc:GetOwnEffects()}) do - if eff:HasSelfDiscardCost() then - table.insert(effs,eff) - local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) - table.insert(options,{eff_chk,eff:GetDescription()}) - end - end - local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) - local te=effs[op] - Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) - local targ_fn=te:GetTarget() - if targ_fn then - Duel.ClearTargetCard() - tc:CreateEffectRelation(e) - s.runfn(targ_fn,te,tp,1) +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|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + local effs={} + local options={} + for _,eff in ipairs({tc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) end - e:SetTarget(s.applytg(targ_fn)) - e:SetOperation(s.applyop(tc,te:GetOperation())) end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + local te=effs[op] + Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + local tg=te:GetTarget() + if tg then + e:SetLabel(0) + e:SetLabelObject(nil) + Duel.ClearTargetCard() + tc:CreateEffectRelation(e) + s.runfn(tg,e,tp,1) + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + Duel.ClearOperationInfo(0) + end + e:SetLabelObject({tc,te}) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end -function s.applyop(tc,op) - return function(e,tp,eg,ep,ev,re,r,rp) - if tc:IsRelateToEffect(e) then - if op then op(e,tp,eg,ep,ev,re,r,rp) end - if tc:IsAbleToDeck() then - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) - end - end - e:SetTarget(s.applytg(nil)) - e:SetOperation(nil) +function s.applyop(e,tp,eg,ep,ev,re,r,rp) + local tc,te=table.unpack(e:GetLabelObject()) + if not tc:IsRelateToEffect(e) then return end + local op=te:GetOperation() + if op then + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + op(e,tp,eg,ep,ev,re,r,rp) + end + if tc:IsAbleToDeck() then + local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + Duel.BreakEffect() + Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end end function s.repfilter(c,tp) From 5dba0752760e6adcf229ebf5819720cac12a67e7 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:30:33 +0800 Subject: [PATCH 112/165] add "Dragon Ruler" cost helper functions --- cards_specific_functions.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/cards_specific_functions.lua b/cards_specific_functions.lua index 4f11526299..87f943428d 100644 --- a/cards_specific_functions.lua +++ b/cards_specific_functions.lua @@ -1239,3 +1239,30 @@ function Infernoid.RegisterSummonProcedure(c,monstersToBanish) e2:SetOperation(InfernoidInt.summonOperation) c:RegisterEffect(e2) end + +DragonRuler={} +do + local function discard_with_other_cost(filter) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_HAND,0,1,1,c) + Duel.SendtoGrave(g+c,REASON_COST|REASON_DISCARD) + end + end + --For Level 7 monsters (can only discard to GY, and does not allow Dragons) + function DragonRuler.SelfDiscardToGraveCost(attr) + local function other_discard_to_grave_filter(c) + return c:IsAttribute(attr) and c:IsDiscardable() and c:IsAbleToGraveAsCost() + end + return Cost.AND(discard_with_other_cost(other_discard_to_grave_filter),Cost.SelfDiscardToGrave) + end + --For lower Level monsters (not limited to discarding to GY, and allows Dragons) + function DragonRuler.SelfDiscardCost(attr) + local function other_discard_filter(c) + return (c:IsAttribute(attr) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() + end + return Cost.AND(discard_with_other_cost(other_discard_filter),Cost.SelfDiscardToGrave) + end +end From ad68e648dd2e4739c1872277f20f2c33c5122194 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:31:20 +0800 Subject: [PATCH 113/165] update "Chasma, Dragon Ruler of Auroras" --- official/c4965193.lua | 73 +++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/official/c4965193.lua b/official/c4965193.lua index 2b38a9740e..f175128800 100644 --- a/official/c4965193.lua +++ b/official/c4965193.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.applycost) + e1:SetCost(Cost.AND(s.applycost,Cost.Detach(1))) e1:SetTarget(s.applytg) e1:SetOperation(s.applyop) c:RegisterEffect(e1) @@ -32,62 +32,59 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_DRAGON_RULER} -function s.tgfilter(c,tp) - if not (c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsAbleToGraveAsCost() and c:IsHasEffect(id)) then - return false - end - local eff=c:GetCardEffect(id) - local te=eff:GetLabelObject() - local con=te:GetCondition() - local tg=te:GetTarget() - if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) - and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) then - return true +function s.runfn(fn,eff,tp,chk) + return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,nil,REASON_EFFECT,PLAYER_NONE,chk) +end +function s.applyfilter(c,tp) + if not (c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsAbleToGraveAsCost()) then return false end + for _,eff in ipairs({c:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end return false end function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + local effs={} + local options={} + for _,eff in ipairs({sc:GetOwnEffects()}) do + if eff:HasSelfDiscardCost() then + table.insert(effs,eff) + local eff_chk=s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) + table.insert(options,{eff_chk,eff:GetDescription()}) + end + end + local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) + local te=effs[op] + e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + e:SetLabelObject(te) Duel.SendtoGrave(sc,REASON_COST) - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - e:SetLabelObject(sc:GetCardEffect(id):GetLabelObject()) - c:RemoveOverlayCard(tp,1,1,REASON_COST) end function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local te=e:GetLabelObject() - local tg=te and te:GetTarget() or nil - if chkc then return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end + if chkc then return te and te:GetTarget() and te:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) end if chk==0 then return true end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + e:SetLabel(0) + e:SetLabelObject(nil) + local tg=te:GetTarget() if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + Duel.ClearOperationInfo(0) end e:SetLabelObject(te) - Duel.ClearOperationInfo(0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() - if not te then return end - local sc=te:GetHandler() - if sc:GetFlagEffect(id)==0 then - e:SetLabel(0) - e:SetLabelObject(nil) - return - end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() if op then - op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + op(e,tp,eg,ep,ev,re,r,rp) end - e:SetLabel(0) - e:SetLabelObject(nil) + e:SetProperty(0) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -108,4 +105,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end From fa63da2f492d94c5c27ef93c6e5fb8b279c62dc0 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:31:44 +0800 Subject: [PATCH 114/165] update "Dragon Ruler" monsters that discard themselves --- official/c26400609.lua | 63 ++++++++++++-------------------- official/c27415516.lua | 24 +++--------- official/c53797637.lua | 26 ++++--------- official/c53804307.lua | 55 ++++++++++------------------ official/c58201062.lua | 17 ++------- official/c89185742.lua | 26 ++++--------- official/c89399912.lua | 83 +++++++++++++++++------------------------- official/c90411554.lua | 68 +++++++++++++--------------------- official/c91020571.lua | 26 ++++--------- official/c94655777.lua | 17 ++------- 10 files changed, 135 insertions(+), 270 deletions(-) diff --git a/official/c26400609.lua b/official/c26400609.lua index 9b0d63a5b0..6b4966e1f8 100644 --- a/official/c26400609.lua +++ b/official/c26400609.lua @@ -2,41 +2,41 @@ --Tidal, Dragon Ruler of Waterfalls local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) - --Send 1 monster from your Deck to the Graveyard + --Send 1 monster from your Deck to the GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.tgcost) + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_WATER)) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) - --Add 1 WATER Dragon-Type monster from your Deck to your hand + c:RegisterEffect(e3) + --Add 1 FIRE Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -48,62 +48,45 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.tgfilter(c) - return c:IsMonster() and c:IsAbleToGrave() -end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) --Excluding itself for a correct interaction with "Chasmatis, Dragon Ruler of Poles" - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end @@ -122,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c27415516.lua b/official/c27415516.lua index c0b8cdd6b5..3f3482c665 100644 --- a/official/c27415516.lua +++ b/official/c27415516.lua @@ -2,31 +2,19 @@ --Stream, Dragon Ruler of Droplets local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Tidal, Dragon Ruler of Waterfalls" from deck + --Special Summon 1 "Tidal, Dragon Ruler of Waterfalls" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_WATER)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) end s.listed_names={26400609} --"Tidal, Dragon Ruler of Waterfalls" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsCode(26400609) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c53797637.lua b/official/c53797637.lua index d6ce3a4bc2..d11b4cf571 100644 --- a/official/c53797637.lua +++ b/official/c53797637.lua @@ -2,31 +2,19 @@ --Burner, Dragon Ruler of Sparks local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Blaster, Dragon Ruler of Infernos" from deck + --Special Summon 1 "Blaster, Dragon Ruler of Infernos" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_FIRE)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) end s.listed_names={53804307}--"Blaster, Dragon Ruler of Infernos" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsCode(53804307) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Cannot attack + --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c53804307.lua b/official/c53804307.lua index 51886831e3..b216c6506b 100644 --- a/official/c53804307.lua +++ b/official/c53804307.lua @@ -2,41 +2,41 @@ --Blaster, Dragon Ruler of Infernos local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) --Destroy 1 card on the field local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.descost) + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_FIRE)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e3) --Add 1 FIRE Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) @@ -49,52 +49,37 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -122,4 +107,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c58201062.lua b/official/c58201062.lua index 5f7d68c1d4..9ce96afc02 100644 --- a/official/c58201062.lua +++ b/official/c58201062.lua @@ -10,10 +10,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_LIGHT)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) --Special Summon 1 "Chasmatis, Dragon Ruler of Auroras" from your GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,17 +29,6 @@ function s.initial_effect(c) end s.listed_series={SET_DRAGON_RULER} s.listed_names={id,4965193} --"Chasmatis, Dragon Ruler of Auroras" -function s.thcostfilter(c) - return (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.thfilter(c) return c:IsSetCard(SET_DRAGON_RULER) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end @@ -84,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c89185742.lua b/official/c89185742.lua index 1f1851f3c9..20a7e4bec9 100644 --- a/official/c89185742.lua +++ b/official/c89185742.lua @@ -2,31 +2,19 @@ --Lightning, Dragon Ruler of Drafts local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Tempest, Dragon Ruler of Storms" from deck + --Special Summon 1 "Tempest, Dragon Ruler of Storms" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_WIND)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) end s.listed_names={89399912} --"Tempest, Dragon Ruler of Storms" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsCode(89399912) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Cannot attack + --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c89399912.lua b/official/c89399912.lua index 224811ab18..24a2174d53 100644 --- a/official/c89399912.lua +++ b/official/c89399912.lua @@ -2,28 +2,28 @@ --Tempest, Dragon Ruler of Storms local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) --Add 1 Dragon monster from your Deck to your hand local e3=Effect.CreateEffect(c) @@ -32,11 +32,11 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.thdrgncost) - e3:SetTarget(s.thdrgntg) - e3:SetOperation(s.thdrgnop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) - --Add 1 WIND Dragon monster from your Deck to your hand + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_WIND)) + e3:SetTarget(s.dthtg) + e3:SetOperation(s.dthop) + c:RegisterEffect(e3) + --Add 1 WIND Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -44,83 +44,68 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_REMOVE) e4:SetCountLimit(1,id) - e4:SetTarget(s.thwindtg) - e4:SetOperation(s.thwindop) + e4:SetTarget(s.wdthtg) + e4:SetOperation(s.wdthop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.thdrgncost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.thdrgnfilter(c) +function s.dthfilter(c) return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end -function s.thdrgntg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thdrgnfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end +function s.dthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.dthfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.thdrgnop(e,tp,eg,ep,ev,re,r,rp) +function s.dthop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thdrgnfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.dthfilter,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.thwindfilter(c) +function s.wdthfilter(c) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand() end -function s.thwindtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thwindfilter,tp,LOCATION_DECK,0,1,nil) end +function s.wdthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.wdthfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.thwindop(e,tp,eg,ep,ev,re,r,rp) +function s.wdthop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thwindfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.wdthfilter,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 +end diff --git a/official/c90411554.lua b/official/c90411554.lua index 9e93950e7e..02397030cf 100644 --- a/official/c90411554.lua +++ b/official/c90411554.lua @@ -2,42 +2,42 @@ --Redox, Dragon Ruler of Boulders local s,id=GetID() function s.initial_effect(c) - --Special Summon this card from the hand or GY + --Special Summon this card from your hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) --Return this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1,id) - e2:SetCondition(s.retcon) - e2:SetTarget(s.rettg) - e2:SetOperation(s.retop) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) c:RegisterEffect(e2) - --Special Summon 1 monster from the GY + --Special Summon 1 monster from your GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.spcost) + e3:SetCost(DragonRuler.SelfDiscardToGraveCost(ATTRIBUTE_EARTH)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3,false,EFFECT_MARKER_DRAGON_RULER) - --Add 1 EARTH Dragon-Type monster from your Deck to your hand + c:RegisterEffect(e3) + --Add 1 FIRE Dragon monster from your Deck to your han local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -49,61 +49,43 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -function s.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsAbleToRemoveAsCost() +function s.spcostfilter(c) + return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local rg=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(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.hspop(e,tp,eg,ep,ev,re,r,rp) +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.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSpecialSummoned() -end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(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.retop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end end -function s.dfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + 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(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + 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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + 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.spop(e,tp,eg,ep,ev,re,r,rp) @@ -126,4 +108,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c91020571.lua b/official/c91020571.lua index 06f83e8178..42f71e4828 100644 --- a/official/c91020571.lua +++ b/official/c91020571.lua @@ -2,31 +2,19 @@ --Reactan, Dragon Ruler of Pebbles local s,id=GetID() function s.initial_effect(c) - --Special summon 1 "Redox, Dragon Ruler of Boulders" from deck + --Special Summon 1 "Redox, Dragon Ruler of Boulders" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_EARTH)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) -end -s.listed_names={90411554} --"Redox, Dragon Ruler of Boulders" -function s.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsDiscardable() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) + c:RegisterEffect(e1) end +s.listed_names={90411554} --"Redox, Dragon Ruler of Boulders" function s.spfilter(c,e,tp) return c:IsCode(90411554) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,16 +25,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c94655777.lua b/official/c94655777.lua index 83b66ddc4e..5c1365b41f 100644 --- a/official/c94655777.lua +++ b/official/c94655777.lua @@ -11,10 +11,10 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.rmspcost) + e1:SetCost(DragonRuler.SelfDiscardCost(ATTRIBUTE_DARK)) e1:SetTarget(s.rmsptg) e1:SetOperation(s.rmspop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DRAGON_RULER) + c:RegisterEffect(e1) --Special Summon 1 "Eclepsis, Dragon Ruler of Woes" from your GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -30,17 +30,6 @@ function s.initial_effect(c) end s.listed_series={SET_DRAGON_RULER} s.listed_names={id,30350202} --"Eclepsis, Dragon Ruler of Woes" -function s.rmcostfilter(c) - return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() -end -function s.rmspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end function s.rmspfilter(c,e,tp) return c:IsSetCard(SET_DRAGON_RULER) and c:IsFaceup() and c:IsCanBeEffectTarget(e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -109,4 +98,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end From d87d0e68b468a330cc500833fff79a72fb7ce1b4 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:47:51 +0800 Subject: [PATCH 115/165] Update c12081875.lua --- official/c12081875.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index d07ca49fc7..c31afc7014 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -32,7 +32,8 @@ function s.runfn(fn,eff,tp,chk) return not fn or fn(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,nil,REASON_EFFECT,PLAYER_NONE,chk) end function s.applyfilter(c,e,tp) - if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() and c:IsAbleToDeck() + if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() + and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))) then return false end for _,eff in ipairs({c:GetOwnEffects()}) do if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end @@ -42,7 +43,7 @@ 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|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() local effs={} local options={} for _,eff in ipairs({tc:GetOwnEffects()}) do @@ -55,27 +56,28 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) - local tg=te:GetTarget() - if tg then + local targ_fn=te:GetTarget() + if targ_fn then e:SetLabel(0) e:SetLabelObject(nil) - Duel.ClearTargetCard() - tc:CreateEffectRelation(e) - s.runfn(tg,e,tp,1) + s.runfn(targ_fn,e,tp,1) te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) Duel.ClearOperationInfo(0) end - e:SetLabelObject({tc,te}) + local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + e:SetLabelObject({tc,te,tg and tg:Clone() or nil}) + Duel.SetTargetCard(tc) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc,te=table.unpack(e:GetLabelObject()) + local tc,te,tg=table.unpack(e:GetLabelObject()) if not tc:IsRelateToEffect(e) then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) + if tg then Duel.ChangeTargetCard(ev,tg) end op(e,tp,eg,ep,ev,re,r,rp) end if tc:IsAbleToDeck() then From 730a78a0c3157db2646dc741012461512274bf05 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 13:24:04 +0300 Subject: [PATCH 116/165] "Tellarknight Constellar Caduceus" label fix + "Number C32: Shark Drake Veiss" update --- official/c49221191.lua | 66 ++++++++++++++++++------------------------ official/c58858807.lua | 2 ++ 2 files changed, 30 insertions(+), 38 deletions(-) diff --git a/official/c49221191.lua b/official/c49221191.lua index f2d9520071..fbd2fb0e8e 100644 --- a/official/c49221191.lua +++ b/official/c49221191.lua @@ -1,70 +1,60 @@ ---CNo.32 海咬龍シャーク・ドレイク・バイス +--CNo.32 海咬龍シャーク・ドレイク・バイス --Number C32: Shark Drake Veiss local s,id=GetID() function s.initial_effect(c) - --xyz summon c:EnableReviveLimit() + --Xyz Summon procedure: 4 Level 4 WATER monsters OR 1 "Number 32: Shark Drake" you control Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),4,4,s.ovfilter,aux.Stringid(id,0)) - --atk/def + --Make the ATK/DEF of 1 face-up monster on the field become 0 until the end of your turn local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(function(e,tp) return Duel.GetLP(tp)<=1000 and aux.StatChangeDamageStepCondition() end) + e1:SetCost(Cost.AND(s.atkdefcost,Cost.Detach(1))) + e1:SetTarget(s.atkdeftg) + e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) end s.xyz_number=32 -s.listed_names={65676461} +s.listed_names={65676461} --"Number 32: Shark Drake" function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65676461) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=1000 and aux.StatChangeDamageStepCondition() + return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65676461) and c:IsFaceup() end -function s.rfilter(c) +function s.atkdefcostfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) - and Duel.IsExistingTarget(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,c) + and Duel.IsExistingTarget(aux.OR(Card.HasNonZeroAttack,Card.HasNonZeroDefense),0,LOCATION_MZONE,LOCATION_MZONE,1,c) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) +function s.atkdefcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.atkdefcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.atkdefcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end -function s.filter(c) - return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0) +function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and (chkc:HasNonZeroAttack() or chkc:HasNonZeroDefense()) end + if chk==0 then return Duel.IsExistingTarget(aux.OR(Card.HasNonZeroAttack,Card.HasNonZeroDefense),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.OR(Card.HasNonZeroAttack,Card.HasNonZeroDefense),tp,LOCATION_MZONE,LOCATION_MZONE,1,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 s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local ct=Duel.IsTurnPlayer(1-tp) and 2 or 1 + --Its ATK/DEF become 0 until the end of your turn 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) - if Duel.IsTurnPlayer(1-tp) then - e1:SetReset(RESETS_STANDARD_PHASE_END,2) - else - e1:SetReset(RESETS_STANDARD_PHASE_END,1) - end + e1:SetReset(RESETS_STANDARD_PHASE_END,ct) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c58858807.lua b/official/c58858807.lua index f085798945..454b7ed686 100644 --- a/official/c58858807.lua +++ b/official/c58858807.lua @@ -109,6 +109,8 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end + eff:SetLabel(e:GetLabel()) + eff:SetLabelObject(e:GetLabelObject()) e:SetLabelObject(eff) Duel.ClearOperationInfo(0) end From 425780ffdfd42fb6c71a339cb45036d4af3c8b34 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 13:31:53 +0300 Subject: [PATCH 117/165] Update "Allure Palace (Anime)" to also use a cost table --- unofficial/c511310036.lua | 2 +- utility.lua | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/unofficial/c511310036.lua b/unofficial/c511310036.lua index 48d947dc79..61fbaeb6dc 100644 --- a/unofficial/c511310036.lua +++ b/unofficial/c511310036.lua @@ -58,7 +58,7 @@ function s.regop(e,tp) for allure_card in g:Iter() do local effs={allure_card:GetOwnEffects()} for _,eff in ipairs(effs) do - if eff:GetCost()==Cost.SelfToGrave and eff:GetCode()&(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)>0 then + if eff:HasSelfToGraveCost() and eff:GetCode()&(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)>0 then allure_card:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local condition=eff:GetCondition() --Ignition Effect version of the "Allure Queen" monster's Trigger Effect diff --git a/utility.lua b/utility.lua index 3bb4819e6a..81405ad330 100644 --- a/utility.lua +++ b/utility.lua @@ -1461,11 +1461,13 @@ function Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c:IsReleasable() end Duel.Release(c,REASON_COST) end +local self_tograve_costs={} function Cost.SelfToGrave(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToGraveAsCost() end Duel.SendtoGrave(c,REASON_COST) end +self_tograve_costs[Cost.SelfToGrave]=true function Cost.SelfToHand(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToHandAsCost() end @@ -1561,6 +1563,7 @@ local function cost_table_check(t) return function(eff) return t[eff:GetCost()] end end +Effect.HasSelfToGraveCost=cost_table_check(self_tograve_costs) Effect.HasSelfDiscardCost=cost_table_check(self_discard_costs) Effect.HasDetachCost=cost_table_check(detach_costs) @@ -1625,6 +1628,7 @@ function Cost.AND(...) for _,fn in ipairs(fns) do if detach_costs[fn] then detach_costs[full_cost]=true end if self_discard_costs[fn] then self_discard_costs[full_cost]=true end + if self_tograve_costs[fn] then self_tograve_costs[full_cost]=true end end return full_cost end @@ -2729,4 +2733,4 @@ Duel.LoadScript("proc_gemini.lua") Duel.LoadScript("proc_spirit.lua") Duel.LoadScript("proc_unofficial.lua") Duel.LoadScript("deprecated_functions.lua") -pcall(dofile,"init.lua") +pcall(dofile,"init.lua") \ No newline at end of file From cfbbba93083b8e27876101e08c95beb37e36e45f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 14:12:27 +0300 Subject: [PATCH 118/165] "Thunder Dragon Thunderstormech" updates --- official/c12081875.lua | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index c31afc7014..85544ab975 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -33,8 +33,7 @@ function s.runfn(fn,eff,tp,chk) end function s.applyfilter(c,e,tp) if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() - and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) - and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))) then return false end + and c:IsAbleToDeck() and c:IsFaceup()) then return false end for _,eff in ipairs({c:GetOwnEffects()}) do if eff:HasSelfDiscardCost() and s.runfn(eff:GetCondition(),eff,tp,0) and s.runfn(eff:GetTarget(),eff,tp,0) then return true end end @@ -43,7 +42,7 @@ 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|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectTarget(tp,s.applyfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() local effs={} local options={} for _,eff in ipairs({tc:GetOwnEffects()}) do @@ -56,49 +55,50 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) local targ_fn=te:GetTarget() if targ_fn then - e:SetLabel(0) - e:SetLabelObject(nil) s.runfn(targ_fn,e,tp,1) te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) Duel.ClearOperationInfo(0) end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - e:SetLabelObject({tc,te,tg and tg:Clone() or nil}) - Duel.SetTargetCard(tc) + e:SetLabelObject({tc,te}) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc,te,tg=table.unpack(e:GetLabelObject()) - if not tc:IsRelateToEffect(e) then return end + local tc,te=table.unpack(e:GetLabelObject()) + if not (tc:IsRelateToEffect(e) and te) then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) - if tg then Duel.ChangeTargetCard(ev,tg) end + local tg=Duel.GetTargetCards(e)-tc + if #tg>0 then Duel.ChangeTargetCard(ev,tg) end op(e,tp,eg,ep,ev,re,r,rp) end if tc:IsAbleToDeck() then - local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + local opt=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) or 0 Duel.BreakEffect() Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end + e:SetLabel(0) + e:SetLabelObject(nil) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_THUNDER) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) + return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.repcostfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_GRAVE,0,3,nil) end + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,nil) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,s.repcfilter,tp,LOCATION_GRAVE,0,3,3,nil) + local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,3,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file From 74240e67ab680e9378ce32eb32f034e88760f5f8 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 14:59:57 +0300 Subject: [PATCH 119/165] baby ruler cost should be "Cost.SelfDiscard" --- cards_specific_functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cards_specific_functions.lua b/cards_specific_functions.lua index 87f943428d..fe9950a261 100644 --- a/cards_specific_functions.lua +++ b/cards_specific_functions.lua @@ -1263,6 +1263,6 @@ do local function other_discard_filter(c) return (c:IsAttribute(attr) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() end - return Cost.AND(discard_with_other_cost(other_discard_filter),Cost.SelfDiscardToGrave) + return Cost.AND(discard_with_other_cost(other_discard_filter),Cost.SelfDiscard) end end From 5ace4d061fbf58e272f896bb9bca714bb5cc84cc Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 4 Jul 2025 15:22:53 +0300 Subject: [PATCH 120/165] DRulers smol updates --- official/c26400609.lua | 6 +++--- official/c4965193.lua | 11 +++++++---- official/c53804307.lua | 4 ++-- official/c89399912.lua | 5 +++-- official/c90411554.lua | 4 ++-- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/official/c26400609.lua b/official/c26400609.lua index 6b4966e1f8..d37cc9c166 100644 --- a/official/c26400609.lua +++ b/official/c26400609.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) c:RegisterEffect(e3) - --Add 1 FIRE Dragon monster from your Deck to your han + --Add 1 WATER Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -80,7 +80,7 @@ function s.rthop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - --Excluding itself for a correct interaction with "Chasmatis, Dragon Ruler of Poles" + --Excluding itself for a correct interaction with "Chasma, Dragon Ruler of Auroras" [04965193] if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end @@ -105,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c4965193.lua b/official/c4965193.lua index f175128800..407193bba3 100644 --- a/official/c4965193.lua +++ b/official/c4965193.lua @@ -57,7 +57,6 @@ function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) end local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] - e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) e:SetLabelObject(te) Duel.SendtoGrave(sc,REASON_COST) end @@ -65,8 +64,9 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local te=e:GetLabelObject() if chkc then return te and te:GetTarget() and te:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) end if chk==0 then return true end - e:SetLabel(0) - e:SetLabelObject(nil) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) local tg=te:GetTarget() if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) @@ -78,6 +78,7 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() + if not te then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) @@ -85,6 +86,8 @@ function s.applyop(e,tp,eg,ep,ev,re,r,rp) op(e,tp,eg,ep,ev,re,r,rp) end e:SetProperty(0) + e:SetLabel(0) + e:SetLabelObject(nil) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -105,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) 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/c53804307.lua b/official/c53804307.lua index b216c6506b..1ccf780970 100644 --- a/official/c53804307.lua +++ b/official/c53804307.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) - --Add 1 FIRE Dragon monster from your Deck to your han + --Add 1 FIRE Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -107,4 +107,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c89399912.lua b/official/c89399912.lua index 24a2174d53..dcbbe53d9a 100644 --- a/official/c89399912.lua +++ b/official/c89399912.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetTarget(s.dthtg) e3:SetOperation(s.dthop) c:RegisterEffect(e3) - --Add 1 WIND Dragon monster from your Deck to your han + --Add 1 WIND Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -83,6 +83,7 @@ function s.dthfilter(c) return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end function s.dthtg(e,tp,eg,ep,ev,re,r,rp,chk) + --Excluding itself for a correct interaction with "Chasma, Dragon Ruler of Auroras" [04965193] if chk==0 then return Duel.IsExistingMatchingCard(s.dthfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end @@ -108,4 +109,4 @@ function s.wdthop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c90411554.lua b/official/c90411554.lua index 02397030cf..c14362518a 100644 --- a/official/c90411554.lua +++ b/official/c90411554.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) - --Add 1 FIRE Dragon monster from your Deck to your han + --Add 1 EARTH Dragon monster from your Deck to your hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -108,4 +108,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file From 6686e5ccd95be8c4a256723d6a42a65fb9dd260b Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 01:20:55 +0300 Subject: [PATCH 121/165] Updated "Numeron Network" to use "EFFECT_OVERLAY_REMOVE_REPLACE" --- official/c41418852.lua | 71 +++++++++++++++++++++++++----------------- utility.lua | 21 +++++-------- 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/official/c41418852.lua b/official/c41418852.lua index d32298c8ec..b4a0f3ec74 100644 --- a/official/c41418852.lua +++ b/official/c41418852.lua @@ -4,60 +4,75 @@ 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) + --This effect becomes the effect of 1 "Numeron" Normal Spell when that card is activated local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.applycost) + e1:SetTarget(s.applytg) + e1:SetOperation(s.applyop) c:RegisterEffect(e1) - --Copy spell + --"Numeron" Xyz Monsters you control can activate effects without detaching material(s) local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,id) - e2:SetCost(s.cpcost) - e2:SetTarget(s.cptg) - e2:SetOperation(s.cpop) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + return (r&REASON_COST)>0 and re:IsActivated() + and re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(SET_NUMERON) + and ep==e:GetOwnerPlayer() and ev>=1 and rc:GetOverlayCount()>=ev-1 + end) + e2:SetOperation(function() Duel.Hint(HINT_CARD,0,id) return true end) c:RegisterEffect(e2) - --Make detaching cost optional for "Numeron" Xyz Monsters - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(id) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(1,0) - c:RegisterEffect(e3) end s.listed_series={SET_NUMERON} -function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end -function s.filter(c) - return c:IsNormalSpell() and c:IsSetCard(SET_NUMERON) and c:IsAbleToGraveAsCost() +function s.applyfilter(c) + return c:IsSetCard(SET_NUMERON) and c:IsNormalSpell() and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,false)~=nil end -function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) + return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_DECK,0,1,nil) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) - local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) - Duel.SendtoGrave(g,REASON_COST) + local sc=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + local te,ceg,cep,cev,cre,cr,crp=sc:CheckActivateEffect(false,true,true) + Duel.SendtoGrave(sc,REASON_COST) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) e:SetProperty(te:GetProperty()) local tg=te:GetTarget() - if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end + if tg then + tg(e,tp,ceg,cep,cev,cre,cr,crp,1) + end + te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) e:SetLabelObject(te) Duel.ClearOperationInfo(0) end -function s.cpop(e,tp,eg,ep,ev,re,r,rp) +function s.applyop(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() if not te then return end + 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 + if op then + op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) + end + e:SetLabel(0) + e:SetLabelObject(nil) end \ No newline at end of file diff --git a/utility.lua b/utility.lua index 81405ad330..de2069cb7d 100644 --- a/utility.lua +++ b/utility.lua @@ -1521,10 +1521,11 @@ end local detach_costs={} function Cost.Detach(min,max,op) max=max or min + + local min_type=type(min) + local max_type=type(max) do --Perform some sanity checks, simplifies debugging - local min_type=type(min) - local max_type=type(max) local op_type=type(op) if min_type~="number" and min_type~="function" then error("Parameter 1 should be an Integer|function",2) @@ -1538,19 +1539,11 @@ function Cost.Detach(min,max,op) end local function cost_func(e,tp,eg,ep,ev,re,r,rp,chk) - if min_type=="function" then min=min(e,tp) end - if max_type=="function" then max=max(e,tp) end - local c=e:GetHandler() - local nn=c:IsSetCard(SET_NUMERON) and c:IsType(TYPE_XYZ) and Duel.IsPlayerAffectedByEffect(tp,CARD_NUMERON_NETWORK) - local crm=c:CheckRemoveOverlayCard(tp,min,REASON_COST) - if chk==0 then return (nn and c:IsLocation(LOCATION_MZONE)) or crm end - if nn and (not crm or Duel.SelectYesNo(tp,aux.Stringid(CARD_NUMERON_NETWORK,1))) then - --Do not execute `op`, hint at "Numeron Network" being applied - return Duel.Hint(HINT_CARD,tp,CARD_NUMERON_NETWORK) - end - - if c:RemoveOverlayCard(tp,min,max,REASON_COST)>0 and op then + local min_count=min_type=="function" and min(e,tp) or min + local max_count=max_type=="function" and max(e,tp) or max + if chk==0 then return min_count>0 and c:CheckRemoveOverlayCard(tp,min_count,REASON_COST) end + if c:RemoveOverlayCard(tp,min_count,max_count,REASON_COST)>0 and op then op(e,Duel.GetOperatedGroup()) end end From 2e11f05898d5a6acc4344eecf50a9279427010bf Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 01:28:28 +0300 Subject: [PATCH 122/165] Update some anime cards to use "Cost.Detach" --- official/c41418852.lua | 10 +- unofficial/c511001363.lua | 213 ++++++++++++++++++++------------------ unofficial/c511001429.lua | 15 ++- unofficial/c511001659.lua | 66 +++++------- unofficial/c511002001.lua | 51 ++++----- unofficial/c511002762.lua | 34 +++--- unofficial/c511002855.lua | 39 +++---- unofficial/c511002873.lua | 87 ++++++++-------- unofficial/c511003219.lua | 12 +-- unofficial/c511009340.lua | 21 ++-- unofficial/c511009480.lua | 28 ++--- unofficial/c511009567.lua | 14 +-- unofficial/c511600284.lua | 23 ++-- unofficial/c513000059.lua | 25 ++--- 14 files changed, 302 insertions(+), 336 deletions(-) diff --git a/official/c41418852.lua b/official/c41418852.lua index b4a0f3ec74..93d411afcf 100644 --- a/official/c41418852.lua +++ b/official/c41418852.lua @@ -24,11 +24,11 @@ function s.initial_effect(c) e2:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) e2:SetRange(LOCATION_FZONE) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return (r&REASON_COST)>0 and re:IsActivated() - and re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(SET_NUMERON) - and ep==e:GetOwnerPlayer() and ev>=1 and rc:GetOverlayCount()>=ev-1 - end) + local rc=re:GetHandler() + return (r&REASON_COST)>0 and re:IsActivated() + and re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(SET_NUMERON) + and ep==e:GetOwnerPlayer() and ev>=1 and rc:GetOverlayCount()>=ev-1 + end) e2:SetOperation(function() Duel.Hint(HINT_CARD,0,id) return true end) c:RegisterEffect(e2) end diff --git a/unofficial/c511001363.lua b/unofficial/c511001363.lua index 0842a5bbc1..57e7bc497c 100644 --- a/unofficial/c511001363.lua +++ b/unofficial/c511001363.lua @@ -1,123 +1,132 @@ ---CX 冀望皇バリアン (Anime) +--CX 冀望皇バリアン (Anime) --CXyz Barian Hope (Anime) --Rescripted by Larry126 local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,3,nil,nil,Xyz.InfiniteMats) c:EnableReviveLimit() + --Xyz Summon procedure: 3+ Level 7 monsters + Xyz.AddProcedure(c,nil,7,3,nil,nil,Xyz.InfiniteMats) + --For this card's Xyz Summon, you can treat all "Number C10X" Xyz Monsters on the field as Level 7 + local e0a=Effect.CreateEffect(c) + e0a:SetType(EFFECT_TYPE_FIELD) + e0a:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e0a:SetCode(EFFECT_XYZ_MATERIAL) + e0a:SetRange(0xff&~LOCATION_MZONE) + e0a:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e0a:SetTarget(s.xyztg) + e0a:SetValue(function(e,ec,rc,tp) return rc==e:GetHandler() end) + c:RegisterEffect(e0a) + local e0b=e0a:Clone() + e0b:SetCode(EFFECT_XYZ_LEVEL) + e0b:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) + c:RegisterEffect(e0b) + --This card's ATK is equal to the number of Xyz Materials attached to it x 1000 local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_XYZ_MATERIAL) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(0xff&~LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.xyztg) - e1:SetValue(function(e,ec,rc,tp) return rc==e:GetHandler() end) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,ec) return ec:GetOverlayCount()*1000 end) c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_XYZ_LEVEL) - e2:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) + --Activate the effect of 1 Xyz Monster attached to this card that activates by detaching its own Xyz Material(s) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(s.copycost) + e2:SetTarget(s.copytg) + e2:SetOperation(s.copyop) c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(function(e,ec) return ec:GetOverlayCount()*1000 end) - c:RegisterEffect(e3) - --copy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(id) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - c:RegisterEffect(e4) - aux.GlobalCheck(s,function() - --Copy - local ge1=Effect.GlobalEffect() - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ADJUST) - ge1:SetCondition(s.con) - ge1:SetOperation(s.op) - Duel.RegisterEffect(ge1,0) - end) end s.listed_series={SET_NUMBER_C} -function s.cfilter(c) - return c:IsHasEffect(511002571) and c:GetFlagEffect(5110013630)==0 -end -function s.con(e) - return Duel.IsExistingMatchingCard(s.cfilter,0,LOCATION_ALL,LOCATION_ALL,1,nil) +function s.xyztg(e,c) + local no=c.xyz_number + return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(SET_NUMBER_C) end -function s.op(e) - local g=Duel.GetMatchingGroup(s.cfilter,0,LOCATION_ALL,LOCATION_ALL,nil) - for c in aux.Next(g) do - local effs={c:GetCardEffect(511002571)} - for _,eff in ipairs(effs) do - local te=eff:GetLabelObject() - if te:GetCode()&511001822==511001822 or te:GetLabel()==511001822 then te=te:GetLabelObject() end - local resetflag,resetcount=te:GetReset() - local rm,max,code,flag,hopt=te:GetCountLimit() - local prop1,prop2=te:GetProperty() - local e1=Effect.CreateEffect(c) - if te:GetDescription() then - e1:SetDescription(te:GetDescription()) - end - e1:SetLabelObject(te) - e1:SetType(EFFECT_TYPE_XMATERIAL+te:GetType()&(~EFFECT_TYPE_SINGLE)) - if te:GetCode()>0 then - e1:SetCode(te:GetCode()) - end - e1:SetProperty(prop1|EFFECT_FLAG_CARD_TARGET,prop2) - e1:SetCondition(s.copycon(c)) - e1:SetCost(s.copycost(c)) - if max>0 then - e1:SetCountLimit(max,{code,hopt},flag) - end - if te:GetTarget() then - e1:SetTarget(te:GetTarget()) - end - if te:GetOperation() then - e1:SetOperation(te:GetOperation()) +function s.copyfilter(c,e,tp) + if not c:IsType(TYPE_XYZ) or c:HasFlagEffect(id) then return false end + local effs={c:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:HasDetachCost() then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (tg==nil or tg(eff,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) then + return true end - if resetflag>0 and resetcount>0 then - e1:SetReset(resetflag,resetcount) - elseif resetflag>0 then - e1:SetReset(resetflag) - end - c:RegisterEffect(e1,true) - c:RegisterFlagEffect(5110013630,resetflag,prop1,resetcount) end end + return false end -function s.copycon(oc) - return function(e,tp,eg,ep,ev,re,r,rp) - local con=e:GetLabelObject():GetCondition() - return e:GetHandler():IsHasEffect(id) and Duel.IsTurnPlayer(tp) - and oc:GetFlagEffect(id)==0 and (not con or con(e,tp,eg,ep,ev,re,r,rp)) +function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local b1=c:CheckRemoveOverlayCard(tp,1,REASON_COST) + local b2=Duel.CheckLPCost(tp,400) + if chk==0 then return (b1 or b2) and c:GetOverlayGroup():IsExists(s.copyfilter,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) + local sc=c:GetOverlayGroup():FilterSelect(tp,s.copyfilter,1,1,nil,e,tp):GetFirst() + Duel.Hint(HINT_CARD,0,sc:GetOriginalCodeRule()) + sc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + local op=Duel.SelectEffect(tp,{b1,aux.Stringid(id,2)},{b2,aux.Stringid(id,3)}) + if op==1 then + Duel.SendtoGrave(sc,REASON_COST) + else + Duel.PayLPCost(tp,400) end + local available_effs={} + local effs={sc:GetOwnEffects()} + for _,eff in ipairs(effs) do + if eff:HasDetachCost() then + local con=eff:GetCondition() + local tg=eff:GetTarget() + if (con==nil or con(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) + and (tg==nil or tg(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,0)) then + table.insert(available_effs,eff) + end + end + end + e:SetLabelObject(available_effs) end -function s.copycost(oc) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local a=c:CheckRemoveOverlayCard(tp,1,REASON_COST) - local b=Duel.CheckLPCost(tp,400) - if chk==0 then return a or b end - Duel.Hint(HINT_CARD,0,oc:GetOriginalCode()) - Duel.SetTargetCard(oc) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local op=Duel.SelectEffect(tp,{a,aux.Stringid(id,1)},{b,aux.Stringid(id,2)}) - if op==1 then - Duel.SendtoGrave(oc,REASON_COST) - else - Duel.PayLPCost(tp,400) +function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local eff=e:GetLabelObject() + return eff and eff:GetTarget() and eff:GetTarget()(e,tp,eg,ep,ev,re,r,rp,0,chkc) + end + if chk==0 then return true end + local eff=nil + local available_effs=e:GetLabelObject() + if #available_effs>1 then + local available_effs_desc={} + for _,eff in ipairs(available_effs) do + table.insert(available_effs_desc,eff:GetDescription()) end - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + 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()) + e:SetLabel(eff:GetLabel()) + e:SetLabelObject(eff:GetLabelObject()) + e:SetProperty(eff:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + local tg=eff:GetTarget() + if tg then + tg(e,tp,eg,ep,ev,re,r,rp,1) + end + eff:SetLabel(e:GetLabel()) + eff:SetLabelObject(e:GetLabelObject()) + e:SetLabelObject(eff) + Duel.ClearOperationInfo(0) end -function s.xyztg(e,c) - local no=c.xyz_number - return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(SET_NUMBER_C) +function s.copyop(e,tp,eg,ep,ev,re,r,rp) + local eff=e:GetLabelObject() + if not eff 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 \ No newline at end of file diff --git a/unofficial/c511001429.lua b/unofficial/c511001429.lua index 4a0c62be17..d9c213d614 100644 --- a/unofficial/c511001429.lua +++ b/unofficial/c511001429.lua @@ -5,7 +5,7 @@ Duel.LoadCardScript("c67173574.lua") local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 4 Level 5 LIGHT monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,4) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,49678559) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tg) e2:SetOperation(s.op) - --indes + --Make this card unable to be destroyed by that battle or effect and inflict damage to your opponent equal to this card's ATK local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DAMAGE) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(s.indescost) + e3:SetCost(Cost.Detach(s.indescost)) e3:SetTarget(s.indestg) e3:SetOperation(s.indesop) local e4=e3:Clone() @@ -127,11 +127,8 @@ function s.indescon2(e,tp,eg,ep,ev,re,r,rp) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg and tg:IsContains(e:GetHandler()) end -function s.indescost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.indescost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.indestg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -158,4 +155,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,c:GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/unofficial/c511001659.lua b/unofficial/c511001659.lua index 8a90fc4844..1a4fa73788 100644 --- a/unofficial/c511001659.lua +++ b/unofficial/c511001659.lua @@ -3,18 +3,18 @@ Duel.LoadCardScript("c32559361.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,10,3) c:EnableReviveLimit() + --Xyz Summon: 3 Level 10 monsters + Xyz.AddProcedure(c,nil,10,3) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,1992816) - --battle indestructable + --Cannot be destroyed by battle except with "Number" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) c:RegisterEffect(e1) - --damage + --Inflict 500 damage to your opponent for each Xyz Material attached to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DAMAGE) @@ -25,32 +25,32 @@ function s.initial_effect(c) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) - --damage2 + --Inflict 800 damage to your opponent for each Xyz Material detached to activate this effect local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.damcost) + e3:SetCost(Cost.Detach(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) e3:SetTarget(s.damtg2) e3:SetOperation(s.damop2) c:RegisterEffect(e3) - --material + --Attach an opponent's monster this card battles to it as material local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_BATTLED) - e4:SetTarget(s.target) - e4:SetOperation(s.operation) - --atk limit + e4:SetTarget(s.attachtg) + e4:SetOperation(s.attachop) + --While this card has Xyz Material, your opponent cannot target monsters for attacks, except this one local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD) e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e5:SetRange(LOCATION_MZONE) e5:SetTargetRange(0,LOCATION_MZONE) - e5:SetCondition(s.atcon) - e5:SetValue(s.atlimit) + e5:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e5:SetValue(function(e,c) return c~=e:GetHandler() end) local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_RANKUP_EFFECT) @@ -61,24 +61,11 @@ function s.initial_effect(c) c:RegisterEffect(e7) end s.listed_series={SET_NUMBER} -s.listed_names={1992816} +s.listed_names={1992816} --"Number 9: Dyson Sphere" s.xyz_number=9 -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() - and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsOnField() end -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then - Duel.Overlay(c,tc,true) - end -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetOverlayCount()>0 end local ct=e:GetHandler():GetOverlayCount() + if chk==0 then return ct>0 end Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) end @@ -87,12 +74,8 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetHandler():GetOverlayCount() Duel.Damage(p,ct*500,REASON_EFFECT) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=e:GetHandler():GetOverlayGroup() - local ct=#g - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(ct) +function s.damcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -105,9 +88,16 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) end -function s.atcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function s.atlimit(e,c) - return c~=e:GetHandler() +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local tc=c:GetBattleTarget() + if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() + and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsOnField() end end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=c:GetBattleTarget() + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then + Duel.Overlay(c,tc,true) + end +end \ No newline at end of file diff --git a/unofficial/c511002001.lua b/unofficial/c511002001.lua index abd75423f7..fba675a47d 100644 --- a/unofficial/c511002001.lua +++ b/unofficial/c511002001.lua @@ -1,51 +1,52 @@ ---SNo.39 希望皇ホープONE +--SNo.39 希望皇ホープONE (Manga) +--Number S39: Utopia Prime (Manga) Duel.LoadCardScript("c86532744.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(86532744,1)) c:EnableReviveLimit() - --Banish + --Xyz Summon procedure: 3 Level 4 monsters OR 1 "Number 39: Utopia" you control + Xyz.AddProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(id,0)) + --Cannot be destroyed by battle except with "Number" monsters + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(function(e,c) return not c:IsSetCard(SET_NUMBER) end) + c:RegisterEffect(e2) + --Banish all monsters your opponent controls, and if you do, inflict damage to your opponent equal to the combined ATK of the banished monsters local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(95100063,0)) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCost(Cost.AND(Cost.Detach(s.detachcost),s.lpcost)) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(s.indes) - c:RegisterEffect(e2) end s.xyz_number=39 +s.listed_names={84013237} --"Number 39: Utopia" +s.listed_series={SET_NUMBER} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) + return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) and c:IsFaceup() +end +function s.detachcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetLP(tp)>1 end - Duel.SendtoGrave(c:GetOverlayGroup(),REASON_COST) +function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLP(tp)>1 end Duel.SetLP(tp,1) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,#sg,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.rmop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 then local sum=Duel.GetOperatedGroup():GetSum(Card.GetAttack) Duel.Damage(1-tp,sum,REASON_EFFECT) end -end -function s.indes(e,c) - return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511002762.lua b/unofficial/c511002762.lua index c8e21e8c96..eb0d36e6f2 100644 --- a/unofficial/c511002762.lua +++ b/unofficial/c511002762.lua @@ -1,40 +1,38 @@ --H-C エクスカリバー +--Heroic Champion - Excalibur (Anime) local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) c:EnableReviveLimit() - -- + --Xyz Summon procedure: 2 Level 4 Warrior monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) + --This card cannot declare an attack unless your LP are 500 or less local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetCondition(s.atkcon) + e1:SetCondition(function(e) return Duel.GetLP(e:GetHandlerPlayer())>500 end) c:RegisterEffect(e1) - --atkup + --Double this card's ATK until the end of the Battle Phase local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95486586,0)) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) - e2:SetCost(s.cost) - e2:SetOperation(s.op) + e2:SetCost(Cost.Detach(s.atkcost)) + e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=e:GetHandler():GetOverlayGroup() - Duel.SendtoGrave(g,REASON_COST) +function s.atkcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end -function s.op(e,tp,eg,ep,ev,re,r,rp) +function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card's ATK is doubled, until the end of the Battle Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end -function s.atkcon(e) - return Duel.GetLP(e:GetHandlerPlayer())>500 -end +end \ No newline at end of file diff --git a/unofficial/c511002855.lua b/unofficial/c511002855.lua index e7217c27c5..aadeadc7e0 100644 --- a/unofficial/c511002855.lua +++ b/unofficial/c511002855.lua @@ -2,30 +2,31 @@ --CXyz Coach Lord Ultimatrainer (Anime) local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,9,4) c:EnableReviveLimit() + --Xyz Summon procedure: 4 Level 9 monsters + Xyz.AddProcedure(c,nil,9,4) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,30741334) - --negate + --Make this card become unaffected by a monster effect local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.uncon) e1:SetOperation(s.unop) c:RegisterEffect(e1) - --draw + --Your opponent draws cards equal to the number of Xyz Materials detached local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE) - e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCondition(aux.bdocon) + e2:SetCost(Cost.Detach(1,s.cost,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) local e3=Effect.CreateEffect(c) @@ -34,7 +35,7 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_names={30741334} +s.listed_names={30741334} --"Coach King Giantrainer" function s.uncon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not re:IsActiveType(TYPE_MONSTER) then return false end @@ -86,26 +87,16 @@ function s.unop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetValue(function(e,te) return te:IsMonsterEffect() end) e2:SetReset(RESET_CHAIN) - e2:SetValue(s.efilter) c:RegisterEffect(e2) end end -function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST) - local ct=Duel.GetOperatedGroup():GetCount() - e:SetLabel(ct) +function s.cost(e,tp) + return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(e:GetLabel()) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel()) @@ -132,4 +123,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.BreakEffect() Duel.SendtoGrave(sg,REASON_EFFECT) Duel.ShuffleHand(1-tp) -end +end \ No newline at end of file diff --git a/unofficial/c511002873.lua b/unofficial/c511002873.lua index 4fbd672b55..89bc5b45f6 100644 --- a/unofficial/c511002873.lua +++ b/unofficial/c511002873.lua @@ -1,50 +1,50 @@ ---No.58 Burner visor +--No.58 炎圧鬼バーナー・バイサー (Anime) +--Number 58: Burner Visor (Anime) Duel.LoadCardScript("c93108839.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,2) c:EnableReviveLimit() - --equip + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Cannot be destroyed by battle except with "Number" monsters local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93108839,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.eqcost) - e1:SetTarget(s.eqtg) - e1:SetOperation(s.eqop) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(function(e,c) return not c:IsSetCard(SET_NUMBER) end) c:RegisterEffect(e1) - --direct + --Equip this card to 1 face-up monster you control local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.Detach(s.eqcost)) + e2:SetTarget(s.eqtg) + e2:SetOperation(s.eqop) c:RegisterEffect(e2) - --damage + --The equipped monster can attack directly local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93108839,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(s.damcon) - e3:SetCost(s.damcost) - e3:SetTarget(s.damtg) - e3:SetOperation(s.damop) + e3:SetType(EFFECT_TYPE_EQUIP) + e3:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e3) - --battle indestructable + --Inflict 500 damage to your opponent local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetValue(s.indes) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e4:SetRange(LOCATION_SZONE) + e4:SetCondition(s.damcon) + e4:SetCost(s.damcost) + e4:SetTarget(s.damtg) + e4:SetOperation(s.damop) c:RegisterEffect(e4) end s.xyz_number=58 -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=e:GetHandler():GetOverlayGroup() - Duel.SendtoGrave(g,REASON_COST) +s.listed_series={SET_NUMBER} +function s.eqcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end @@ -64,14 +64,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end if not Duel.Equip(tp,c,tc,false) then return end --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(s.eqlimit) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) - e4:SetLabelObject(tc) - c:RegisterEffect(e4) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetValue(s.eqlimit) + e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetLabelObject(tc) + c:RegisterEffect(e1) end function s.eqlimit(e,c) return c==e:GetLabelObject() @@ -93,7 +93,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end -function s.indes(e,c) - return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511003219.lua b/unofficial/c511003219.lua index a11dc2d5da..fa7d788190 100644 --- a/unofficial/c511003219.lua +++ b/unofficial/c511003219.lua @@ -3,9 +3,9 @@ --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,2) c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) --Change battle position/attack target local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_CONFIRM) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(s.cost)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -56,10 +56,8 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()~=c and Duel.GetAttackTarget() and Duel.GetAttackTarget()~=c end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.SendtoGrave(c:GetOverlayGroup(),REASON_COST) +function s.cost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end diff --git a/unofficial/c511009340.lua b/unofficial/c511009340.lua index 7e668424ce..505f69fcbe 100644 --- a/unofficial/c511009340.lua +++ b/unofficial/c511009340.lua @@ -4,8 +4,9 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) + --Xyz Summon procedure: 2 Level 7 Dragon monstes Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),7,2) - --pendulum set + --Place 1 Pendulum Monster from your Deck in your Pendulum Zone local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -14,26 +15,26 @@ function s.initial_effect(c) e1:SetTarget(s.pctg) e1:SetOperation(s.pcop) c:RegisterEffect(e1) - --material check + --Material check local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_MATERIAL_CHECK) e2:SetValue(s.valcheck) e2:SetLabelObject(e2) c:RegisterEffect(e2) - --extra att + --This card can make a second attack during each Battle Phase local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_EXTRA_ATTACK) e3:SetValue(1) - --destroy + --Negate the effects of all face-up Spells/Traps on the field, and if you do, destroy as many other cards on the field as possible, then this card gains 200 ATK for each card destroyed until the end of this turn local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.descost) + e4:SetCost(Cost.Detach(s.descost)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) local e5=Effect.CreateEffect(c) @@ -48,7 +49,7 @@ function s.initial_effect(c) local e6=e5:Clone() e6:SetLabelObject(e4) c:RegisterEffect(e6) - --To Pendulum + --Destroy as many cards in your Pendulum Zones as possible (min. 1), and if you do, place this card in your Pendulum Zone local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(id,2)) e7:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) @@ -75,10 +76,8 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetOverlayCount() - if chk==0 then return ct>0 and e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.descost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.negfilter(c) return c:IsSpellTrap() and c:IsFaceup() and not c:IsDisabled() @@ -150,4 +149,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index cdd8f2c453..fc3b116b58 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -1,36 +1,37 @@ --ギャラクシーアイズ FA・フォトン・ドラゴン (Manga) ---Galaxy Eyes Full Armor Photon Dragon (Manga) +--Galaxy-Eyes Full Armor Photon Dragon (Manga) Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) local s,id=GetID() function s.initial_effect(c) - Xyz.AddProcedure(c,nil,8,3) c:EnableReviveLimit() - --xyz summon + --Xyz Summon procedure: 3 Level 8 monsters + Xyz.AddProcedure(c,nil,8,3) + --You can also Xyz Summon this card by Tributing a "Galaxy-Eyes Photon Dragon" you control that is equipped with 2 Equip Spells and using those Equip Spells as the Xyz Materials local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_EXTRA) e1:SetCondition(s.xyzcon) e1:SetTarget(s.xyztg) e1:SetOperation(s.xyzop) e1:SetValue(SUMMON_TYPE_XYZ) c:RegisterEffect(e1) - --destroy + --Destroy 1 monster your opponent controls local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.descon) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) - --material + --Attach any number of equip cards equipped to this card as materials local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -41,7 +42,7 @@ function s.initial_effect(c) e3:SetTarget(s.mttg) e3:SetOperation(s.mtop) c:RegisterEffect(e3) - --banish + --Banish both that opponent's monster and this card local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_DISABLE) @@ -50,7 +51,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_CHAINING) e4:SetCondition(s.rmcon) - e4:SetCost(s.rmcost) + e4:SetCost(Cost.Detach(s.rmcost)) e4:SetTarget(s.rmtg) e4:SetOperation(s.rmop) c:RegisterEffect(e4) @@ -135,9 +136,8 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,e:GetHandler():GetOverlayGroup():GetCount(),e:GetHandler():GetOverlayGroup():GetCount(),REASON_COST) +function s.rmcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -192,4 +192,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index 234901353a..c3f6fefb92 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rtgtg) e1:SetOperation(s.rtgop) - c:RegisterEffect(e1) + c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) --Allow 1 "Raidraptor" monster to attack multiple times in a row local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(s.atkcost)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -48,12 +48,8 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ac and ac:IsRelateToBattle() and ac:IsSetCard(SET_RAIDRAPTOR) and ac:IsControler(tp) and ac:CanChainAttack(ac:GetAttackAnnouncedCount()+1,true) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - local g=c:GetOverlayGroup() - Duel.SendtoGrave(g,REASON_COST) +function s.atkcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.rmfilter(c) return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() @@ -106,4 +102,4 @@ function s.chainatkop(c,ac) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ac:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/unofficial/c511600284.lua b/unofficial/c511600284.lua index bee226a4fc..056478a9fb 100644 --- a/unofficial/c511600284.lua +++ b/unofficial/c511600284.lua @@ -4,12 +4,12 @@ Duel.LoadCardScript("c41309158.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,3) c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 4 monsters + Xyz.AddProcedure(c,nil,4,3) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,15914410) - --damage + --Inflict 500 damage to your opponent for each Xyz Material detached local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DAMAGE) @@ -17,8 +17,8 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.damcon) - e1:SetCost(s.damcost) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e1:SetCost(Cost.Detach(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) local e2=Effect.CreateEffect(c) @@ -28,15 +28,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={15914410} -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) - e:SetLabel(ct) +function s.damcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -48,4 +41,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index d3a38eff89..f8ad0392ab 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -4,18 +4,18 @@ Duel.LoadCardScript("c12744567.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,5,3) c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 5 monsters + Xyz.AddProcedure(c,nil,5,3) --Rank Up Check aux.EnableCheckRankUp(c,nil,nil,48739166) - --battle indestructable + --Cannot be destroyed by battle except with "Number" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) c:RegisterEffect(e1) - --spsummon + --Special Summon this card from your GY, and if you do, gain LP equal to its original ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - --material + --Attach 1 monster your opponent controls to this card as material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_IGNITION) @@ -34,14 +34,14 @@ function s.initial_effect(c) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) - --spsummon2 + --Special Summon 1 "Number 101: Silent Honor ARK" from your GY local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e4) - e4:SetCost(s.spcost) + e4:SetCost(Cost.Detach(s.spcost) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) local e5=Effect.CreateEffect(c) @@ -88,11 +88,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.spcost(e,tp) + return #e:GetHandler():GetOverlayGroup() end function s.spfilter(c,e,tp) return c:IsCode(48739166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -110,4 +107,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file From 1f922a50327d7723b25dcee20d38a22dacbb2b8a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 01:42:09 +0300 Subject: [PATCH 123/165] Use "Card.GetOverlayCount" --- unofficial/c511001429.lua | 5 +---- unofficial/c511001659.lua | 2 +- unofficial/c511002001.lua | 5 +---- unofficial/c511002762.lua | 5 +---- unofficial/c511002855.lua | 5 +---- unofficial/c511002873.lua | 5 +---- unofficial/c511003219.lua | 5 +---- unofficial/c511009340.lua | 5 +---- unofficial/c511009480.lua | 5 +---- unofficial/c511009567.lua | 5 +---- unofficial/c511600284.lua | 2 +- unofficial/c513000059.lua | 5 +---- 12 files changed, 12 insertions(+), 42 deletions(-) diff --git a/unofficial/c511001429.lua b/unofficial/c511001429.lua index d9c213d614..1630f90506 100644 --- a/unofficial/c511001429.lua +++ b/unofficial/c511001429.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(Cost.Detach(s.indescost)) + e3:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e3:SetTarget(s.indestg) e3:SetOperation(s.indesop) local e4=e3:Clone() @@ -127,9 +127,6 @@ function s.indescon2(e,tp,eg,ep,ev,re,r,rp) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg and tg:IsContains(e:GetHandler()) end -function s.indescost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.indestg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local atk=e:GetHandler():GetAttack() diff --git a/unofficial/c511001659.lua b/unofficial/c511001659.lua index 1a4fa73788..8333e211ac 100644 --- a/unofficial/c511001659.lua +++ b/unofficial/c511001659.lua @@ -75,7 +75,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,ct*500,REASON_EFFECT) end function s.damcost(e,tp) - return #e:GetHandler():GetOverlayGroup() + return e:GetHandler():GetOverlayCount() end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/unofficial/c511002001.lua b/unofficial/c511002001.lua index fba675a47d..65013443ff 100644 --- a/unofficial/c511002001.lua +++ b/unofficial/c511002001.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(s.detachcost),s.lpcost)) + e1:SetCost(Cost.AND(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end),s.lpcost)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) @@ -30,9 +30,6 @@ s.listed_series={SET_NUMBER} function s.ovfilter(c,tp,lc) return c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,84013237) and c:IsFaceup() end -function s.detachcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(tp)>1 end Duel.SetLP(tp,1) diff --git a/unofficial/c511002762.lua b/unofficial/c511002762.lua index eb0d36e6f2..3a4b734a55 100644 --- a/unofficial/c511002762.lua +++ b/unofficial/c511002762.lua @@ -17,13 +17,10 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) - e2:SetCost(Cost.Detach(s.atkcost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.atkcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002855.lua b/unofficial/c511002855.lua index aadeadc7e0..6379721e20 100644 --- a/unofficial/c511002855.lua +++ b/unofficial/c511002855.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(aux.bdocon) - e2:SetCost(Cost.Detach(1,s.cost,function(e,og) e:SetLabel(#og) end)) + e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) local e3=Effect.CreateEffect(c) @@ -92,9 +92,6 @@ function s.unop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -function s.cost(e,tp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end Duel.SetTargetPlayer(1-tp) diff --git a/unofficial/c511002873.lua b/unofficial/c511002873.lua index 89bc5b45f6..ff382f99ee 100644 --- a/unofficial/c511002873.lua +++ b/unofficial/c511002873.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(s.eqcost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) @@ -43,9 +43,6 @@ function s.initial_effect(c) end s.xyz_number=58 s.listed_series={SET_NUMBER} -function s.eqcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 diff --git a/unofficial/c511003219.lua b/unofficial/c511003219.lua index fa7d788190..3140a49299 100644 --- a/unofficial/c511003219.lua +++ b/unofficial/c511003219.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_CONFIRM) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(s.cost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -56,9 +56,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()~=c and Duel.GetAttackTarget() and Duel.GetAttackTarget()~=c end -function s.cost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end end diff --git a/unofficial/c511009340.lua b/unofficial/c511009340.lua index 505f69fcbe..4dc483a115 100644 --- a/unofficial/c511009340.lua +++ b/unofficial/c511009340.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(s.descost)) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) local e5=Effect.CreateEffect(c) @@ -76,9 +76,6 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end -function s.descost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.negfilter(c) return c:IsSpellTrap() and c:IsFaceup() and not c:IsDisabled() end diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index fc3b116b58..c46b36e363 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_CHAINING) e4:SetCondition(s.rmcon) - e4:SetCost(Cost.Detach(s.rmcost)) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.rmtg) e4:SetOperation(s.rmop) c:RegisterEffect(e4) @@ -136,9 +136,6 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp end -function s.rmcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end local c=e:GetHandler() diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index c3f6fefb92..4126724546 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) - e2:SetCost(Cost.Detach(s.atkcost)) + e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -48,9 +48,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ac and ac:IsRelateToBattle() and ac:IsSetCard(SET_RAIDRAPTOR) and ac:IsControler(tp) and ac:CanChainAttack(ac:GetAttackAnnouncedCount()+1,true) end -function s.atkcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.rmfilter(c) return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() end diff --git a/unofficial/c511600284.lua b/unofficial/c511600284.lua index 056478a9fb..a153e0037d 100644 --- a/unofficial/c511600284.lua +++ b/unofficial/c511600284.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) end s.listed_names={15914410} function s.damcost(e,tp) - return #e:GetHandler():GetOverlayGroup() + return e:GetHandler():GetOverlayCount() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index f8ad0392ab..6ace9e9797 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e4) - e4:SetCost(Cost.Detach(s.spcost) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) local e5=Effect.CreateEffect(c) @@ -88,9 +88,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end end -function s.spcost(e,tp) - return #e:GetHandler():GetOverlayGroup() -end function s.spfilter(c,e,tp) return c:IsCode(48739166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end From 2ab848bb3b07b1fcea28b993efb17145faf00f36 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sat, 5 Jul 2025 07:08:58 +0800 Subject: [PATCH 124/165] Update c511001363.lua --- unofficial/c511001363.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unofficial/c511001363.lua b/unofficial/c511001363.lua index 57e7bc497c..da0cd1cb7e 100644 --- a/unofficial/c511001363.lua +++ b/unofficial/c511001363.lua @@ -18,7 +18,10 @@ function s.initial_effect(c) c:RegisterEffect(e0a) local e0b=e0a:Clone() e0b:SetCode(EFFECT_XYZ_LEVEL) - e0b:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) + e0b:SetValue(function(e,mc,rc) + if rc==e:GetHandler() then return 7,mc:GetLevel() end + return mc:GetLevel() + end) c:RegisterEffect(e0b) --This card's ATK is equal to the number of Xyz Materials attached to it x 1000 local e1=Effect.CreateEffect(c) @@ -129,4 +132,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) end e:SetLabel(0) e:SetLabelObject(nil) -end \ No newline at end of file +end From 8a46e2ef6f193dc9df4a4e715c4a46e8621cff6d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 15:42:48 +0300 Subject: [PATCH 125/165] Update c511009567.lua --- unofficial/c511009567.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index 4126724546..1eabcc82fb 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rtgtg) e1:SetOperation(s.rtgop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e1) --Allow 1 "Raidraptor" monster to attack multiple times in a row local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -99,4 +99,4 @@ function s.chainatkop(c,ac) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ac:RegisterEffect(e1) -end \ No newline at end of file +end From 668bc06c399ba8bcb0ebe939409227e266400da7 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 5 Jul 2025 15:43:58 +0300 Subject: [PATCH 126/165] Update c511009480.lua --- unofficial/c511009480.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index c46b36e363..525253d9d5 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -98,11 +98,6 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp,c) function s.descon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler()) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end @@ -189,4 +184,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end end -end \ No newline at end of file +end From ed7472c41a4133cb135814a369434c4daa643d00 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sat, 5 Jul 2025 22:18:01 +0800 Subject: [PATCH 127/165] Update utility.lua --- utility.lua | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/utility.lua b/utility.lua index de2069cb7d..ae886320c1 100644 --- a/utility.lua +++ b/utility.lua @@ -1502,6 +1502,7 @@ function Cost.SelfDiscardToGrave(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c:IsDiscardable() and c:IsAbleToGraveAsCost() end Duel.SendtoGrave(c,REASON_DISCARD|REASON_COST) end +self_tograve_costs[Cost.SelfDiscardToGrave]=true self_discard_costs[Cost.SelfDiscardToGrave]=true --Aliases for historical reasons: @@ -1521,7 +1522,7 @@ end local detach_costs={} function Cost.Detach(min,max,op) max=max or min - + local min_type=type(min) local max_type=type(max) @@ -1542,7 +1543,7 @@ function Cost.Detach(min,max,op) local c=e:GetHandler() local min_count=min_type=="function" and min(e,tp) or min local max_count=max_type=="function" and max(e,tp) or max - if chk==0 then return min_count>0 and c:CheckRemoveOverlayCard(tp,min_count,REASON_COST) end + if chk==0 then return min_count>0 and max_count>=min_count and c:CheckRemoveOverlayCard(tp,min_count,REASON_COST) end if c:RemoveOverlayCard(tp,min_count,max_count,REASON_COST)>0 and op then op(e,Duel.GetOperatedGroup()) end @@ -1586,20 +1587,32 @@ function Cost.PayLP(lp_value,pay_until) end end -function Cost.SoftOncePerChain(flag) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:HasFlagEffect(flag) end - c:RegisterFlagEffect(flag,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) +local function use_limit_cost(reset,soft) + return function(flag,ct) + ct=ct or 1 + return function(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return (soft and c:GetFlagEffect(flag) or Duel.GetFlagEffect(tp,flag)) Date: Sat, 5 Jul 2025 22:21:03 +0800 Subject: [PATCH 128/165] update some official cards to use Cost.Detach --- official/c12632096.lua | 42 ++++++++++------------ official/c19369609.lua | 56 ++++++++--------------------- official/c31801517.lua | 77 ++++++++++++++++------------------------ official/c32559361.lua | 62 +++++++++++++++----------------- official/c3989465.lua | 35 +++++++----------- official/c6387204.lua | 80 +++++++++++++++++++----------------------- official/c78876707.lua | 24 ++++++------- official/c96592102.lua | 31 +++++----------- official/c96864105.lua | 47 ++++++++----------------- 9 files changed, 173 insertions(+), 281 deletions(-) diff --git a/official/c12632096.lua b/official/c12632096.lua index 0d5fd1594b..e761cc7160 100644 --- a/official/c12632096.lua +++ b/official/c12632096.lua @@ -3,49 +3,44 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure 3 Level 9 monsters Xyz.AddProcedure(c,nil,9,3) - --Take control of the opponent's monsters + --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card, also for each Material detached, take control of 1 opponent's face-up monster until the End Phase local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.ctcon) - e1:SetCost(s.ctcost) + e1:SetCountLimit(1) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_CIPHER) end) + e1:SetCost(Cost.Detach(1,s.ctcostmax,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) end s.listed_series={SET_CIPHER} s.listed_names={id} -function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_CIPHER) -end -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local rt=math.min(Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,nil),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL),c:GetOverlayCount(),3) - if chk==0 then return rt>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) +function s.ctcostmax(e,tp) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,nil) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL) + return math.min(ct,ft,3) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,e:GetLabel(),0,0) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - --Other monsters cannot attack directly + local fid=c:GetFieldID() + --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.atktg) - e1:SetLabel(c:GetFieldID()) + e1:SetTarget(function(e,c) return fid~=c:GetFieldID() end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - --Take control of the opponent's monsters + --For each Material detached, take control of 1 opponent's face-up monster until the End Phase local ct=math.min(e:GetLabel(),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,ct,ct,nil) @@ -53,8 +48,10 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local og=Duel.GetOperatedGroup() if #og==0 then return end for tc in og:Iter() do - ---Negate their effects - tc:NegateEffects(c,RESET_PHASE|PHASE_END) + if tc:IsNegatableMonster() then + ---Negate their effects + tc:NegateEffects(c,RESET_PHASE|PHASE_END) + end --Their ATK's become 4500 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -71,6 +68,3 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -function s.atktg(e,c) - return e:GetLabel()~=c:GetFieldID() -end diff --git a/official/c19369609.lua b/official/c19369609.lua index 7c8466d729..3e01242f60 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -4,27 +4,27 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2+ Level 1 monsters Xyz.AddProcedure(c,nil,1,2,nil,nil,Xyz.InfiniteMats) --Gains 500 ATK for each material attached to it local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(s.atkval) + e1:SetValue(function(e) return e:GetHandler():GetOverlayCount()*500 end) c:RegisterEffect(e1) - --Shuffle 1 Spell/Trap into the Deck + --Shuffle 1 Spell/Trap your opponent controls into the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TODECK) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) - --ATK gain on battle + --Make 1 monster you control gain 300 ATK for each material detached local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_ATKCHANGE) @@ -32,24 +32,16 @@ function s.initial_effect(c) e3:SetCode(EVENT_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.Detach(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end ---ATK gain -function s.atkval(e,c) - return e:GetHandler():GetOverlayCount()*500 -end ---To Deck -function s.filter(c) - return c:IsSpellTrap() and c:IsAbleToDeck() -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.filter(chkc) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end + if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tc=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,1-tp,tc:GetFirst():GetLocation()) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -57,31 +49,13 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end ---ATK gain on battle function s.atkcon(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetAttacker() - if Duel.GetAttackTarget() and Duel.GetAttackTarget():IsControler(tp) then - tc=Duel.GetAttackTarget() - end - return not e:GetHandler():IsRelateToBattle() and tc:IsFaceup() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ct=c:RemoveOverlayCard(tp,1,c:GetOverlayCount(),REASON_COST) - e:SetLabel(ct) + local bc=Duel.GetBattleMonster(tp) + return bc and bc:IsFaceup() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - if Duel.GetAttacker():IsControler(tp) then - tc=Duel.GetAttacker() - end - if tc and tc:IsFaceup() and tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()*300) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) + local bc=Duel.GetBattleMonster(tp) + if bc and bc:IsFaceup() and bc:IsRelateToBattle() then + bc:UpdateAttack(e:GetLabel()*300,RESET_PHASE|PHASE_END,e:GetHandler()) end end diff --git a/official/c31801517.lua b/official/c31801517.lua index 4cc606a16d..ae4e8a2eb7 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -1,11 +1,11 @@ ---No.62 銀河眼の光子竜皇 +--No.62 銀河眼の光子竜皇 --Number 62: Galaxy-Eyes Prime Photon Dragon local s,id=GetID() function s.initial_effect(c) - --Xyz summon - Xyz.AddProcedure(c,nil,8,2) c:EnableReviveLimit() - --Increase ATK + --Xyz Summon procedure: 2 Level 8 monsters + Xyz.AddProcedure(c,nil,8,2) + --This card gains ATK equal to the combined Ranks of all Xyz Monsters currently on the field x 200 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -13,10 +13,10 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - --Special summon + --Special Summon this card during your 2nd Standby Phase after activation and double its ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -25,11 +25,11 @@ function s.initial_effect(c) e2:SetCondition(s.spcon) e2:SetOperation(s.spop) c:RegisterEffect(e2) - --Halve damage + --Any battle damage this card inflicts to your opponent is halved unless it has "Galaxy-Eyes Photon Dragon" as material local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetCondition(s.rdcon) + e3:SetCondition(function(e) return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) end) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) c:RegisterEffect(e3) end @@ -39,58 +39,44 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local val=g:GetSum(Card.GetRank)*200 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(val) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) - c:RegisterEffect(e1) + local rks=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetSum(Card.GetRank) + if rks>0 then + c:UpdateAttack(rks*200,RESET_PHASE|PHASE_DAMAGE_CAL) + end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousControler(tp) and rp~=tp and c:IsReason(REASON_EFFECT) + return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED|LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - if Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp) then - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,3) - else - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) + if c:IsRelateToEffect(e) then + local reset_count=(Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp)) and 3 or 2 + --Special Summon this card during your 2nd Standby Phase after activation + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetRange(LOCATION_REMOVED|LOCATION_GRAVE) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,reset_count) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetOperation(s.standbyspop) + c:RegisterEffect(e1) + c:SetTurnCounter(0) end - e1:SetCountLimit(1) - e1:SetCondition(s.spcon2) - e1:SetOperation(s.spop2) - c:RegisterEffect(e1) - c:SetTurnCounter(0) -end -function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) end -function s.spop2(e,tp,eg,ep,ev,re,r,rp) +function s.standbyspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 + local ct=c:GetTurnCounter()+1 c:SetTurnCounter(ct) - if ct==2 then - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) + if ct==2 and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then + --Double its ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) @@ -101,6 +87,3 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -function s.rdcon(e) - return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) -end diff --git a/official/c32559361.lua b/official/c32559361.lua index d34229844b..4c0f83dc53 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -1,84 +1,80 @@ ---CNo.9 天蓋妖星カオス・ダイソン・スフィア +--CNo.9 天蓋妖星カオス・ダイソン・スフィア --Number C9: Chaos Dyson Sphere local s,id=GetID() function s.initial_effect(c) - --Xyz Summon - Xyz.AddProcedure(c,nil,10,3) c:EnableReviveLimit() - --Attach battled monster as material + --Xyz Summon procedure: 3 Level 10 monsters + Xyz.AddProcedure(c,nil,10,3) + --Attach battled monster to this card as an Xyz material local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetTarget(s.attachtg) + e1:SetOperation(s.attachop) c:RegisterEffect(e1) - --Burn 300 for each material + --Inflict 300 damage to your opponent for each Xyz Material attached to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) + e2:SetTarget(s.dam300tg) + e2:SetOperation(s.dam300op) c:RegisterEffect(e2) - --Burn 800 for each detached material + --Inflict 800 damage to your opponent for each detached material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCondition(s.damcon) - e3:SetCost(Cost.Detach(1,s.mxmc,s.slwc)) - e3:SetTarget(s.damtg2) - e3:SetOperation(s.damop2) + e3:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,1992816) end) + e3:SetCost(Cost.Detach(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) + e3:SetTarget(s.dam800tg) + e3:SetOperation(s.dam800op) c:RegisterEffect(e3) end s.xyz_number=9 s.listed_names={1992816} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetBattleTarget() +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=e:GetHandler():GetBattleTarget() if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() end end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=c:GetBattleTarget() if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.damtg(amt,ct) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=e:GetHandler():GetOverlayCount() + if chk==0 then return ct>0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) + end +end +function s.dam300tg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=e:GetHandler():GetOverlayCount() if chk==0 then return ct>0 end Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) end -function s.damop(e,tp,eg,ep,ev,re,r,rp) +function s.dam300op(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetHandler():GetOverlayCount() Duel.Damage(p,ct*300,REASON_EFFECT) end -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,1992816) -end -function s.mxmc(e,tp) - return e:GetHandler():GetOverlayCount() -end -function s.slwc(e,og) - e:SetLabel(#og) -end -function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) +function s.dam800tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local ct=e:GetLabel() Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*800) end -function s.damop2(e,tp,eg,ep,ev,re,r,rp) +function s.dam800op(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) diff --git a/official/c3989465.lua b/official/c3989465.lua index 2290f048ca..d4cc512cc7 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -2,42 +2,31 @@ --Lavalval Ignis local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,2) c:EnableReviveLimit() - --attack up + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) + --Make this card gain 500 ATK local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetOperation(s.operation) + e1:SetCondition(s.atkcon) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) + e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return ph==PHASE_DAMAGE and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) - and not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) + local a,b=Duel.GetBattleMonster(tp) + return (c==a or c==b) and Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) + c:UpdateAttack(500,RESET_PHASE|PHASE_END) end end diff --git a/official/c6387204.lua b/official/c6387204.lua index e74f1611fd..b74a168af6 100644 --- a/official/c6387204.lua +++ b/official/c6387204.lua @@ -1,11 +1,11 @@ ---CNo.6 先史遺産カオス・アトランタル +--CNo.6 先史遺産カオス・アトランタル --Number C6: Chronomaly Chaos Atlandis local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,3) c:EnableReviveLimit() - --equip + --Xyz Summon procedure: 3 Level 7 monsters + Xyz.AddProcedure(c,nil,7,3) + --Equip 1 monster your opponent controls to this card as an Equip Spell Card whose effect makes this monster gain 1000 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) @@ -17,19 +17,33 @@ function s.initial_effect(c) e1:SetOperation(s.eqop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,function(ec,_,tp) return ec:IsControler(1-tp) end,s.equipop,e1) - --lp + --Make your opponent's Life Points 100 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.lpcon) - e2:SetCost(s.lpcost) + e2:SetCondition(function(e,tp) return Duel.GetLP(1-tp)~=100 and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,9161357) end) + e2:SetCost(Cost.AND(Cost.Detach(3),s.lpcost)) e2:SetOperation(s.lpop) c:RegisterEffect(e2) end s.listed_series={SET_NUMBER} s.xyz_number=6 s.listed_names={9161357} +function s.nodamage(e,tp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --Your opponent takes no further damage this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CHANGE_DAMAGE) + e1:SetTargetRange(0,1) + e1:SetValue(0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end function s.eqtg(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:IsAbleToChangeControler() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -40,53 +54,31 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.equipop(c,e,tp,tc) if not c:EquipByEffectAndLimitRegister(e,tp,tc,id) then return end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - e2:SetValue(1000) - tc:RegisterEffect(e2) + --Equipped monster gains 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + e1:SetValue(1000) + tc:RegisterEffect(e1) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then s.equipop(c,e,tp,tc) end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CHANGE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - e3:SetValue(0) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) - local e4=e3:Clone() - e4:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e4:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e4,tp) -end -function s.lpcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(1-tp)~=100 and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,9161357) + s.nodamage(e,tp) end -function s.filter(c) - return c:GetFlagEffect(id)~=0 and c:IsSetCard(SET_NUMBER) and c:IsFaceup() and c:IsAbleToGraveAsCost() +function s.lpcostfilter(c) + return c:HasFlagEffect(id) and c:IsSetCard(SET_NUMBER) and c:IsFaceup() and c:IsAbleToGraveAsCost() end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) - and e:GetHandler():GetEquipGroup():IsExists(s.filter,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) - local g=e:GetHandler():GetEquipGroup():Filter(s.filter,nil) - Duel.SendtoGrave(g,REASON_COST) + local eqg=e:GetHandler():GetEquipGroup():Filter(s.lpcostfilter,nil) + if chk==0 then return #eqg>0 end + Duel.SendtoGrave(eqg,REASON_COST) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,100) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) + s.nodamage(e,tp) end diff --git a/official/c78876707.lua b/official/c78876707.lua index e738d05fbf..60df72c151 100644 --- a/official/c78876707.lua +++ b/official/c78876707.lua @@ -4,9 +4,9 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2+ Level 4 "Noble Knight" monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_NOBLE_KNIGHT),4,2,nil,nil,Xyz.InfiniteMats) - --Return cards to the hand + --Return cards your opponent controls to the hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1,s.thcostmax,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Special Summon 1 "Noble Knight" Xyz Monster from your Extra Deck + --Special Summon 1 "Noble Knight" Xyz Monster from your Extra Deck, except "Sacred Noble Knight of King Custennin" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_GRAVE) @@ -34,15 +34,10 @@ end s.listed_series={SET_NOBLE_KNIGHT} s.listed_names={id} function s.thfilter(c,e) - return c:IsAbleToHand() and (not e or c:IsCanBeEffectTarget(e)) + return c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.thfilter,tp,0,LOCATION_ONFIELD,nil,e) - if chk==0 then return #g>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local rt=math.min(#g,c:GetOverlayCount()) - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) +function s.thcostmax(e,tp) + return Duel.GetMatchingGroupCount(s.thfilter,tp,0,LOCATION_ONFIELD,nil,e) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -63,7 +58,8 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsType(TYPE_XYZ) + and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c96592102.lua b/official/c96592102.lua index 3556ab5950..badfa2704b 100644 --- a/official/c96592102.lua +++ b/official/c96592102.lua @@ -1,18 +1,18 @@ ---RR-ブレード・バーナー・ファルコン +--RR-ブレード・バーナー・ファルコン --Raidraptor - Blade Burner Falcon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2 Level 4 Winged Beast monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WINGEDBEAST),4,2) --Make this card gain 3000 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCondition(s.atkcon) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e,tp) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 end) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Destroy monsters your opponent controls @@ -22,35 +22,20 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCondition(aux.bdocon) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 and e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(3000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) + c:UpdateAttack(3000) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local rt=math.min(Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil),c:GetOverlayCount()) - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return true end + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c96864105.lua b/official/c96864105.lua index f3240611a8..b33b66dbbc 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -1,11 +1,11 @@ ---CNo.73 激瀧瀑神アビス・スープラ +--CNo.73 激瀧瀑神アビス・スープラ --Number C73: Abyss Supra Splash local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,6,3) c:EnableReviveLimit() - --atk up + --Xyz Summon procedure: 3 Level 6 monsters + Xyz.AddProcedure(c,nil,6,3) + --Your battling monster gains ATK equal to the ATK of the opponent's monster it is battling, during that damage calculation only local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -13,45 +13,28 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - --indes + --This card cannot be destroyed by card effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetCondition(s.indcon) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) end) e2:SetValue(1) c:RegisterEffect(e2) end s.xyz_number=73 -s.listed_names={36076683} +s.listed_names={36076683} --"Number C73: Abyss Supra Splash" function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and a:GetControler()~=d:GetControler() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) + local a,b=Duel.GetBattleMonster(tp) + return a and b and a:GetControler()~=b:GetControler() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsRelateToBattle() or a:IsFacedown() or not d:IsRelateToBattle() or d:IsFacedown() then return end - if a:IsControler(1-tp) then a,d=d,a end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) - e1:SetValue(d:GetAttack()) - a:RegisterEffect(e1) -end -function s.indcon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) + local a,b=Duel.GetBattleMonster(tp) + if a:IsRelateToBattle() and a:IsFaceup() and b:IsRelateToBattle() and b:IsFaceup() then + a:UpdateAttack(b:GetAttack(),RESET_PHASE|PHASE_DAMAGE_CAL,e:GetHandler()) + end end From 15fdbbec70ec4e122385ee4bd8755b657c42a57d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 13:42:14 +0300 Subject: [PATCH 129/165] updates/fixes --- official/c12632096.lua | 48 ++++++++++++++++++++---------------------- official/c19369609.lua | 15 +++++++------ official/c31801517.lua | 38 +++++++++++++++++---------------- official/c32559361.lua | 31 ++++++++++++--------------- official/c3989465.lua | 15 ++++++------- official/c96592102.lua | 12 ++++++----- official/c96864105.lua | 15 +++++++------ 7 files changed, 86 insertions(+), 88 deletions(-) diff --git a/official/c12632096.lua b/official/c12632096.lua index e761cc7160..59e9253d0c 100644 --- a/official/c12632096.lua +++ b/official/c12632096.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure 3 Level 9 monsters + --Xyz Summon procedure: 3 Level 9 monsters Xyz.AddProcedure(c,nil,9,3) --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card, also for each Material detached, take control of 1 opponent's face-up monster until the End Phase local e1=Effect.CreateEffect(c) @@ -27,11 +27,11 @@ function s.ctcostmax(e,tp) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,e:GetLabel(),0,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,e:GetLabel(),tp,0) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local fid=c:GetFieldID() + local fid=c:IsRelateToEffect(e) and c:GetFieldID() or -1 --Monsters you control cannot attack your opponent directly for the rest of this turn, except this card local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -44,27 +44,25 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local ct=math.min(e:GetLabel(),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAbleToChangeControler),tp,0,LOCATION_MZONE,ct,ct,nil) - Duel.GetControl(g,tp,PHASE_END,1) - local og=Duel.GetOperatedGroup() - if #og==0 then return end - for tc in og:Iter() do - if tc:IsNegatableMonster() then - ---Negate their effects - tc:NegateEffects(c,RESET_PHASE|PHASE_END) + if #g==ct and Duel.GetControl(g,tp,PHASE_END,1) then + local og=Duel.GetOperatedGroup() + if #og==0 then return end + for tc in og:Iter() do + ---Their effects are negated + tc:NegateEffects(c,RESET_CONTROL) + --Their ATK's become 4500 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(4500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CONTROL) + tc:RegisterEffect(e1) + --Their names become "Neo Galaxy-Eyes Cipher Dragon" + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_CODE) + e2:SetValue(id) + tc:RegisterEffect(e2) end - --Their ATK's become 4500 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(4500) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - --Their names become "Neo Galaxy-Eyes Cipher Dragon" - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetValue(id) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c19369609.lua b/official/c19369609.lua index 3e01242f60..52bad000e2 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -37,11 +37,11 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return s.filter(chkc) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() and chkc:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -49,13 +49,14 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp,chk) +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - return bc and bc:IsFaceup() + return bc and bc:IsFaceup() end bc~=e:GetHandler() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - if bc and bc:IsFaceup() and bc:IsRelateToBattle() then - bc:UpdateAttack(e:GetLabel()*300,RESET_PHASE|PHASE_END,e:GetHandler()) + if bc and bc:IsFaceup() and bc:IsControler(tp) and bc:IsRelateToBattle() then + --That monster you control gains 300 ATK for each material detached, until the end of this turn + bc:UpdateAttack(e:GetLabel()*300,RESETS_STANDARD_PHASE_END,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c31801517.lua b/official/c31801517.lua index ae4e8a2eb7..662f9d989f 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -12,17 +12,19 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.atkcon) + e1:SetCondition(function(e) return e:GetHandler():IsRelateToBattle() end) e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Special Summon this card during your 2nd Standby Phase after activation and double its ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) --Any battle damage this card inflicts to your opponent is halved unless it has "Galaxy-Eyes Photon Dragon" as material @@ -33,42 +35,43 @@ function s.initial_effect(c) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) c:RegisterEffect(e3) end -s.listed_names={CARD_GALAXYEYES_P_DRAGON} s.xyz_number=62 -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() -end +s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then local rks=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetSum(Card.GetRank) if rks>0 then - c:UpdateAttack(rks*200,RESET_PHASE|PHASE_DAMAGE_CAL) + --This card gains ATK equal to the combined Ranks of all Xyz Monsters currently on the field x 200, during that damage calculation only + c:UpdateAttack(rks*200,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then + c:SetTurnCounter(0) + local turn_count=Duel.GetTurnCount() local reset_count=(Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp)) and 3 or 2 --Special Summon this card during your 2nd Standby Phase after activation local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED|LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,reset_count) + e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetRange(c:GetLocation()) e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and (reset_count==2 or Duel.GetTurnCount()~=turn_count) end) e1:SetOperation(s.standbyspop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,reset_count) c:RegisterEffect(e1) - c:SetTurnCounter(0) end end function s.standbyspop(e,tp,eg,ep,ev,re,r,rp) @@ -79,11 +82,10 @@ function s.standbyspop(e,tp,eg,ep,ev,re,r,rp) --Double its ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(c:GetAttack()*2) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c32559361.lua b/official/c32559361.lua index 4c0f83dc53..8720d9921b 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -5,7 +5,7 @@ function s.initial_effect(c) c:EnableReviveLimit() --Xyz Summon procedure: 3 Level 10 monsters Xyz.AddProcedure(c,nil,10,3) - --Attach battled monster to this card as an Xyz material + --Attach an opponent's monster this card battles to this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.attachtg) e1:SetOperation(s.attachop) c:RegisterEffect(e1) - --Inflict 300 damage to your opponent for each Xyz Material attached to this card + --Inflict 300 damage to your opponent for each material attached to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DAMAGE) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetTarget(s.dam300tg) e2:SetOperation(s.dam300op) c:RegisterEffect(e2) - --Inflict 800 damage to your opponent for each detached material + --Inflict 800 damage to your opponent for each material detached local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DAMAGE) @@ -37,24 +37,19 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=9 -s.listed_names={1992816} +s.listed_names={1992816} --"Number 9: Dyson Sphere" function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() end + if chk==0 then + local c=e:GetHandler() + local bc=c:GetBattleTarget() + return bc and bc:IsControler(1-tp) and bc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) + end end function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local tc=c:GetBattleTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then - Duel.Overlay(c,tc,true) - end -end -function s.damtg(amt,ct) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetOverlayCount() - if chk==0 then return ct>0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) + local bc=c:GetBattleTarget() + if c:IsRelateToEffect(e) and bc:IsRelateToBattle() and not bc:IsImmuneToEffect(e) then + Duel.Overlay(c,bc,true) end end function s.dam300tg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -78,4 +73,4 @@ function s.dam800op(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3989465.lua b/official/c3989465.lua index d4cc512cc7..0bd73915c1 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -5,28 +5,27 @@ function s.initial_effect(c) c:EnableReviveLimit() --Xyz Summon procedure: 2 Level 3 monsters Xyz.AddProcedure(c,nil,3,2) - --Make this card gain 500 ATK + --Make this card gain 500 ATK until the end of this turn 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_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) + e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.atkcon) e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a,b=Duel.GetBattleMonster(tp) - return (c==a or c==b) and Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() + return e:GetHandler():IsRelateToBattle() and Duel.IsPhase(PHASE_DAMAGE) and aux.StatChangeDamageStepCondition() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:UpdateAttack(500,RESET_PHASE|PHASE_END) + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 500 ATK until the end of this turn + c:UpdateAttack(500,RESETS_STANDARD_DISABLE_PHASE_END) end -end +end \ No newline at end of file diff --git a/official/c96592102.lua b/official/c96592102.lua index badfa2704b..cbdfe97a0e 100644 --- a/official/c96592102.lua +++ b/official/c96592102.lua @@ -12,7 +12,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e,tp) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 end) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(1-tp)>=Duel.GetLP(tp)+3000 end end) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Destroy monsters your opponent controls @@ -30,20 +31,21 @@ end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 3000 ATK c:UpdateAttack(3000) end end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,ct,ct,nil) - if #g>0 then - Duel.HintSelection(g,true) + if #g==ct then + Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96864105.lua b/official/c96864105.lua index b33b66dbbc..6a2669fafb 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -27,14 +27,15 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=73 -s.listed_names={36076683} --"Number C73: Abyss Supra Splash" +s.listed_names={36076683} --"Number 73: Abyss Splash" function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a,b=Duel.GetBattleMonster(tp) - return a and b and a:GetControler()~=b:GetControler() + local bc1,bc2=Duel.GetBattleMonster(tp) + return bc1 and bc2 and bc2:GetAttack()>0 end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local a,b=Duel.GetBattleMonster(tp) - if a:IsRelateToBattle() and a:IsFaceup() and b:IsRelateToBattle() and b:IsFaceup() then - a:UpdateAttack(b:GetAttack(),RESET_PHASE|PHASE_DAMAGE_CAL,e:GetHandler()) + local bc1,bc2=Duel.GetBattleMonster(tp) + if bc1:IsRelateToBattle() and bc1:IsFaceup() and bc2:IsRelateToBattle() and bc2:IsFaceup() then + --Your battling monster gains ATK equal to the ATK of the opponent's monster it is battling, during that damage calculation only + bc1:UpdateAttack(bc2:GetAttack(),RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,e:GetHandler()) end -end +end \ No newline at end of file From a086255e0820572ed0a108fd6fdae985fb7115e5 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 13:59:25 +0300 Subject: [PATCH 130/165] Update utility.lua --- utility.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utility.lua b/utility.lua index ae886320c1..73fe442769 100644 --- a/utility.lua +++ b/utility.lua @@ -1592,7 +1592,7 @@ local function use_limit_cost(reset,soft) ct=ct or 1 return function(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return (soft and c:GetFlagEffect(flag) or Duel.GetFlagEffect(tp,flag)) Date: Sun, 6 Jul 2025 23:18:16 +0800 Subject: [PATCH 131/165] update "Primathmech Laplacian" --- official/c88021907.lua | 157 +++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 99 deletions(-) diff --git a/official/c88021907.lua b/official/c88021907.lua index b75c7966e6..6d29bdb2ac 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -4,9 +4,9 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 3 Level 4 monsters Xyz.AddProcedure(c,nil,4,3) - --Send cards to the GY + --Resolve effect(s) based on the number of detached materials local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) @@ -14,128 +14,87 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(s.con) - e1:SetCost(s.cost) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetCost(Cost.Detach(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) - --Destruction replacement for "Mathmech" cards + --If a "Mathmech" card(s) you control would be destroyed by card effect, you can detach 1 material from this card instead local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_MZONE) e2:SetTarget(s.reptg) - e2:SetValue(s.repval) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) c:RegisterEffect(e2) end s.listed_series={SET_MATHMECH} -function s.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsXyzSummoned() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() +function s.effcostmax(e,tp) local ct=0 - if s.handtg(e,tp,eg,ep,ev,re,r,rp,0) then ct=ct+1 end - if s.montg(e,tp,eg,ep,ev,re,r,rp,0) then ct=ct+1 end - if s.sttg(e,tp,eg,ep,ev,re,r,rp,0) then ct=ct+1 end - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ft=c:RemoveOverlayCard(tp,1,ct,REASON_COST) - e:SetLabel(ft) + if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 then ct=ct+1 end + if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) then ct=ct+1 end + if Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) then ct=ct+1 end + return ct end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) - local hand=s.handtg(e,tp,eg,ep,ev,re,r,rp,0) - local mon=s.montg(e,tp,eg,ep,ev,re,r,rp,0) - local st=s.sttg(e,tp,eg,ep,ev,re,r,rp,0) - if chk==0 then return hand or mon or st end - local ct=0 - if hand then ct=ct+1 end - if mon then ct=ct+1 end - if st then ct=ct+1 end - local ft=e:GetLabel() - if ft0 do - local stable={} - local dtable={} - if hand and (sel&0x1==0) then - table.insert(stable,0x1) - table.insert(dtable,aux.Stringid(id,1)) - end - if mon and (sel&0x2==0) then - table.insert(stable,0x2) - table.insert(dtable,aux.Stringid(id,2)) - end - if st and (sel&0x4==0) then - table.insert(stable,0x4) - table.insert(dtable,aux.Stringid(id,3)) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,table.unpack(dtable))+1 - sel=sel+stable[op] - ct=ct-1 +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local ct=e:GetLabel() + if ct==0 then return end + local b1=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 + local b2=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) + local b3=Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) + local options={ + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)} + } + local selection={} + for i=1,ct do + local op=Duel.SelectEffect(tp,table.unpack(options)) + options[op][1]=false + selection[op]=true + local loc=op==1 and LOCATION_HAND or (op==2 and LOCATION_MZONE or LOCATION_SZONE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,loc) end - e:SetLabel(sel) + e:SetLabelObject(selection) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if (sel&0x1==0x1) then - s.handop(e,tp,eg,ep,ev,re,r,rp) - end - if (sel&0x2==0x2) then - s.monop(e,tp,eg,ep,ev,re,r,rp) - end - if (sel&0x4==0x4) then - s.stop(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local selection=e:GetLabelObject() + if selection[1] then + --Send 1 random card from your opponent's hand to the GY + local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) + if #g>0 then + local sg=g:RandomSelect(1-tp,1) + Duel.SendtoGrave(sg,REASON_EFFECT) + end end -end -function s.handtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) -end -function s.handop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if #g==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end -function s.montg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0) -end -function s.monop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) + if selection[2] then + --Send 1 monster your opponent controls to the GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end end -end -function s.stfilter(c) - return c:IsSpellTrap() and c:IsAbleToGrave() -end -function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,0,LOCATION_SZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0) -end -function s.stop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.stftiler,tp,0,LOCATION_SZONE,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) + if selection[3] then + --Send 1 Spell/Trap your opponent controls to the GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_SZONE,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(SET_MATHMECH) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) + return c:IsFaceup() and c:IsSetCard(SET_MATHMECH) + and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local g=c:GetLinkedGroup() if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end if Duel.SelectEffectYesNo(tp,c,96) then c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end end -function s.repval(e,c) - return s.repfilter(c,e:GetHandlerPlayer()) -end From 23309b55551d13db700189ff38046c77eb6aa662 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 6 Jul 2025 23:58:21 +0800 Subject: [PATCH 132/165] add Cost.Choice --- utility.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/utility.lua b/utility.lua index 73fe442769..9676a5c4d6 100644 --- a/utility.lua +++ b/utility.lua @@ -1639,6 +1639,37 @@ function Cost.AND(...) return full_cost end +function Cost.Choice(...) + --{ { cost_function, desc, additional_check } } + local choices={...} + + local function full_cost(e,tp,eg,ep,ev,re,r,rp,chk) + local ops={} + local has_choice=false + for _,choice in ipairs(choices) do + local fn,desc,additional_check=table.unpack(choice) + local check=fn(e,tp,eg,ep,ev,re,r,rp,0) and (not additional_check or additional_check(e,tp,eg,ep,ev,re,r,rp,0)) + table.insert(ops,{check,desc}) + has_choice=has_choice or check + end + + if chk==0 then return has_choice end + + local op=Duel.SelectEffect(tp,table.unpack(ops)) + choices[op][1](e,tp,eg,ep,ev,re,r,rp,1) + e:SetLabel(op) + end + + detach_costs[full_cost]=true + self_discard_costs[full_cost]=true + for _,choice in ipairs(choices) do + local fn=choice[1] + if not detach_costs[fn] then detach_costs[full_cost]=false end + if not self_discard_costs[fn] then self_discard_costs[full_cost]=false end + end + + return full_cost +end function Card.EquipByEffectLimit(e,c) if e:GetOwner()~=c then return false end From e827504d40d55571b8f7da2b5bc16df5284d1eba Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 6 Jul 2025 23:58:37 +0800 Subject: [PATCH 133/165] update "Wollow, Founder of the Drudge Dragons" --- official/c45935145.lua | 77 +++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/official/c45935145.lua b/official/c45935145.lua index 0fa715cfce..f4b55b4a54 100644 --- a/official/c45935145.lua +++ b/official/c45935145.lua @@ -4,20 +4,20 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure + --Xyz Summon procedure: 2+ Level 6 monsters Xyz.AddProcedure(c,nil,6,2,nil,nil,Xyz.InfiniteMats) - --Increase ATK/DEF + --Monsters you control gain 100 ATK/DEF for each card in your opponent's GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(s.val) + e1:SetValue(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_GRAVE)*100 end) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) - --Shuffle, Special Summon, or Set the targeted card + --Activate the appropriate effect based on the number of detached materials local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_QUICK_O) @@ -26,61 +26,62 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,id) - e3:SetTarget(s.eftg) - e3:SetOperation(s.efop) + e3:SetCost(Cost.AND(s.efftgcost,s.effdetachcost)) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) c:RegisterEffect(e3) end -function s.val(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_GRAVE)*100 -end function s.tgfilter(c,e,tp,detach_1,detach_2) - return (detach_1 and c:IsAbleToDeck()) or (detach_2 and (s.spfilter(c,e,tp) or s.setfilter(c))) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP|POS_FACEDOWN_DEFENSE) + return (detach_1 and c:IsAbleToDeck()) or (detach_2 and s.setfilter(c,e,tp)) end -function s.setfilter(c) - return c:IsSpellTrap() and c:IsSSetable() +function s.setfilter(c,e,tp) + if c:IsSpellTrap() then return c:IsSSetable() end + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP|POS_FACEDOWN_DEFENSE) end -function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.efftgcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local detach_1=c:CheckRemoveOverlayCard(tp,1,REASON_COST) local detach_2=c:CheckRemoveOverlayCard(tp,2,REASON_COST) - if chk==0 then return (detach_1 or detach_2) and Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,detach_1,detach_2) end + if chk==0 then return (detach_1 or detach_2) + and Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,detach_1,detach_2) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,detach_1,detach_2):GetFirst() - local b1=detach_1 and tc:IsAbleToDeck() - local b2=detach_2 and (s.spfilter(tc,e,tp) or s.setfilter(tc)) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - c:RemoveOverlayCard(tp,1,1,REASON_COST) - e:SetCategory(CATEGORY_TODECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) - elseif op==2 then - c:RemoveOverlayCard(tp,2,2,REASON_COST) - if tc:IsMonster() then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,tp,0) - else - e:SetCategory(0) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) - end + Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,detach_1,detach_2) +end +function s.tccheck(op) + return function(e,tp) + local tc=Duel.GetFirstTarget() + if not tc then return true end + return op==1 and tc:IsAbleToDeck() or s.setfilter(tc,e,tp) end end -function s.efop(e,tp,eg,ep,ev,re,r,rp) +s.effdetachcost=Cost.Choice( + {Cost.Detach(1),aux.Stringid(id,1),s.tccheck(1)}, + {Cost.Detach(2),aux.Stringid(id,2),s.tccheck(2)} +) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return true end local op=e:GetLabel() + local categ=CATEGORY_TODECK + local tc=Duel.GetFirstTarget() + if op==2 then categ=tc:IsMonster() and CATEGORY_SPECIAL_SUMMON or CATEGORY_LEAVE_GRAVE end + e:SetCategory(categ) + Duel.SetOperationInfo(0,categ,tc,1,tp,0) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end + local op=e:GetLabel() if op==1 then + --Return it to the Deck Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) elseif op==2 then + --If the target is a monster, Special Summon it face-up, or in face-down Defense Position, to your field if tc:IsMonster() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP|POS_FACEDOWN_DEFENSE)>0 and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) + --If it is not, Set it on your field elseif tc:IsSSetable() then Duel.SSet(tp,tc) end From 279670693ad9865b500b512bad78f408673796d5 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 00:12:05 +0800 Subject: [PATCH 134/165] update "Starliege Lord Galaxion" --- official/c40390147.lua | 52 +++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/official/c40390147.lua b/official/c40390147.lua index 1444c46b91..5ec605bd8d 100644 --- a/official/c40390147.lua +++ b/official/c40390147.lua @@ -2,17 +2,21 @@ --Starliege Lord Galaxion local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PHOTON),4,2) c:EnableReviveLimit() - --spsummon + --Xyz Summon procedure: 2 Level 4 "Photon" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PHOTON),4,2) + --Special Summon 1 "Galaxy-Eyes Photon Dragon" from your hand or Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.sptg) + e1:SetCost(Cost.Choice( + {Cost.Detach(1),aux.Stringid(id,1),s.spcheck(LOCATION_HAND)}, + {Cost.Detach(2),aux.Stringid(id,2),s.spcheck(LOCATION_DECK)} + )) + e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end @@ -21,36 +25,22 @@ s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.spfilter(c,e,tp) return c:IsCode(CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - local b2=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (b1 or b2) end - local opt=0 - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(id,1)) - else - opt=Duel.SelectOption(tp,aux.Stringid(id,2))+1 - end - e:SetLabel(opt) - e:GetHandler():RemoveOverlayCard(tp,opt+1,opt+1,REASON_COST) - if opt==0 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - else - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +function s.spcheck(loc) + return function(e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end + local loc=e:GetLabel()==1 and LOCATION_HAND or LOCATION_DECK + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) +end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=nil - if e:GetLabel()==0 then - tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - else - tc=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - end - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + local loc=e:GetLabel()==1 and LOCATION_HAND or LOCATION_DECK + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end From 186dce8e68b24f47460eb743f69dfe72a24ff7ae Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 00:31:52 +0800 Subject: [PATCH 135/165] update "Primathmech Alembertian" --- official/c85692042.lua | 174 ++++++++++++++--------------------------- 1 file changed, 60 insertions(+), 114 deletions(-) diff --git a/official/c85692042.lua b/official/c85692042.lua index 37b4d925af..89340f08ed 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -3,129 +3,47 @@ --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) c:EnableReviveLimit() - --search + --Xyz Summon procedure: 2+ Level 4 monsters + Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) + --Special Summon 1 Level 4 "Mathmech" monster from your hand or GY 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_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(s.thcon) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCountLimit(1,{id,1}) + e1:SetRange(LOCATION_MZONE) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --special summon + --Activate the appropriate effect based on the number of detached materials local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,4)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1,{id,1}) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetCost(Cost.Choice( + {Cost.Detach(2),aux.Stringid(id,1),s.thcheck(s.mmfilter)}, + {Cost.Detach(3),aux.Stringid(id,2),s.thcheck(s.l4filter)}, + {Cost.Detach(4),aux.Stringid(id,3),s.thcheck(s.stfilter)} + )) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) + end s.listed_series={SET_MATHMECH} -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsXyzSummoned() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local mm=s.mmtg(e,tp,eg,ep,ev,re,r,rp,0) --"Mathmech" target - local l4=s.l4tg(e,tp,eg,ep,ev,re,r,rp,0) --"Level 4" target - local st=s.sttg(e,tp,eg,ep,ev,re,r,rp,0) --"Spell/Trap" target - local ct - if st then ct = 4 end - if l4 then ct = 3 end - if mm then ct = 2 end - if chk==0 then return (l4 or mm or st) and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - local selections={} - if st and c:CheckRemoveOverlayCard(tp,4,REASON_COST) then - table.insert(selections,4) - end - if l4 and c:CheckRemoveOverlayCard(tp,3,REASON_COST) then - table.insert(selections,3) - end - if mm and c:CheckRemoveOverlayCard(tp,2,REASON_COST) then - table.insert(selections,2) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) - local sel=Duel.AnnounceNumber(tp,table.unpack(selections)) - c:RemoveOverlayCard(tp,sel,sel,REASON_COST) - if sel==2 then - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) - elseif sel==3 then - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) - else - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,3)) - end - e:SetLabel(sel) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end --legality handled in cost by necessity - local sel=e:GetLabel() - if sel==2 then - s.mmtg(e,tp,eg,ep,ev,re,r,rp,chk) - elseif sel==3 then - s.l4tg(e,tp,eg,ep,ev,re,r,rp,chk) - else - s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) - end -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if sel==2 then - s.mmop(e,tp,eg,ep,ev,re,r,rp) - elseif sel==3 then - s.l4op(e,tp,eg,ep,ev,re,r,rp) - else - s.stop(e,tp,eg,ep,ev,re,r,rp) - end -end -function s.tg(filter) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function s.op(filter) - return function(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.mmfilter(c) - return c:IsSetCard(SET_MATHMECH) and c:IsAbleToHand() -end -s.mmtg=s.tg(s.mmfilter) -s.mmop=s.op(s.mmfilter) -function s.l4filter(c) - return c:IsLevel(4) and c:IsAbleToHand() -end -s.l4tg=s.tg(s.l4filter) -s.l4op=s.op(s.l4filter) -function s.stfilter(c) - return c:IsSpellTrap() and c:IsAbleToHand() -end -s.sttg=s.tg(s.stfilter) -s.stop=s.op(s.stfilter) -function s.cfilter(c,ft,tp) - return ft>0 or (c:IsControler(tp) and c:GetSequence()<5) +function s.spcostfilter(c,ft,tp) + return (c:IsControler(tp) and Duel.GetMZoneCount(tp,c) or ft)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,ft,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,ft,tp) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,ft,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,ft,tp) Duel.Release(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -143,3 +61,31 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end +function s.mmfilter(c) + return c:IsSetCard(SET_MATHMECH) and c:IsAbleToHand() +end +function s.l4filter(c) + return c:IsLevel(4) and c:IsAbleToHand() +end +function s.stfilter(c) + return c:IsSpellTrap() and c:IsAbleToHand() +end +function s.thcheck(filter) + return function(e,tp) + return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) + 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,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local filter=op==1 and s.mmfilter or (op==2 and s.l4filter or s.stfilter) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end From ec78d0b65d50c07e4dc665e4605b1b51fca89b40 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 01:20:43 +0800 Subject: [PATCH 136/165] fix typos --- official/c19369609.lua | 4 ++-- unofficial/c513000059.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/official/c19369609.lua b/official/c19369609.lua index 52bad000e2..2b3e4a60f5 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -51,7 +51,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - return bc and bc:IsFaceup() end bc~=e:GetHandler() + return bc and bc:IsFaceup() and bc~=e:GetHandler() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) @@ -59,4 +59,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) --That monster you control gains 300 ATK for each material detached, until the end of this turn bc:UpdateAttack(e:GetLabel()*300,RESETS_STANDARD_PHASE_END,e:GetHandler()) end -end \ No newline at end of file +end diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index 6ace9e9797..01d8446a67 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e4) - e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end) + e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) local e5=Effect.CreateEffect(c) @@ -104,4 +104,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end From 7f5e9c01f113a1444265b5230fc0cb3e44908915 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 20:36:54 +0300 Subject: [PATCH 137/165] Update c85692042.lua --- official/c85692042.lua | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/official/c85692042.lua b/official/c85692042.lua index 89340f08ed..15395299cb 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -8,42 +8,37 @@ function s.initial_effect(c) Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) --Special Summon 1 Level 4 "Mathmech" monster from your hand or GY local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,4)) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,{id,1}) e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Activate the appropriate effect based on the number of detached materials + --Activate the appropriate effect based on the number of materials detached local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) + 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_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,id) + e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e2:SetCost(Cost.Choice( - {Cost.Detach(2),aux.Stringid(id,1),s.thcheck(s.mmfilter)}, - {Cost.Detach(3),aux.Stringid(id,2),s.thcheck(s.l4filter)}, - {Cost.Detach(4),aux.Stringid(id,3),s.thcheck(s.stfilter)} + {Cost.Detach(2),aux.Stringid(id,2),s.thcheck(s.mmfilter)}, + {Cost.Detach(3),aux.Stringid(id,3),s.thcheck(s.l4filter)}, + {Cost.Detach(4),aux.Stringid(id,4),s.thcheck(s.stfilter)} )) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) - c:RegisterEffect(e2,false,EFFECT_MARKER_DETACH_XMAT) - + c:RegisterEffect(e2) end s.listed_series={SET_MATHMECH} -function s.spcostfilter(c,ft,tp) - return (c:IsControler(tp) and Duel.GetMZoneCount(tp,c) or ft)>0 -end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,ft,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,ft,tp) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,false,aux.ReleaseCheckMMZ,nil) end + local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,false,aux.ReleaseCheckMMZ,nil) Duel.Release(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -81,7 +76,9 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local op=e:GetLabel() - local filter=op==1 and s.mmfilter or (op==2 and s.l4filter or s.stfilter) + local filter=(op==1 and s.mmfilter) + or (op==2 and s.l4filter) + or s.stfilter Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then From 290f358bae858fee0eb8f2eb9d016faf85321052 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 20:53:06 +0300 Subject: [PATCH 138/165] Update c88021907.lua --- official/c88021907.lua | 79 ++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/official/c88021907.lua b/official/c88021907.lua index 6d29bdb2ac..9e6ec391ee 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -6,41 +6,48 @@ function s.initial_effect(c) c:EnableReviveLimit() --Xyz Summon procedure: 3 Level 4 monsters Xyz.AddProcedure(c,nil,4,3) - --Resolve effect(s) based on the number of detached materials + --If a "Mathmech" card(s) you control would be destroyed by card effect, you can detach 1 material from this card instead local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetCost(Cost.Detach(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EFFECT_DESTROY_REPLACE) + e1:SetRange(LOCATION_MZONE) + e1:SetTarget(s.reptg) + e1:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) c:RegisterEffect(e1) - --If a "Mathmech" card(s) you control would be destroyed by card effect, you can detach 1 material from this card instead + --Activate a number of effects to activate equal to the number of materials detached local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(s.reptg) - e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetCost(Cost.Detach(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) c:RegisterEffect(e2) end s.listed_series={SET_MATHMECH} +function s.repfilter(c,tp) + return c:IsSetCard(SET_MATHMECH) and c:IsControler(tp) and c:IsOnField() and c:IsFaceup() + and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end + return Duel.SelectEffectYesNo(tp,c,96) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)>0 +end function s.effcostmax(e,tp) local ct=0 - if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 then ct=ct+1 end + if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND,1,nil) then ct=ct+1 end if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) then ct=ct+1 end if Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) then ct=ct+1 end return ct end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local ct=e:GetLabel() - if ct==0 then return end - local b1=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 + local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND,1,nil) local b2=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) local b3=Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) local options={ @@ -48,22 +55,26 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) {b2,aux.Stringid(id,2)}, {b3,aux.Stringid(id,3)} } + local locations=0 local selection={} + local ct=e:GetLabel() for i=1,ct do local op=Duel.SelectEffect(tp,table.unpack(options)) options[op][1]=false selection[op]=true - local loc=op==1 and LOCATION_HAND or (op==2 and LOCATION_MZONE or LOCATION_SZONE) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,loc) + locations=locations|((op==1 and LOCATION_HAND) or (op==2 and LOCATION_MZONE) or LOCATION_ONFIELD) end e:SetLabelObject(selection) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,1-tp,locations) end function s.effop(e,tp,eg,ep,ev,re,r,rp) + local break_chk=false local selection=e:GetLabelObject() if selection[1] then --Send 1 random card from your opponent's hand to the GY - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) + local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_HAND,nil) if #g>0 then + break_chk=true local sg=g:RandomSelect(1-tp,1) Duel.SendtoGrave(sg,REASON_EFFECT) end @@ -73,28 +84,20 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) if #g>0 then + Duel.HintSelection(g) + if break_chk then Duel.BreakEffect() end + break_chk=true Duel.SendtoGrave(g,REASON_EFFECT) end end if selection[3] then --Send 1 Spell/Trap your opponent controls to the GY Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_SZONE,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,1,nil) if #g>0 then + Duel.HintSelection(g) + if break_chk then Duel.BreakEffect() end Duel.SendtoGrave(g,REASON_EFFECT) end end end -function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(SET_MATHMECH) - and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) - and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectEffectYesNo(tp,c,96) then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end From 27b8ad45fcaaa14e4b993776481d2b7ff25004a8 Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 6 Jul 2025 16:17:03 -0300 Subject: [PATCH 139/165] Apply 88 Cost.Detach --- unofficial/c100000178.lua | 6 +----- unofficial/c100000179.lua | 6 +----- unofficial/c100000498.lua | 6 +----- unofficial/c100000549.lua | 6 +----- unofficial/c111011803.lua | 6 +----- unofficial/c111011903.lua | 6 +----- unofficial/c111011905.lua | 6 +----- unofficial/c511000034.lua | 6 +----- unofficial/c511000184.lua | 6 +----- unofficial/c511000192.lua | 8 ++------ unofficial/c511000294.lua | 6 +----- unofficial/c511000296.lua | 6 +----- unofficial/c511000512.lua | 6 +----- unofficial/c511000515.lua | 6 +----- unofficial/c511000674.lua | 6 +----- unofficial/c511001247.lua | 6 +----- unofficial/c511001273.lua | 6 +----- unofficial/c511001275.lua | 6 +----- unofficial/c511001338.lua | 6 +----- unofficial/c511001376.lua | 8 ++------ unofficial/c511001432.lua | 6 +----- unofficial/c511001624.lua | 6 +----- unofficial/c511001776.lua | 6 +----- unofficial/c511001779.lua | 6 +----- unofficial/c511001997.lua | 6 +----- unofficial/c511001998.lua | 6 +----- unofficial/c511001999.lua | 6 +----- unofficial/c511002046.lua | 8 ++------ unofficial/c511002054.lua | 6 +----- unofficial/c511002058.lua | 6 +----- unofficial/c511002060.lua | 6 +----- unofficial/c511002064.lua | 6 +----- unofficial/c511002075.lua | 6 +----- unofficial/c511002076.lua | 6 +----- unofficial/c511002077.lua | 6 +----- unofficial/c511002079.lua | 6 +----- unofficial/c511002088.lua | 6 +----- unofficial/c511002090.lua | 6 +----- unofficial/c511002092.lua | 6 +----- unofficial/c511002112.lua | 6 +----- unofficial/c511002543.lua | 6 +----- unofficial/c511002591.lua | 6 +----- unofficial/c511002658.lua | 6 +----- unofficial/c511002749.lua | 6 +----- unofficial/c511002764.lua | 6 +----- unofficial/c511002778.lua | 6 +----- unofficial/c511002829.lua | 6 +----- unofficial/c511002830.lua | 6 +----- unofficial/c511002839.lua | 6 +----- unofficial/c511002858.lua | 6 +----- unofficial/c511002864.lua | 6 +----- unofficial/c511002912.lua | 6 +----- unofficial/c511002913.lua | 6 +----- unofficial/c511003224.lua | 6 +----- unofficial/c511009002.lua | 6 +----- unofficial/c511009062.lua | 6 +----- unofficial/c511009074.lua | 8 ++------ unofficial/c511009321.lua | 6 +----- unofficial/c511009462.lua | 6 +----- unofficial/c511009508.lua | 6 +----- unofficial/c511009560.lua | 6 +----- unofficial/c511010010.lua | 10 +++------- unofficial/c511010020.lua | 8 ++------ unofficial/c511010021.lua | 8 ++------ unofficial/c511010025.lua | 8 ++------ unofficial/c511010032.lua | 6 +----- unofficial/c511010034.lua | 6 +----- unofficial/c511010047.lua | 6 +----- unofficial/c511010056.lua | 6 +----- unofficial/c511010064.lua | 6 +----- unofficial/c511010083.lua | 6 +----- unofficial/c511010096.lua | 6 +----- unofficial/c511010104.lua | 6 +----- unofficial/c511010139.lua | 6 +----- unofficial/c511010504.lua | 6 +----- unofficial/c511010515.lua | 6 +----- unofficial/c511015129.lua | 6 +----- unofficial/c511020000.lua | 6 +----- unofficial/c511600298.lua | 6 +----- unofficial/c511600369.lua | 6 +----- unofficial/c511600384.lua | 6 +----- unofficial/c513000018.lua | 6 +----- unofficial/c513000061.lua | 6 +----- unofficial/c513000062.lua | 6 +----- unofficial/c513000141.lua | 6 +----- unofficial/c700000026.lua | 6 +----- unofficial/c810000081.lua | 6 +----- 87 files changed, 96 insertions(+), 444 deletions(-) diff --git a/unofficial/c100000178.lua b/unofficial/c100000178.lua index 15415cad73..e60ad62716 100644 --- a/unofficial/c100000178.lua +++ b/unofficial/c100000178.lua @@ -11,14 +11,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c100000179.lua b/unofficial/c100000179.lua index 782e9f33e8..c2cfb990e6 100644 --- a/unofficial/c100000179.lua +++ b/unofficial/c100000179.lua @@ -11,14 +11,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/unofficial/c100000498.lua b/unofficial/c100000498.lua index 5c7d3b947a..638f90ee09 100644 --- a/unofficial/c100000498.lua +++ b/unofficial/c100000498.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) diff --git a/unofficial/c100000549.lua b/unofficial/c100000549.lua index 1ba619107c..ae0132126b 100644 --- a/unofficial/c100000549.lua +++ b/unofficial/c100000549.lua @@ -11,14 +11,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c111011803.lua b/unofficial/c111011803.lua index 4d792ea0d7..695b54ab70 100644 --- a/unofficial/c111011803.lua +++ b/unofficial/c111011803.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_DESTROY) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=eg:GetFirst() if chk==0 then return Duel.GetLocationCount(tc:GetPreviousControler(),LOCATION_SZONE)>0 diff --git a/unofficial/c111011903.lua b/unofficial/c111011903.lua index 64947ed03b..07d7efcb90 100644 --- a/unofficial/c111011903.lua +++ b/unofficial/c111011903.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()~=0 end diff --git a/unofficial/c111011905.lua b/unofficial/c111011905.lua index 8d2bf1573f..10dad40532 100644 --- a/unofficial/c111011905.lua +++ b/unofficial/c111011905.lua @@ -11,15 +11,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) diff --git a/unofficial/c511000034.lua b/unofficial/c511000034.lua index c7e4963279..c2ad485c63 100644 --- a/unofficial/c511000034.lua +++ b/unofficial/c511000034.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) c:RegisterEffect(e2) end @@ -43,10 +43,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return (a:GetControler()==tp and a:IsRelateToBattle()) or (d and d:GetControler()==tp and d:IsRelateToBattle()) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end diff --git a/unofficial/c511000184.lua b/unofficial/c511000184.lua index 4a685b935d..ec1101a47a 100644 --- a/unofficial/c511000184.lua +++ b/unofficial/c511000184.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_START) e1:SetCondition(s.tbcon) - e1:SetCost(s.tbcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.tbop) c:RegisterEffect(e1) --battle indestructable @@ -28,10 +28,6 @@ function s.tbcon(e,tp,eg,ep,ev,re,r,rp) if bc==c then bc=Duel.GetAttackTarget() end return bc and bc:IsFaceup() and bc:GetAttack()>c:GetAttack() end -function s.tbcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.tbop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=Duel.GetAttacker() diff --git a/unofficial/c511000192.lua b/unofficial/c511000192.lua index 2d17cd110c..b9895d402e 100644 --- a/unofficial/c511000192.lua +++ b/unofficial/c511000192.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetCountLimit(1) - e4:SetCost(s.cost) + e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.op2) c:RegisterEffect(e4) --Prevent Effect damage @@ -49,7 +49,7 @@ function s.initial_effect(c) e5:SetCode(EVENT_FREE_CHAIN) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) - e5:SetCost(s.cost) + e5:SetCost(Cost.Detach(1)) e5:SetOperation(s.op3) c:RegisterEffect(e5) end @@ -69,10 +69,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.GetControl(bc,tp,PHASE_BATTLE,1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.op2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511000294.lua b/unofficial/c511000294.lua index ac6304cfc4..55ea13b4aa 100644 --- a/unofficial/c511000294.lua +++ b/unofficial/c511000294.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.descost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) @@ -86,10 +86,6 @@ function s.desrepop(e,tp,eg,ep,ev,re,r,rp) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.desfilter(c,e,tp) return Duel.IsExistingMatchingCard(s.xyzfilter,c:GetControler(),LOCATION_EXTRA,0,1,nil,e,tp,c) end diff --git a/unofficial/c511000296.lua b/unofficial/c511000296.lua index 21d0ddca9b..2faa3d0e9c 100644 --- a/unofficial/c511000296.lua +++ b/unofficial/c511000296.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e7:SetCode(EVENT_BE_BATTLE_TARGET) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.nacon) - e7:SetCost(s.nacost) + e7:SetCost(Cost.Detach(1)) e7:SetTarget(s.natg) e7:SetOperation(s.naop) c:RegisterEffect(e7) @@ -124,10 +124,6 @@ function s.nacon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return d and d:IsControler(tp) end -function s.nacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.natg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsOnField() end Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,Duel.GetAttacker():GetAttack()) diff --git a/unofficial/c511000512.lua b/unofficial/c511000512.lua index 92a5be8d02..6fdcda73e3 100644 --- a/unofficial/c511000512.lua +++ b/unofficial/c511000512.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -29,10 +29,6 @@ s.xyz_number=28 function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget()==nil and Duel.GetAttacker()==e:GetHandler() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end Duel.SetTargetPlayer(1-tp) diff --git a/unofficial/c511000515.lua b/unofficial/c511000515.lua index a14c92ef50..1c8a8f36e6 100644 --- a/unofficial/c511000515.lua +++ b/unofficial/c511000515.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetCondition(s.atcon) - e3:SetCost(s.atcost) + e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.atop) c:RegisterEffect(e3) --remove @@ -93,10 +93,6 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()==c and c:CanChainAttack() end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() end diff --git a/unofficial/c511000674.lua b/unofficial/c511000674.lua index 6e639b13f2..202df306b2 100644 --- a/unofficial/c511000674.lua +++ b/unofficial/c511000674.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.cost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.target) e4:SetOperation(s.operation) c:RegisterEffect(e4) @@ -40,10 +40,6 @@ end function s.atkfilter(e,c) return c:IsSpecialSummoned() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsSpecialSummoned() and c:IsFaceup() and c:GetAttack()>0 end diff --git a/unofficial/c511001247.lua b/unofficial/c511001247.lua index 5ed3e62872..341a53db25 100644 --- a/unofficial/c511001247.lua +++ b/unofficial/c511001247.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/unofficial/c511001273.lua b/unofficial/c511001273.lua index cfb7ff2135..da3a6c8803 100644 --- a/unofficial/c511001273.lua +++ b/unofficial/c511001273.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -56,10 +56,6 @@ s.xyz_number=37 function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end diff --git a/unofficial/c511001275.lua b/unofficial/c511001275.lua index 33b6a7d6bb..b66301381d 100644 --- a/unofficial/c511001275.lua +++ b/unofficial/c511001275.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.con) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.op) c:RegisterEffect(e3) --gain atk @@ -98,10 +98,6 @@ end function s.con(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()~=e:GetHandler() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then diff --git a/unofficial/c511001338.lua b/unofficial/c511001338.lua index 1e29a53212..e960dc77a1 100644 --- a/unofficial/c511001338.lua +++ b/unofficial/c511001338.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -75,10 +75,6 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,g) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end diff --git a/unofficial/c511001376.lua b/unofficial/c511001376.lua index e7e7074040..9cc598cc1a 100644 --- a/unofficial/c511001376.lua +++ b/unofficial/c511001376.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e3) e4:SetCondition(s.retcon) - e4:SetCost(s.cost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.rettg) e4:SetOperation(s.retop) c:RegisterEffect(e4) @@ -84,10 +84,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) diff --git a/unofficial/c511001432.lua b/unofficial/c511001432.lua index da3718cb9a..60467b1eb2 100644 --- a/unofficial/c511001432.lua +++ b/unofficial/c511001432.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.damcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) if chk==0 then return ct>0 end diff --git a/unofficial/c511001624.lua b/unofficial/c511001624.lua index bd0024bc0d..e35d8f5f08 100644 --- a/unofficial/c511001624.lua +++ b/unofficial/c511001624.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL end diff --git a/unofficial/c511001776.lua b/unofficial/c511001776.lua index ca3a0cba44..a3070b14a2 100644 --- a/unofficial/c511001776.lua +++ b/unofficial/c511001776.lua @@ -60,7 +60,7 @@ function s.initial_effect(c) e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.discon) - e6:SetCost(s.discost) + e6:SetCost(Cost.Detach(1)) e6:SetTarget(s.distg) e6:SetOperation(s.disop) c:RegisterEffect(e6) @@ -141,10 +141,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(s.disfilter,1,nil,eq) and Duel.IsChainDisablable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) diff --git a/unofficial/c511001779.lua b/unofficial/c511001779.lua index 68b93d45a7..f971fc288d 100644 --- a/unofficial/c511001779.lua +++ b/unofficial/c511001779.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,10 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=19 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) local g=c:GetMaterial():Filter(Card.IsLocation,nil,LOCATION_GRAVE) return c:IsFaceup() and c:IsType(TYPE_XYZ) and #g>0 diff --git a/unofficial/c511001997.lua b/unofficial/c511001997.lua index 70cfe2e90e..d5fe7a21f4 100644 --- a/unofficial/c511001997.lua +++ b/unofficial/c511001997.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -59,10 +59,6 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsDestructable() end diff --git a/unofficial/c511001998.lua b/unofficial/c511001998.lua index db6d8c4505..b2d211dcb8 100644 --- a/unofficial/c511001998.lua +++ b/unofficial/c511001998.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) - e4:SetCost(s.spcost) + e4:SetCost(Cost.Detach(1)) e4:SetCondition(s.spcon) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) @@ -65,10 +65,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end diff --git a/unofficial/c511001999.lua b/unofficial/c511001999.lua index e43d4c4a31..3477e3a837 100644 --- a/unofficial/c511001999.lua +++ b/unofficial/c511001999.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=15 -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsType(TYPE_XYZ) and (c:IsFaceup() or c:GetOverlayCount()>0) end diff --git a/unofficial/c511002046.lua b/unofficial/c511002046.lua index dbf369ac6b..9527c67717 100644 --- a/unofficial/c511002046.lua +++ b/unofficial/c511002046.lua @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_FREE_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(tc) @@ -50,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(id) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) @@ -62,10 +62,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return a~=nil and d and d==e:GetHandler() and not e:GetHandler():IsStatus(STATUS_CHAINING) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.NegateAttack() diff --git a/unofficial/c511002054.lua b/unofficial/c511002054.lua index 837d96591c..3eca1ae67b 100644 --- a/unofficial/c511002054.lua +++ b/unofficial/c511002054.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(10389142,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=42 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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.IsPlayerCanSpecialSummonMonster(tp,10389143,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end diff --git a/unofficial/c511002058.lua b/unofficial/c511002058.lua index a3f90cf408..241c39ddf5 100644 --- a/unofficial/c511002058.lua +++ b/unofficial/c511002058.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(95100120,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.adcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) c:RegisterEffect(e1) @@ -32,10 +32,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=52 -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return e:GetHandler():IsDefenseAbove(100) end end diff --git a/unofficial/c511002060.lua b/unofficial/c511002060.lua index 8083fc116b..bf97a8b0f1 100644 --- a/unofficial/c511002060.lua +++ b/unofficial/c511002060.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=50 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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(1-tp) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511002064.lua b/unofficial/c511002064.lua index 18e2eaf2e6..44bff4b09e 100644 --- a/unofficial/c511002064.lua +++ b/unofficial/c511002064.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -36,10 +36,6 @@ s.xyz_number=82 function s.filter(c) return c:IsFaceup() and (c:IsSetCard(0x528) or c:IsCode(31437713)) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) and not e:GetHandler():IsStatus(STATUS_CHAINING) end diff --git a/unofficial/c511002075.lua b/unofficial/c511002075.lua index fa4d8ba0f6..214169475e 100644 --- a/unofficial/c511002075.lua +++ b/unofficial/c511002075.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:GetRank()0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsType(TYPE_XYZ) end diff --git a/unofficial/c511002076.lua b/unofficial/c511002076.lua index 1696d7abc0..e4013ebc7e 100644 --- a/unofficial/c511002076.lua +++ b/unofficial/c511002076.lua @@ -8,15 +8,11 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRankBelow(4) end diff --git a/unofficial/c511002077.lua b/unofficial/c511002077.lua index e86a00fd2a..7c51119660 100644 --- a/unofficial/c511002077.lua +++ b/unofficial/c511002077.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=17 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002079.lua b/unofficial/c511002079.lua index 2214f44f4e..913a986387 100644 --- a/unofficial/c511002079.lua +++ b/unofficial/c511002079.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.negcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -46,10 +46,6 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_series={0xba} -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) diff --git a/unofficial/c511002088.lua b/unofficial/c511002088.lua index 4495ad655a..fb7976884c 100644 --- a/unofficial/c511002088.lua +++ b/unofficial/c511002088.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(29669359,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=61 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) diff --git a/unofficial/c511002090.lua b/unofficial/c511002090.lua index 6f8b62a74e..d66b06550a 100644 --- a/unofficial/c511002090.lua +++ b/unofficial/c511002090.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.lpcost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.lpop) c:RegisterEffect(e2) --lp - 0 materials @@ -109,10 +109,6 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) s.equipop(c,e,tp,tc) end end -function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) end diff --git a/unofficial/c511002092.lua b/unofficial/c511002092.lua index fc071c21a0..ae2ee03f3c 100644 --- a/unofficial/c511002092.lua +++ b/unofficial/c511002092.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --battle indestructable @@ -29,10 +29,6 @@ s.xyz_number=73 function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002112.lua b/unofficial/c511002112.lua index c00140df87..9261d093c0 100644 --- a/unofficial/c511002112.lua +++ b/unofficial/c511002112.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511002543.lua b/unofficial/c511002543.lua index 3183bebd1f..50b2dcc8ed 100644 --- a/unofficial/c511002543.lua +++ b/unofficial/c511002543.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.discost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) e2:SetCode(3682106) c:RegisterEffect(e2) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511002591.lua b/unofficial/c511002591.lua index 19e4055d62..7df24c8896 100644 --- a/unofficial/c511002591.lua +++ b/unofficial/c511002591.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetHintTiming(0,TIMING_MAIN_END) e2:SetCondition(s.mtcon) - e2:SetCost(s.mtcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.mttg) e2:SetOperation(s.mtop) c:RegisterEffect(e2) @@ -33,10 +33,6 @@ end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) or Duel.IsAbleToEnterBP() end -function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.mtfilter(c) return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) and c:GetFlagEffect(id)==0 end diff --git a/unofficial/c511002658.lua b/unofficial/c511002658.lua index 5debd36d0e..e7112e2537 100644 --- a/unofficial/c511002658.lua +++ b/unofficial/c511002658.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=10 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) diff --git a/unofficial/c511002749.lua b/unofficial/c511002749.lua index b1a1ba14f9..1152b00353 100644 --- a/unofficial/c511002749.lua +++ b/unofficial/c511002749.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -32,10 +32,6 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.xyz_number=66 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,ec) return not ec:IsHasCardTarget(c) end diff --git a/unofficial/c511002764.lua b/unofficial/c511002764.lua index 1b9da64166..4a6ba07391 100644 --- a/unofficial/c511002764.lua +++ b/unofficial/c511002764.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.retcost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) c:RegisterEffect(e1) end -function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) diff --git a/unofficial/c511002778.lua b/unofficial/c511002778.lua index aebbd28f28..04b8654948 100644 --- a/unofficial/c511002778.lua +++ b/unofficial/c511002778.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -31,10 +31,6 @@ end function s.mfilter(c,xyz,sumtype,tp) return c:IsRace(RACE_MACHINE,xyz,sumtype,tp) and c:IsAttribute(ATTRIBUTE_EARTH,xyz,sumtype,tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,0,1,e:GetHandler()) end diff --git a/unofficial/c511002829.lua b/unofficial/c511002829.lua index 8acfeaff74..28ca0b03ba 100644 --- a/unofficial/c511002829.lua +++ b/unofficial/c511002829.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(30741334,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) diff --git a/unofficial/c511002830.lua b/unofficial/c511002830.lua index 708e43beed..1f7fcc7521 100644 --- a/unofficial/c511002830.lua +++ b/unofficial/c511002830.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.ctcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) @@ -34,10 +34,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=40 -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end end diff --git a/unofficial/c511002839.lua b/unofficial/c511002839.lua index 8ed0fc9251..57931e100c 100644 --- a/unofficial/c511002839.lua +++ b/unofficial/c511002839.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(74416224,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0) diff --git a/unofficial/c511002858.lua b/unofficial/c511002858.lua index 07e53ec77b..4d8eab858e 100644 --- a/unofficial/c511002858.lua +++ b/unofficial/c511002858.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) c:RegisterEffect(e3) @@ -46,10 +46,6 @@ function s.desop1(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable() end diff --git a/unofficial/c511002864.lua b/unofficial/c511002864.lua index 9b3b705eba..b354aff227 100644 --- a/unofficial/c511002864.lua +++ b/unofficial/c511002864.lua @@ -10,14 +10,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511002912.lua b/unofficial/c511002912.lua index d4adb04c09..b2ba80563d 100644 --- a/unofficial/c511002912.lua +++ b/unofficial/c511002912.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 end diff --git a/unofficial/c511002913.lua b/unofficial/c511002913.lua index d94b30cbd5..5a2f005911 100644 --- a/unofficial/c511002913.lua +++ b/unofficial/c511002913.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,10 +30,6 @@ s.xyz_number=94 function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end diff --git a/unofficial/c511003224.lua b/unofficial/c511003224.lua index 624c9112aa..edc3cc14c8 100644 --- a/unofficial/c511003224.lua +++ b/unofficial/c511003224.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,10 +22,6 @@ function s.xyzcheck(g,tp,xyz) local mg=g:Filter(Card.IsAttribute,nil,ATTRIBUTE_EARTH) return #mg>0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if e:GetHandler():IsDefensePos() then diff --git a/unofficial/c511009002.lua b/unofficial/c511009002.lua index 44bfa814bb..2b35604398 100644 --- a/unofficial/c511009002.lua +++ b/unofficial/c511009002.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetCondition(s.btcon) - e2:SetCost(s.btcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.bttg) e2:SetOperation(s.btop) c:RegisterEffect(e2) @@ -78,10 +78,6 @@ end function s.btcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetBattleDamage(tp)>0 or Duel.GetBattleDamage(1-tp)>0 end -function s.btcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.bttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end e:GetHandler():RegisterFlagEffect(id,RESET_CHAIN,0,1) diff --git a/unofficial/c511009062.lua b/unofficial/c511009062.lua index 45eee02058..4f515c4c0c 100644 --- a/unofficial/c511009062.lua +++ b/unofficial/c511009062.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -21,10 +21,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()==PHASE_MAIN1 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:GetEffectCount(EFFECT_DIRECT_ATTACK)==0 end diff --git a/unofficial/c511009074.lua b/unofficial/c511009074.lua index 1cd352f824..ef65440de5 100644 --- a/unofficial/c511009074.lua +++ b/unofficial/c511009074.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) local e2=Effect.CreateEffect(c) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_CHAINING) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetCondition(s.discon) e3:SetTarget(s.distg) e3:SetOperation(s.disop) @@ -54,10 +54,6 @@ end function s.eftg(e,c) return c==e:GetHandler() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:HasNonZeroAttack() and c:IsLevelAbove(5) end diff --git a/unofficial/c511009321.lua b/unofficial/c511009321.lua index 57bf6189c5..00eaa7d5b8 100644 --- a/unofficial/c511009321.lua +++ b/unofficial/c511009321.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,10 +22,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511009462.lua b/unofficial/c511009462.lua index 6b9c84d8d1..f63ab76898 100644 --- a/unofficial/c511009462.lua +++ b/unofficial/c511009462.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end diff --git a/unofficial/c511009508.lua b/unofficial/c511009508.lua index 0b01d28b87..a1e2bf1689 100644 --- a/unofficial/c511009508.lua +++ b/unofficial/c511009508.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -68,10 +68,6 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattleTarget() and e:GetHandler():GetBattleTarget():IsControler(1-tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local bc=c:GetBattleTarget() diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index 0a87b8b98b..e96a37712a 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.indcon) - e1:SetCost(s.indcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.indop) c:RegisterEffect(e1) --effect @@ -34,10 +34,6 @@ function s.indcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then diff --git a/unofficial/c511010010.lua b/unofficial/c511010010.lua index 1d4b0db55d..5ab9b1081b 100644 --- a/unofficial/c511010010.lua +++ b/unofficial/c511010010.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=10 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) @@ -43,5 +39,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.indes(e,c) -return not c:IsSetCard(SET_NUMBER) -end + return not c:IsSetCard(SET_NUMBER) +end \ No newline at end of file diff --git a/unofficial/c511010020.lua b/unofficial/c511010020.lua index 52e23d964b..f09eb7ab90 100644 --- a/unofficial/c511010020.lua +++ b/unofficial/c511010020.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=20 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -41,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010021.lua b/unofficial/c511010021.lua index 918f1f6455..3ee670b92a 100644 --- a/unofficial/c511010021.lua +++ b/unofficial/c511010021.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -34,10 +34,6 @@ s.xyz_number=21 function s.atkval(e,c) return c:GetOverlayCount()*1000 end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.desfilter(c) return c:IsDefensePos() end @@ -52,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010025.lua b/unofficial/c511010025.lua index 69d422e329..d136535b0b 100644 --- a/unofficial/c511010025.lua +++ b/unofficial/c511010025.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -32,10 +32,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return re:GetHandler():IsCanBeEffectTarget(e) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -63,4 +59,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/unofficial/c511010032.lua b/unofficial/c511010032.lua index ddd6ff25ec..73ca26c0a2 100644 --- a/unofficial/c511010032.lua +++ b/unofficial/c511010032.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.atcon) - e1:SetCost(s.atcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) @@ -31,10 +31,6 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) return c==Duel.GetAttacker() and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetAttackTarget():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp) end diff --git a/unofficial/c511010034.lua b/unofficial/c511010034.lua index e2f5db3e81..3bfc44b465 100644 --- a/unofficial/c511010034.lua +++ b/unofficial/c511010034.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -25,10 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=34 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttackPos() and c:IsLevelBelow(4) and c:IsControlerCanBeChanged() end diff --git a/unofficial/c511010047.lua b/unofficial/c511010047.lua index 2466bb953b..759a3e2074 100644 --- a/unofficial/c511010047.lua +++ b/unofficial/c511010047.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.dacon) - e2:SetCost(s.dacost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.datg) e2:SetOperation(s.daop) c:RegisterEffect(e2) @@ -50,10 +50,6 @@ end function s.dacon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) end diff --git a/unofficial/c511010056.lua b/unofficial/c511010056.lua index c2cfe47837..0c68201383 100644 --- a/unofficial/c511010056.lua +++ b/unofficial/c511010056.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.drcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=56 -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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) diff --git a/unofficial/c511010064.lua b/unofficial/c511010064.lua index 0eb0026ed4..a0ab0ceccf 100644 --- a/unofficial/c511010064.lua +++ b/unofficial/c511010064.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -34,10 +34,6 @@ function s.initial_effect(c) end s.listed_names={39972130} s.xyz_number=64 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -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.IsPlayerCanSpecialSummonMonster(tp,39972130,0,TYPES_TOKEN,-2,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end diff --git a/unofficial/c511010083.lua b/unofficial/c511010083.lua index e00217e3df..c2c7e89aa4 100644 --- a/unofficial/c511010083.lua +++ b/unofficial/c511010083.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable @@ -22,10 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=83 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local tc=g:GetFirst() diff --git a/unofficial/c511010096.lua b/unofficial/c511010096.lua index a13643fc5f..75099b7a10 100644 --- a/unofficial/c511010096.lua +++ b/unofficial/c511010096.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -23,10 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e6) end s.xyz_number=96 -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local at=Duel.GetAttackTarget() if chk==0 then return ((at and at:IsFaceup() and Duel.GetAttacker()==e:GetHandler()) or at==e:GetHandler()) diff --git a/unofficial/c511010104.lua b/unofficial/c511010104.lua index 114946911b..e7218ef756 100644 --- a/unofficial/c511010104.lua +++ b/unofficial/c511010104.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -44,10 +44,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and (ph>PHASE_MAIN1 and ph0 diff --git a/unofficial/c810000081.lua b/unofficial/c810000081.lua index b65813fa3a..dd9af32558 100644 --- a/unofficial/c810000081.lua +++ b/unofficial/c810000081.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetCondition(s.discon) e1:SetTarget(s.distg) e1:SetOperation(s.disop) @@ -26,10 +26,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=3 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.discon(e,tp,eg,ep,ev,re,r,rp) local tgp,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) From 8bf98678c29b4480d9300c178ac718709d5196cd Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 6 Jul 2025 23:24:40 +0300 Subject: [PATCH 140/165] Some Xyz updates --- official/c20145685.lua | 63 ++++++++++++++----------------- official/c27337596.lua | 27 +++++++------- official/c29669359.lua | 49 +++++++++++------------- official/c30741334.lua | 24 ++++++------ official/c51735257.lua | 57 ++++++++++++++-------------- official/c60517697.lua | 30 +++++++-------- official/c61399402.lua | 84 +++++++++++++++++++----------------------- official/c69655484.lua | 11 ++---- official/c80117527.lua | 41 +++++++++++---------- 9 files changed, 176 insertions(+), 210 deletions(-) diff --git a/official/c20145685.lua b/official/c20145685.lua index 748462eb17..0af5204fd5 100644 --- a/official/c20145685.lua +++ b/official/c20145685.lua @@ -4,56 +4,49 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2 Level 5 monsters OR 1 Rank 3 or 4 Xyz Monster you control Xyz.AddProcedure(c,nil,5,2,s.xyzfilter,aux.Stringid(id,0),2,s.xyzop) - --Cannot be used as material for an Xyz Summon + --Cannot be used as material for an Xyz Summon while it has material + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e0:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e0:SetValue(1) + c:RegisterEffect(e0) + --Add "Armored Xyz" cards with different names from your Deck to your hand, equal to the number of materials detached local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) - e1:SetValue(1) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(Cost.Detach(1,s.thmaxcost,function(e,og) e:SetLabel(#og) end)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Add "Armored Xyz" cards with different names from your Deck to your hand + --If a monster equipped with this card battles a monster, any battle damage it inflicts to your opponent is doubled local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) + e2:SetType(EFFECT_TYPE_EQUIP) + e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget():GetBattleTarget() end) + e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) c:RegisterEffect(e2) - --Double battle damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():GetBattleTarget() end) - e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - c:RegisterEffect(e3) end s.listed_names={id} s.listed_series={SET_ARMORED_XYZ} function s.xyzfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsRank(3,4) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) + return c:IsRank(3,4) 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 not Duel.HasFlagEffect(tp,id) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - return true + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.thfilter(c) return c:IsSetCard(SET_ARMORED_XYZ) and c:IsAbleToHand() end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - local ct=g:GetClassCount(Card.GetCode) - local rt=math.min(ct,c:GetOverlayCount(),2) - if chk==0 then return rt>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) - e:SetLabel(ct) +function s.thmaxcost(e,tp) + return math.min(2,Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -68,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(thg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,thg) end -end +end \ No newline at end of file diff --git a/official/c27337596.lua b/official/c27337596.lua index 9fb178e6bc..d7cc3b8e22 100644 --- a/official/c27337596.lua +++ b/official/c27337596.lua @@ -2,34 +2,32 @@ --Hieratic Dragon King of Atum local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 6 Dragon monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),6,2) - --Special summon 1 dragon monster from deck + --Special Summon 1 Dragon monster from your Deck, and make its ATK/DEF 0 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.spcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.spcost)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:GetAttackAnnouncedCount()==0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - --Cannot attack this turn + if chk==0 then return c:GetAttackAnnouncedCount()==0 end + --This card cannot attack during the turn you activate this effect local e1=Effect.CreateEffect(c) e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - c:RemoveOverlayCard(tp,1,1,REASON_COST) end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -42,18 +40,19 @@ 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 tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --ATK/DEF becomes 0 + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Make its ATK/DEF 0 local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) + sc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) - tc:RegisterEffect(e2) + sc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c29669359.lua b/official/c29669359.lua index 7b7768a760..c4fc7c4e86 100644 --- a/official/c29669359.lua +++ b/official/c29669359.lua @@ -2,57 +2,52 @@ --Number 61: Volcasaurus local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 5 monsters Xyz.AddProcedure(c,nil,5,2) - --Destroy 1 of opponent's monsters, and if you do, inflict damage equal to its original ATK + --Destroy 1 face-up monster your opponent controls, and if you do, inflict damage to your opponent equal to the destroyed monster's original ATK local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCountLimit(1) + e1:SetCost(Cost.AND(Cost.Detach(1),s.descost)) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) c:RegisterEffect(e1) end s.xyz_number=61 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and not e:GetHandler():IsDirectAttacked() end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - --Cannot attack directly - local e1=Effect.CreateEffect(e:GetHandler()) +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsDirectAttacked() end + --This card cannot attack your opponent directly the turn you activate this effect + local e1=Effect.CreateEffect(c) e1:SetDescription(3207) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function s.filter(c) - return c:IsFaceup() + c:RegisterEffect(e1) 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(1-tp) and chkc:IsFaceup() 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_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - local atk=g:GetFirst():GetTextAttack() + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + local atk=tc:GetTextAttack() if atk<0 then atk=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then + if tc:IsRelateToEffect(e) and tc:IsMonster() and tc:IsControler(1-tp) then local atk=tc:GetTextAttack() if atk<0 then atk=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then + if Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c30741334.lua b/official/c30741334.lua index ddaf2c76a9..ae411abdcf 100644 --- a/official/c30741334.lua +++ b/official/c30741334.lua @@ -12,32 +12,30 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(3,id) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCost(Cost.AND(Cost.Detach(1),s.drcost)) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) end local c=e:GetHandler() - if chk==0 then return Duel.IsPhase(PHASE_MAIN1) - and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) --You cannot conduct your Battle Phase the turn you activate this effect - local e1=Effect.CreateEffect(e:GetHandler()) + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) + e1:SetCode(EFFECT_CANNOT_BP) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,800) end -function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drop(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.Draw(tp,1,REASON_EFFECT) if ct==0 then return end local dc=Duel.GetOperatedGroup():GetFirst() @@ -47,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c51735257.lua b/official/c51735257.lua index 3166326af2..9540d9ec7b 100644 --- a/official/c51735257.lua +++ b/official/c51735257.lua @@ -2,54 +2,51 @@ --Number 50: Blackship of Corn local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --Send 1 of opponent's monsters to GY, and if you do, inflict 1000 damage + --Send 1 monster your opponent controls to the GY, and if you do, inflict 1000 damage to them local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCountLimit(1) + e1:SetCost(Cost.AND(Cost.Detach(1),s.tgcost)) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) c:RegisterEffect(e1) end s.xyz_number=50 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - --Cannot attack this turn - local e1=Effect.CreateEffect(e:GetHandler()) +function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:GetAttackAnnouncedCount()==0 end + --This card cannot attack during the turn you activate this effect + local e1=Effect.CreateEffect(c) e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) - e:GetHandler():RegisterEffect(e1) + c:RegisterEffect(e1) end -function s.filter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) +function s.tgfilter(c,atk) + return c:IsAttackBelow(atk) and c:IsFaceup() and c:IsAbleToGrave() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e:GetHandler():GetAttack()) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local atk=e:GetHandler():GetAttack() + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,atk) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_MZONE,1,nil,atk) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,atk) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - if tc:IsLocation(LOCATION_GRAVE) then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end + if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)>0 + and tc:IsLocation(LOCATION_GRAVE) then + Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60517697.lua b/official/c60517697.lua index 82b9878e3b..aa1ad13f02 100644 --- a/official/c60517697.lua +++ b/official/c60517697.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 7 monsters + --Xyz Summon procedure: 3 Level 7 monsters OR 1 "Atlantean" or "Mermail" Xyz Monster you control Xyz.AddProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) --Return up to 3 cards your opponent controls to the hand local e1=Effect.CreateEffect(c) @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) + e1:SetCost(Cost.AND(Cost.Detach(2),s.rthcost)) + e1:SetTarget(s.rthtg) + e1:SetOperation(s.rthop) c:RegisterEffect(e1) --Special Summon 3 Level 3 or lower Fish, Sea Serpent, and/or Aqua monsters from your hand and/or GY. local e2=Effect.CreateEffect(c) @@ -33,30 +33,26 @@ end s.listed_series={SET_ATLANTEAN,SET_MERMAIL} s.listed_names={id} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(s.listed_series,lc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) + return c:IsSetCard(s.listed_series,lc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() end function s.xyzop(e,tp,chk) if chk==0 then return not Duel.HasFlagEffect(tp,id) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - return true + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end -function s.thcostfilter(c) +function s.rthcostfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) - and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end - c:RemoveOverlayCard(tp,2,2,REASON_COST) +function s.rthcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rthcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rthcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD) end -function s.thop(e,tp,eg,ep,ev,re,r,rp) +function s.rthop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,3,nil) if #g>0 then @@ -88,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g==3 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61399402.lua b/official/c61399402.lua index d5267ad31c..8320a29688 100644 --- a/official/c61399402.lua +++ b/official/c61399402.lua @@ -4,65 +4,70 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --destroy monsters + --If a monster(s) you control would be destroyed by card effect, you can detach 1 material from this card instead local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(s.descost) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) + e1:SetTarget(s.reptg) + e1:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) c:RegisterEffect(e1) - --special summon + --Dstroy face-up monsters your opponent controls, up to the number of "@Ignister" monsters you control local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.Detach(1)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) c:RegisterEffect(e2) - --destruction replacement + --Special Summon 1 Link Monster from your GY local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EFFECT_DESTROY_REPLACE) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetRange(LOCATION_MZONE) - e3:SetTarget(s.reptg) - e3:SetValue(s.repval) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_series={SET_IGNISTER} -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.repfilter(c,tp) + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end + return Duel.SelectEffectYesNo(tp,c,96) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)>0 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) if chk==0 then return #g>0 and Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,nil)>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,nil) - if ct<1 then return end + if ct==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,ct,nil) if #g>0 then + Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return ep==1-tp and tc:IsControler(tp) and tc:IsRace(RACE_CYBERSE) and tc~=e:GetHandler() + local bc=eg:GetFirst() + return ep==1-tp and bc:IsControler(tp) and bc:IsRace(RACE_CYBERSE) and bc~=e:GetHandler() end function s.spfilter(c,e,tp) - return c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLinkMonster() 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 @@ -72,23 +77,8 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end 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) + 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 -function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then - local c=e:GetHandler() - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end -function s.repval(e,c) - return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c69655484.lua b/official/c69655484.lua index b35e6fe453..ef1890e063 100644 --- a/official/c69655484.lua +++ b/official/c69655484.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BECOME_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp,eg) return eg:IsContains(e:GetHandler()) end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.edsptg) e1:SetOperation(s.edspop) c:RegisterEffect(e1) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.AND(Cost.Detach(1),s.thcost)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -63,10 +63,7 @@ function s.thcostfilter(c) return c:IsSetCard(SET_PERFORMAGE) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_DECK,0,1,nil) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) @@ -100,4 +97,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) 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/c80117527.lua b/official/c80117527.lua index c1a47c4a40..a2d557ead7 100644 --- a/official/c80117527.lua +++ b/official/c80117527.lua @@ -2,44 +2,45 @@ --Number 11: Big Eye local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,2) c:EnableReviveLimit() - --attack up + --Xyz Summon: 2 Level 7 monsters + Xyz.AddProcedure(c,nil,7,2) + --Take control of 1 monster your opponent controls local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCountLimit(1) + e1:SetCost(Cost.AND(Cost.Detach(1),s.ctrlcost)) + e1:SetTarget(s.ctrltg) + e1:SetOperation(s.ctrlop) c:RegisterEffect(e1) end s.xyz_number=11 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetAttackAnnouncedCount()==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) +function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:GetAttackAnnouncedCount()==0 end + --This card cannot attack the turn this effect is activated + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) - e:GetHandler():RegisterEffect(e1) + c:RegisterEffect(e1) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControlerCanBeChanged() end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file From bda2c8c4264ddb7e07d5b32283b17fabdcc4e2c0 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:29:04 +0300 Subject: [PATCH 141/165] Added "Cost.HintSelectedEffect" --- utility.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utility.lua b/utility.lua index 9676a5c4d6..d9066df765 100644 --- a/utility.lua +++ b/utility.lua @@ -1509,6 +1509,12 @@ self_discard_costs[Cost.SelfDiscardToGrave]=true Cost.SelfRelease=Cost.SelfTribute Auxiliary.bfgcost=Cost.SelfBanish + +function Cost.HintSelectedEffect(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) +end + function Cost.Discard(filter,other,count) count=count or 1 filter=filter and aux.AND(filter,Card.IsDiscardable) or Card.IsDiscardable From 8650f4e8f775cb0787a74a20ab6889046881e814 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 7 Jul 2025 14:00:48 +0300 Subject: [PATCH 142/165] More Xyz updates --- official/c18326736.lua | 80 ++++++++++++++--------------------- official/c19891310.lua | 82 ++++++++++++++++-------------------- official/c39030163.lua | 68 ++++++++++++++---------------- official/c44311445.lua | 47 ++++++++++----------- official/c54366836.lua | 47 +++++++-------------- official/c5530780.lua | 82 +++++++++++++++--------------------- official/c56832966.lua | 69 +++++++++++++++---------------- official/c59627393.lua | 94 +++++++++++++++--------------------------- 8 files changed, 236 insertions(+), 333 deletions(-) diff --git a/official/c18326736.lua b/official/c18326736.lua index ace1f31edb..57454fddba 100644 --- a/official/c18326736.lua +++ b/official/c18326736.lua @@ -2,108 +2,92 @@ --Tellarknight Ptolemaeus local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) c:EnableReviveLimit() - --spsummon + --Xyz Summon procedure: 2+ Level 4 monsters + Xyz.AddProcedure(c,nil,4,2,nil,nil,Xyz.InfiniteMats) + --Special Summon from your Extra Deck, 1 Xyz Monster that is 1 Rank higher than this card, except a "Number" monster, by using this face-up card you control as material local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.spcost) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(Cost.AND(Cost.Detach(3),Cost.HintSelectedEffect)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) - --turn skip + --Skip your opponent's next turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.skipcost) - e2:SetTarget(s.skiptg) + e2:SetCost(Cost.AND(Cost.Detach(7),Cost.HintSelectedEffect)) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end end) e2:SetOperation(s.skipop) c:RegisterEffect(e2) - --material + --Attach 1 "Stellarknight" card from your Extra Deck to this card as material local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetTarget(s.mttg) - e3:SetOperation(s.mtop) + e3:SetTarget(s.attachtg) + e3:SetOperation(s.attachop) c:RegisterEffect(e3) end s.listed_series={SET_NUMBER,SET_STELLARKNIGHT} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,3,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,3,3,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) -end -function s.filter(c,e,tp,rk,pg) - return c:IsRank(rk+1) and not c:IsSetCard(SET_NUMBER) and e:GetHandler():IsCanBeXyzMaterial(c,tp) - and (#pg<=0 or pg:IsContains(e:GetHandler())) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 +function s.spfilter(c,e,tp,mc,rk) + return c:IsRank(rk+1) and not c:IsSetCard(SET_NUMBER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(e:GetHandler()),tp,nil,nil,REASON_XYZ) - return #pg<=1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank(),pg) + local c=e:GetHandler() + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end + if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp)) then return end local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if not (#pg<=0 or (#pg==1 and pg:IsContains(c))) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank(),pg) - local sc=g:GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,c:GetRank()):GetFirst() if sc then sc:SetMaterial(c) Duel.Overlay(sc,c) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) + if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end sc:CompleteProcedure() end end -function s.skipcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,7,REASON_COST) end - c:RemoveOverlayCard(tp,7,7,REASON_COST) -end -function s.skiptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end -end function s.skipop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_SKIP_TURN) e1:SetTargetRange(0,1) + e1:SetCondition(function(e) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() end) e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) - e1:SetCondition(s.skipcon) Duel.RegisterEffect(e1,tp) end -function s.skipcon(e) - return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() +function s.attachfilter(c,xyz,tp) + return c:IsSetCard(SET_STELLARKNIGHT) and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) end -function s.mtfilter(c) - return c:IsSetCard(SET_STELLARKNIGHT) +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),tp) end end -function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_EXTRA,0,1,nil) end -end -function s.mtop(e,tp,eg,ep,ev,re,r,rp) +function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.Overlay(c,g) end -end +end \ No newline at end of file diff --git a/official/c19891310.lua b/official/c19891310.lua index 281af953ad..2f67cfb30c 100644 --- a/official/c19891310.lua +++ b/official/c19891310.lua @@ -1,80 +1,70 @@ ---ギアギアギア XG +--ギアギアギア XG --Geargiagear Gigant XG local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,3) c:EnableReviveLimit() - --negate + --Xyz Summon procedure: 3 Level 3 monsters + Xyz.AddProcedure(c,nil,3,3) + --Until the end of the Damage Step, negate the effects of all face-up cards your opponent currently controls, also your opponent cannot activate cards or effects local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetOperation(s.operation) + e1:SetHintTiming(TIMING_ATTACK|TIMING_BATTLE_PHASE) + e1:SetCondition(s.discon) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle)) + e1:SetOperation(s.disop) c:RegisterEffect(e1) - --add to hand + --Add 1 other "Geargia" 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_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(s.thcon) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_series={SET_GEARGIA} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local bt=Duel.GetAttacker() - if bt and bt:IsControler(tp) then return bt:IsRace(RACE_MACHINE) end - bt=Duel.GetAttackTarget() - return bt and bt:IsControler(tp) and bt:IsRace(RACE_MACHINE) +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetBattleMonster(tp) + return bc and bc:IsRace(RACE_MACHINE) and bc:IsFaceup() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + for nc in g:Iter() do + --Negate the effects of all face-up cards your opponent currently controls until the end of the Damage Step + nc:NegateEffects(c,RESET_PHASE|PHASE_DAMAGE,true) + end + --Also, your opponent cannot activate cards or effects until the end of the Damage Step + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(0,LOCATION_ONFIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(0,1) + e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetTargetRange(0,1) - e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE|PHASE_DAMAGE) - Duel.RegisterEffect(e2,tp) -end -function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect() -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) return c:IsSetCard(SET_GEARGIA) 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) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) + 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 and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c39030163.lua b/official/c39030163.lua index 8d649131fe..01773babb5 100644 --- a/official/c39030163.lua +++ b/official/c39030163.lua @@ -1,75 +1,69 @@ ---ギャラクシーアイズ FA・フォトン・ドラゴン +--ギャラクシーアイズ FA・フォトン・ドラゴン --Galaxy-Eyes Full Armor Photon Dragon local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,8,3,s.ovfilter,aux.Stringid(id,0)) c:EnableReviveLimit() - --attach material + --Xyz Summon procedure: 3 Level 8 monsters OR 1 "Galaxy-Eyes" Xyz Monster you control, except "Galaxy-Eyes Full Armor Photon Dragon" + Xyz.AddProcedure(c,nil,8,3,s.ovfilter,aux.Stringid(id,0)) + --Attach up to 2 Equip Cards equipped to this card to this card as material local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.mtcost) - e1:SetTarget(s.mttg) - e1:SetOperation(s.mtop) + e1:SetCost(Cost.HintSelectedEffect) + e1:SetTarget(s.attachtg) + e1:SetOperation(s.attachop) c:RegisterEffect(e1) - --destroy + --Destroy 1 face-up card your opponent controls local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.AND(Cost.Detach(1),Cost.HintSelectedEffect)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end +s.listed_names={id} +s.listed_series={SET_GALAXY_EYES} function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) + return c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) and c:IsFaceup() end -function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) +function s.attachfilter(c,xyzc,e,tp) + return c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) and c:IsCanBeEffectTarget(e) end -function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetHandler():GetEquipGroup() - if chkc then return g:IsContains(chkc) and chkc:IsCanBeEffectTarget(e) end - if chk==0 then return g:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local tg=g:FilterSelect(tp,Card.IsCanBeEffectTarget,1,2,nil,e) +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local eqg=c:GetEquipGroup() + if chkc then return eqg:IsContains(chkc) and s.attachfilter(chkc,c,e,tp) end + if chk==0 then return eqg:IsExists(s.attachfilter,1,nil,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tg=eqg:FilterSelect(tp,s.attachfilter,1,2,nil,c,e,tp) Duel.SetTargetCard(tg) end -function s.mtfilter(c,e) - return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) -end -function s.mtop(e,tp,eg,ep,ev,re,r,rp) +function s.attachop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.mtfilter,nil,e) - if #g>0 then - Duel.Overlay(c,g) + if not c:IsRelateToEffect(e) then return end + local tg=Duel.GetTargetCards(e):Match(aux.NOT(Card.IsImmuneToEffect),nil,e) + if #tg>0 then + Duel.Overlay(c,tg) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44311445.lua b/official/c44311445.lua index 59ee344e73..2b261ffe8b 100644 --- a/official/c44311445.lua +++ b/official/c44311445.lua @@ -2,11 +2,12 @@ --Madolche Puddingcess Chocolat-a-la-Mode local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),5,2,s.ovfilter,aux.Stringid(id,0)) c:EnableReviveLimit() - --todeck + --xyz Summon procedure: 2 Level 5 EARTH monsters OR 1 Rank 4 or lower "Madolche" Xyz Monster you control + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),5,2,s.ovfilter,aux.Stringid(id,0)) + --Shuffle 1 "Madolche" card from your GY into the Deck local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -15,22 +16,24 @@ function s.initial_effect(c) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) - --spsummon + --Special Summon 1 "Madolche" monster from your Deck in Attack Position or face-down Defense Position local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_TO_DECK) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_series={SET_MADOLCHE} -s.listed_names={74641045} +s.listed_names={74641045} --"Madolche Puddingcess" function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsRankBelow(4) and c:IsSetCard(SET_MADOLCHE,lc,SUMMON_TYPE_XYZ,tp) + return c:IsRankBelow(4) and c:IsSetCard(SET_MADOLCHE,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() end function s.tdfilter(c) return c:IsSetCard(SET_MADOLCHE) and c:IsAbleToDeck() @@ -40,7 +43,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -48,18 +51,12 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -function s.cfilter(c,tp) - return c:IsSetCard(SET_MADOLCHE) and c:IsLocation(LOCATION_DECK) - and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_GRAVE) +function s.spconfilter(c,tp) + return c:IsSetCard(SET_MADOLCHE) and c:IsLocation(LOCATION_DECK) and c:IsPreviousControler(tp) + and c:IsPreviousLocation(LOCATION_GRAVE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,74641045) and eg:IsExists(s.cfilter,1,nil,tp) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) + return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,74641045) and eg:IsExists(s.spconfilter,1,nil,tp) end function s.spfilter(c,e,tp) return c:IsSetCard(SET_MADOLCHE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) @@ -72,11 +69,9 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 then - if tc:IsFacedown() then - Duel.ConfirmCards(1-tp,tc) - end + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)>0 + and sc:IsFacedown() then + Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c54366836.lua b/official/c54366836.lua index 89434e7c1d..9228ae60c9 100644 --- a/official/c54366836.lua +++ b/official/c54366836.lua @@ -1,46 +1,42 @@ ---No.54 反骨の闘士ライオンハート +--No.54 反骨の闘士ライオンハート --Number 54: Lion Heart local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,1,3) c:EnableReviveLimit() - --cannot be destroyed + --Xyz Summon procedure: 3 Level 1 monsters + Xyz.AddProcedure(c,nil,1,3) + --This Attack Position card cannot be destroyed by battle local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(s.indcon) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsAttackPos() end) e1:SetValue(1) c:RegisterEffect(e1) - --inflict damage + --Inflict damage to your opponent equal to the battle damage you took local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_BATTLE_DAMAGE) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.damcon) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==tp and e:GetHandler():IsRelateToBattle() end) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) - --change battle damage + --Your opponent takes any battle damage you would have taken from that battle local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetRange(LOCATION_MZONE) - e3:SetCondition(s.damcon2) - e3:SetCost(s.damcost2) - e3:SetOperation(s.damop2) + e3:SetCondition(function(e,tp) local bc=e:GetHandler():GetBattleTarget() return bc and bc:IsControler(1-tp) end) + e3:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle)) + e3:SetOperation(s.reversedamop) c:RegisterEffect(e3) end s.xyz_number=54 -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep==tp and c:IsRelateToBattle() -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -51,24 +47,13 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -function s.damcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil -end -function s.damcost2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(id)==0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_CHAIN,0,1) -end -function s.damop2(e,tp,eg,ep,ev,re,r,rp) +function s.reversedamop(e,tp,eg,ep,ev,re,r,rp) + --Your opponent takes any battle damage you would have taken from that battle local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e1,tp) -end -function s.indcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c5530780.lua b/official/c5530780.lua index 3b3a7b82d1..83690c0f57 100644 --- a/official/c5530780.lua +++ b/official/c5530780.lua @@ -4,96 +4,80 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --2 Level 4 monsters + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --Check materials on Xyz Summon + --Check if this card was Xyz Summoned by using an "Exosister" monster as material local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) - --Effect destruction immunity + --Cannot be destroyed by the activated effects of monsters Special Summoned from the GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) e1:SetValue(s.indval) c:RegisterEffect(e1) - --Negate + --Negate the effects of 1 Effect Monster your opponent controls until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e2:SetCondition(function(e) return e:GetHandler():GetFlagEffect(id)>0 end) - e2:SetTarget(s.ngtg) - e2:SetOperation(s.ngop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e2:SetCost(Cost.HintSelectedEffect) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) c:RegisterEffect(e2) - --Gain ATK + --Apply a "for the rest of this turn, all Xyz Monsters you control will gain 800 ATK" effect local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.AND(Cost.Detach(1),Cost.HintSelectedEffect)) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then - local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END - c:RegisterFlagEffect(id,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + if c:GetMaterial():IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END&~RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.indval(e,re,rp) local rc=re:GetHandler() - return rc:IsSpecialSummoned() and rc:IsSummonLocation(LOCATION_GRAVE) - and re:IsMonsterEffect() and re:IsActivated() + return rc:IsSpecialSummoned() and rc:IsSummonLocation(LOCATION_GRAVE) and re:IsMonsterEffect() and re:IsActivated() end -function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsNegatableMonster() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end +function s.disfilter(c) + return c:IsNegatableMonster() and c:IsType(TYPE_EFFECT) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local tg=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0) + local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end -function s.ngop(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local c=e:GetHandler() - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - --Negate targeted monster's effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) + if tc:IsRelateToEffect(e) then + --Negate its effects until the end of this turn + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) end end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - --Increase ATK - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --For the rest of this turn, all Xyz Monsters you control will gain 800 ATK + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) @@ -101,4 +85,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(800) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c56832966.lua b/official/c56832966.lua index 089e5364eb..5091ffd3b3 100644 --- a/official/c56832966.lua +++ b/official/c56832966.lua @@ -1,64 +1,61 @@ ---SNo.39 希望皇ホープ・ザ・ライトニング +--SNo.39 希望皇ホープ・ザ・ライトニング --Number S39: Utopia the Lightning local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,s.ovfilter,aux.Stringid(id,0)) c:EnableReviveLimit() - --cannot be Xyz material + --Xyz Summon procedure: 3 Level 5 LIGHT monsters OR 1 Rank 4 "Utopia" monster you control + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,s.ovfilter,aux.Stringid(id,0)) + --Cannot be used as material for an Xyz Summon + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e0:SetValue(1) + c:RegisterEffect(e0) + --If this card battles, your opponent cannot activate cards or effects until the end of the Damage Step local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + 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():IsRelateToBattle() end) e1:SetValue(1) c:RegisterEffect(e1) - --actlimit + --This card's ATK becomes 5000 during that damage calculation only local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetValue(1) - e2:SetCondition(s.actcon) + e2:SetCondition(s.atkcon) + e2:SetCost(Cost.AND(Cost.Detach(2),Cost.SoftOncePerBattle)) + e2:SetOperation(s.atkop) c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) end s.listed_series={SET_UTOPIA} s.xyz_number=39 function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==4 + return c:IsRank(4) and c:IsSetCard(SET_UTOPIA,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() end -function s.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() +function s.atkconfilter(c) + return c:IsSetCard(SET_UTOPIA) and c:IsType(TYPE_XYZ) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_UTOPIA) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,2,2,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) + local bc=c:GetBattleTarget() + return bc and bc:IsControler(1-tp) and c:GetOverlayGroup():IsExists(s.atkconfilter,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card's ATK becomes 5000 during that damage calculation only local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(5000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c59627393.lua b/official/c59627393.lua index ea00693eba..3e1ad17f44 100644 --- a/official/c59627393.lua +++ b/official/c59627393.lua @@ -2,75 +2,49 @@ --Number 105: Battlin' Boxer Star Cestus local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 3 Level 4 monsters Xyz.AddProcedure(c,nil,4,3) - --Make your battling "Battlin' Boxer" monster unable to be destroyed by battle and opponent takes the damage instead + --Negate the effects of that opponent's monster while it is face-up until the end of this turn, that monster you control cannot be destroyed by that battle, also your opponent takes any battle damage you would have taken from that battle local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetHintTiming(TIMING_ATTACK|TIMING_BATTLE_PHASE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(s.discon) + e1:SetCost(Cost.Detach(1)) + e1:SetOperation(s.disop) c:RegisterEffect(e1) end -s.listed_series={SET_BATTLIN_BOXER} s.xyz_number=105 -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return Duel.IsBattlePhase() and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(SET_BATTLIN_BOXER)) - or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(SET_BATTLIN_BOXER))) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_DAMAGE,0,1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetTargetCard(Duel.GetAttackTarget()) +s.listed_series={SET_BATTLIN_BOXER} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local bc1,bc2=Duel.GetBattleMonster(tp) + return bc1 and bc2 and bc1:IsSetCard(SET_BATTLIN_BOXER) and bc1:IsFaceup() end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if at:IsControler(tp) then a,at=at,a end - if a:IsFacedown() or not a:IsRelateToEffect(e) or not at:IsRelateToEffect(e) then return end - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3000) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_DAMAGE) - a:RegisterEffect(e1,true) - --Opponent takes the battle damage instead - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetDescription(3112) - e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e2:SetValue(1) - e2:SetReset(RESET_PHASE|PHASE_DAMAGE) - a:RegisterEffect(e2,true) - --Negate opponent's battling monster - if at:IsType(TYPE_EFFECT) then - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE) - e3:SetReset(RESETS_STANDARD_PHASE_END) - at:RegisterEffect(e3) - local e4=Effect.CreateEffect(e:GetHandler()) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DISABLE_EFFECT) - e4:SetReset(RESETS_STANDARD_PHASE_END) - at:RegisterEffect(e4) +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local bc1,bc2=Duel.GetBattleMonster(tp) + if bc2:IsRelateToBattle() and bc2:IsNegatableMonster() then + --Negate the effects of that opponent's monster while it is face-up until the end of this turn + bc2:NegateEffects(RESET_PHASE|PHASE_END) end -end + if bc1:IsRelateToBattle() then + --That monster you control cannot be destroyed by that battle + local e1=Effect.CreateEffect(e:GetHandler()) + 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_PHASE|PHASE_DAMAGE) + bc1:RegisterEffect(e1,true) + --Also your opponent takes any battle damage you would have taken from that battle + local e2=e1:Clone() + e2:SetDescription(3112) + e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) + bc1:RegisterEffect(e2,true) + end +end \ No newline at end of file From 598ab915e65c73af2ad0f21527f7985aee7805bb Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 22:49:49 +0800 Subject: [PATCH 143/165] update "Number 46: Dragluon" --- official/c2978414.lua | 127 ++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 74 deletions(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index d9b23d3cb8..28f277a807 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -1,96 +1,75 @@ ---No.46 神影龍ドラッグルーオン +--No.46 神影龍ドラッグルーオン --Number 46: Dragluon local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),8,2) c:EnableReviveLimit() - --spsummon + --Xyz Summon procedure: 2 Level 8 Dragon-Type monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),8,2) + --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) + e1:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) - e2:SetTarget(s.cttg) - e2:SetOperation(s.ctop) - c:RegisterEffect(e2) - --effect limit - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e3:SetCondition(s.condition) - e3:SetCost(s.cost) - e3:SetOperation(s.efop) - c:RegisterEffect(e3) end s.xyz_number=46 -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end function s.ctfilter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged() end -function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function s.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.GetControl(tc,tp) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return e:GetLabel()==2 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctfilter(chkc) end + if chk==0 then return true end + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + local b2=Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {true,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + elseif op==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) end end -function s.efop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetTarget(s.actfilter) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) - Duel.RegisterEffect(e1,tp) -end -function s.actfilter(e,c) - return c:IsRace(RACE_DRAGON) +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 Dragon-Type monster from your hand + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --Target 1 Dragon-Type monster your opponent controls; take control of that target + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.GetControl(tc,tp) + end + elseif op==3 then + local c=e:GetHandler() + --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetTarget(function(e,c) return c:IsRace(RACE_DRAGON) end) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) + Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,4)) + end end From 0b0b148977b6dcc5e2905fe14c0866cfa7d743db Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:04:09 +0800 Subject: [PATCH 144/165] Update c2978414.lua --- official/c2978414.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/official/c2978414.lua b/official/c2978414.lua index 28f277a807..5730ebbec0 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -36,9 +36,11 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) {b2,aux.Stringid(id,2)}, {true,aux.Stringid(id,3)}) e:SetLabel(op) + e:SetProperty(0) if op==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) elseif op==2 then + e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) @@ -60,6 +62,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end + e:SetProperty(0) elseif op==3 then local c=e:GetHandler() --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn From da1836617878e0457a70182a754a9d53c5794078 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:46:09 +0800 Subject: [PATCH 145/165] Update c2978414.lua --- official/c2978414.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 5730ebbec0..565ab89033 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) + e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) From 7e72788ebb029c07ba4b7463df9a61aad5bf1e29 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:47:46 +0800 Subject: [PATCH 146/165] update "Number 87: Queen of the Night" --- official/c89516305.lua | 160 ++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 91 deletions(-) diff --git a/official/c89516305.lua b/official/c89516305.lua index 212cdf1fd9..08914df462 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -1,111 +1,89 @@ ---No.87 雪月花美神クイーン・オブ・ナイツ +--No.87 雪月花美神クイーン・オブ・ナイツ --Number 87: Queen of the Night local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,8,3) c:EnableReviveLimit() - --s/t + --Xyz Summon procedure: 3 Level 8 monsters + Xyz.AddProcedure(c,nil,8,3) + --Ativate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(s.cost) - e1:SetTarget(s.sttg) - e1:SetOperation(s.stop) + e1:SetCountLimit(1) + e1:SetHintTiming(TIMING_DAMAGE_STEP) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(s.cost) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetCondition(aux.StatChangeDamageStepCondition) - e3:SetCost(s.cost) - e3:SetTarget(s.atktg) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) end s.xyz_number=87 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function s.sttg(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,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,e:GetHandler()) -end -function s.stop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - e1:SetCondition(s.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function s.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end function s.setfilter(c) return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsCanTurnSet() end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local op=e:GetLabel() + if op==1 then + return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() + elseif op==2 then + return chkc:IsLocation(LOCATION_MZONE) and s.setfilter(chkc) + elseif op==3 then + return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() + end + end + local not_dmg_step=Duel.GetCurrentPhase()~=PHASE_DAMAGE + local b1=not_dmg_step and Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) + local b2=not_dmg_step and Duel.IsExistingTarget(s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b3=aux.StatChangeDamageStepCondition(e,tp,eg,ep,ev,re,r,rp) + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) + Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil) + elseif op==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) + elseif op==3 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(300) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) + if not tc:IsRelateToEffect(e) then return end + local c=e:GetHandler() + local op=e:GetLabel() + if op==1 then + --Target 1 Set Spell/Trap your opponent controls; while this card is face-up on the field, that Set card cannot be activated + if c:IsRelateToEffect(e) and tc:IsFacedown() then + c:SetCardTarget(tc) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetCondition(function(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + elseif op==2 then + --Target 1 Plant monster on the field; change that target to face-down Defense Position + if tc:IsFaceup() then + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end + elseif op==3 then + --Target 1 face-up monster on the field; that target gains 300 ATK + if tc:IsFaceup() then + tc:UpdateAttack(300,nil,c) + end end end From a868d7d4ad214a07d8129dbe0d9b15f7c823d0c1 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 8 Jul 2025 00:04:00 +0800 Subject: [PATCH 147/165] update "Number 91: Thunder Spark Dragon" --- official/c84417082.lua | 69 +++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/official/c84417082.lua b/official/c84417082.lua index 5776d72154..14fe7cb5a6 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -1,59 +1,44 @@ ---No.91 サンダー・スパーク・ドラゴン +--No.91 サンダー・スパーク・ドラゴン --Number 91: Thunder Spark Dragon local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,3) c:EnableReviveLimit() - --destroy1 + --Xyz Summon procedure: 3 Level 4 monsters + Xyz.AddProcedure(c,nil,4,3) + --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(s.cost1) - e1:SetTarget(s.target1) - e1:SetOperation(s.operation1) + e1:SetCountLimit(1) + e1:SetCost(Cost.Choice( + {Cost.Detach(3),aux.Stringid(id,1),s.desmonscheck}, + {Cost.Detach(5),aux.Stringid(id,2),s.desallcheck} + )) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) c:RegisterEffect(e1) - --destroy2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(s.cost2) - e2:SetTarget(s.target2) - e2:SetOperation(s.operation2) - c:RegisterEffect(e2) end s.xyz_number=91 -function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) -end -function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) -end -function s.operation1(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) +function s.desmonscheck(e,tp,eg,ep,ev,re,r,rp,chk) + return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end -function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,5,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,5,5,REASON_COST) +function s.desallcheck(e,tp,eg,ep,ev,re,r,rp,chk) + return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end -function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=e:GetLabel()==1 + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) + or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end -function s.operation2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=e:GetLabel()==1 + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) + or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end end From 14497724acbde8d71d52bdb9f73b85bfd2a04d73 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 8 Jul 2025 00:16:02 +0800 Subject: [PATCH 148/165] update "Evolzar Lars" --- official/c35103106.lua | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/official/c35103106.lua b/official/c35103106.lua index 5dd13fdedf..ab5e43d6bc 100644 --- a/official/c35103106.lua +++ b/official/c35103106.lua @@ -4,13 +4,13 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon Procedure + --Xyz Summon procedure: 2 Level 6 monsters Xyz.AddProcedure(c,nil,6,2) - --Cannot be targeted by opponent's monsters effects while it has material + --While this card has material, your opponent cannot target it with monster effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) e1:SetValue(function(e,re,rp) return rp==1-e:GetHandlerPlayer() and re:IsMonsterEffect() end) @@ -24,17 +24,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(_,tp,_,_,_,_,_,rp) return rp==1-tp end) - e2:SetCost(s.negcost) + e2:SetCost(Cost.Detach(s.negcostmin,2)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=c:GetOverlayGroup() - local ct=#g==g:FilterCount(Card.IsRace,nil,RACE_REPTILE|RACE_DINOSAUR) and 1 or 2 - if chk==0 then return c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,2,REASON_COST) +function s.negcostmin(e,tp,eg,ep,ev,re,r,rp,chk) + local g=e:GetHandler():GetOverlayGroup() + return #g==g:FilterCount(Card.IsRace,nil,RACE_REPTILE|RACE_DINOSAUR) and 1 or 2 end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end @@ -46,23 +43,6 @@ end function s.negop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local c=e:GetHandler() - --Negate its effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=e1:Clone() - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - tc:RegisterEffect(e3) - end + tc:NegateEffects(e:GetHandler(),nil,true) end -end \ No newline at end of file +end From 782c3d9dae8a73c3d8df0fc8009fe5d770d1e32e Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 8 Jul 2025 00:21:58 +0800 Subject: [PATCH 149/165] add missing categories --- official/c2978414.lua | 5 +++-- official/c89516305.lua | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 565ab89033..2946c79bc9 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -8,7 +8,6 @@ function s.initial_effect(c) --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) @@ -36,10 +35,13 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) {b2,aux.Stringid(id,2)}, {true,aux.Stringid(id,3)}) e:SetLabel(op) + e:SetCategory(0) e:SetProperty(0) if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) elseif op==2 then + e:SetCategory(CATEGORY_CONTROL) e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) @@ -62,7 +64,6 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end - e:SetProperty(0) elseif op==3 then local c=e:GetHandler() --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn diff --git a/official/c89516305.lua b/official/c89516305.lua index 08914df462..0713c0f2b9 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -45,14 +45,17 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) {b2,aux.Stringid(id,2)}, {b3,aux.Stringid(id,3)}) e:SetLabel(op) + e:SetCategory(0) if op==1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil) elseif op==2 then + e:SetCategory(CATEGORY_POSITION) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) elseif op==3 then + e:SetCategory(CATEGORY_ATKCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end From 26e999e83876b3c935efc9cbf7de3fdfbd4561ae Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 11:32:09 +0300 Subject: [PATCH 150/165] Some more Xyz updates --- official/c10389142.lua | 84 +++++++++++++----------------------------- official/c31437713.lua | 67 +++++++++++++-------------------- official/c56337500.lua | 74 ++++++++++++++----------------------- 3 files changed, 79 insertions(+), 146 deletions(-) diff --git a/official/c10389142.lua b/official/c10389142.lua index e896be7a38..09b0f77fb1 100644 --- a/official/c10389142.lua +++ b/official/c10389142.lua @@ -1,84 +1,52 @@ ---No.42 スターシップ・ギャラクシー・トマホーク +--No.42 スターシップ・ギャラクシー・トマホーク --Number 42: Galaxy Tomahawk local s,id=GetID() +local TOKEN_BATTLE_EAGLE=id+1 function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,2) c:EnableReviveLimit() - --token + --Xyz Summon procedure: 2 Level 7 monsters + Xyz.AddProcedure(c,nil,7,2) + --Special Summon as many "Battle Eagle Tokens" (Machine-Type/WIND/Level 6/ATK 2000/DEF 0) as possible, but destroy them during the End Phase of this turn, also your opponent takes no further battle damage this turn local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCountLimit(1) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_names={10389143} s.xyz_number=42 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end +s.listed_names={TOKEN_BATTLE_EAGLE} 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.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,tp,0) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_BATTLE_EAGLE,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end + if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_BATTLE_EAGLE,0,TYPES_TOKEN,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local fid=e:GetHandler():GetFieldID() - local g=Group.CreateGroup() + local sg=Group.CreateGroup() for i=1,ft do - local token=Duel.CreateToken(tp,id+1) + local token=Duel.CreateToken(tp,TOKEN_BATTLE_EAGLE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - token:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) - g:AddCard(token) + sg:AddCard(token) end + --Destroy them during the End Phase of this turn + aux.DelayedOperation(sg,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,nil,1,aux.Stringid(id,1)) Duel.SpecialSummonComplete() - g:KeepAlive() + --Your opponent takes no further battle damage this turn local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + e1:SetTargetRange(0,1) + e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(s.descon) - e1:SetOperation(s.desop) Duel.RegisterEffect(e1,tp) -end -function s.desfilter(c,fid) - return c:GetFlagEffectLabel(id)==fid -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(s.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(s.desfilter,nil,e:GetLabel()) - g:DeleteGroup() - Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31437713.lua b/official/c31437713.lua index 553608a291..876f2727ef 100644 --- a/official/c31437713.lua +++ b/official/c31437713.lua @@ -2,66 +2,51 @@ --Number 82: Heartlandraco local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Xyz summon procedure + --Xyz Summon procedure: 2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - --Cannot be targeted for attack + --While you control a face-up Spell, your opponent cannot target this card for attacks local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(s.atkcon) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSpell),e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end) e1:SetValue(aux.imval1) c:RegisterEffect(e1) - --Make itself be able to attack directly + --Apply a "this turn, this card can attack your opponent directly, but other monsters cannot attack" effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) - e2:SetOperation(s.operation) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) end) + e2:SetCost(Cost.Detach(1)) + e2:SetOperation(s.effop) c:RegisterEffect(e2) end s.xyz_number=82 -function s.filter(c) - return c:IsFaceup() and c:IsSpell() -end -function s.atkcon(e) - return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(s.ftarget) - e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local fid=-1 local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - --Attack directly this turn - local e1=Effect.CreateEffect(e:GetHandler()) + if c:IsRelateToEffect(e) then + fid=c:GetFieldID() + --This turn, this card can attack your opponent directly + local e1=Effect.CreateEffect(c) e1:SetDescription(3205) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) + --But other monsters cannot attack + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_ATTACK) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return c:GetFieldID()~=fid end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/official/c56337500.lua b/official/c56337500.lua index 0cb2ffccc8..e79d9e2eed 100644 --- a/official/c56337500.lua +++ b/official/c56337500.lua @@ -4,73 +4,61 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 monsters Xyz.AddProcedure(c,nil,3,2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) - --salvage + --Add 1 "Cynet" Spell/Trap from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --spsummon + --Special Summon 2 Level 4 Cyberse monsters with different names from your Deck, but their effects are negated local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) e2:SetCost(s.cost) 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:IsRace(RACE_CYBERSE) end) end s.listed_series={SET_CYNET} -function s.counterfilter(c) - return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsRace(RACE_CYBERSE) -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + --You cannot Special Summon monsters from the Extra Deck the turn you activate either of this card's effects, except Cyberse 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_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(s.splimit) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_CYBERSE) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - --lizard check - aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) -end -function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA) -end -function s.lizfilter(e,c) - return not c:IsOriginalRace(RACE_CYBERSE) -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and s.cost(e,tp,eg,ep,ev,re,r,rp,0) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - s.cost(e,tp,eg,ep,ev,re,r,rp,1) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_CYBERSE) end) end function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(SET_CYNET) and c:IsAbleToHand() + return c:IsSetCard(SET_CYNET) and c:IsSpellTrap() 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,0,0) + 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() @@ -80,11 +68,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsXyzSummoned() + return c:IsXyzSummoned() and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) + and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter(c,e,tp) - return c:IsRace(RACE_CYBERSE) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevel(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) @@ -97,21 +85,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_SPSUMMON) - if #sg==2 then - local tc=sg:GetFirst() - for tc in aux.Next(sg) do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e2,true) + if #sg~=2 then return end + local c=e:GetHandler() + for sc in sg:Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Their effects are negated + sc:NegateEffects(c) end - Duel.SpecialSummonComplete() end -end + Duel.SpecialSummonComplete() +end \ No newline at end of file From 98f611d1ddaaebb7a264105d540c630da74c554c Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 20:56:53 +0300 Subject: [PATCH 151/165] Moar Xyz updates --- official/c9161357.lua | 113 +++++++++++++++------------------- official/c95134948.lua | 134 +++++++++++++++++++---------------------- 2 files changed, 109 insertions(+), 138 deletions(-) diff --git a/official/c9161357.lua b/official/c9161357.lua index 46751d96c7..cffbfe4fd3 100644 --- a/official/c9161357.lua +++ b/official/c9161357.lua @@ -1,99 +1,82 @@ ---No.6 先史遺産アトランタル +--No.6 先史遺産アトランタル --Number 6: Chronomaly Atlandis local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,6,2) c:EnableReviveLimit() - --equip + --Xyz Summon procedure: 2 Level 6 monsters + Xyz.AddProcedure(c,nil,6,2) + --Equip 1 "Number" monster from your GY to this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) + e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(s.eqcon) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) - aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e1) - --lp + aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsSetCard(SET_NUMBER) and ec:IsControler(tp) end,function(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,id) end,e1) + --This card gains ATK equal to half the ATK of that equipped monster local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.lpcost) - e2:SetOperation(s.lpop) + e2:SetValue(function(e,c) return c:GetEquipGroup():Match(Card.HasFlagEffect,nil,id):GetSum(Card.GetAttack)/2 end) c:RegisterEffect(e2) + --Halve your opponent's Life Points + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCost(Cost.AND(Cost.Detach(1),s.halvelpcost)) + e3:SetOperation(function(e,tp) local opp=1-tp Duel.SetLP(opp,Duel.GetLP(opp)/2) end) + c:RegisterEffect(e3) end -s.listed_series={SET_NUMBER} s.xyz_number=6 -function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(SET_NUMBER) -end -function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsXyzSummoned() -end -function s.filter(c) - return c:IsSetCard(SET_NUMBER) and c:IsMonster() and not c:IsForbidden() +s.listed_series={SET_NUMBER} +function s.eqfilter(c,tp) + return c:IsSetCard(SET_NUMBER) and c:IsMonster() and not c:IsForbidden() and c:CheckUniqueOnField(tp) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.eqfilter(chkc,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function s.equipop(c,e,tp,tc) - if not c:EquipByEffectAndLimitRegister(e,tp,tc,id) then return end - local atk=tc:GetBaseAttack()/2 - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end + local g=Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,tp,0) 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() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - s.equipop(c,e,tp,tc) + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then + c:EquipByEffectAndLimitRegister(e,tp,tc,id) end end -function s.eqfilter(c,tp) - return c:GetFlagEffect(id)~=0 and c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and c:IsAbleToGraveAsCost() +function s.halvelpcostfilter(c,tp) + return c:HasFlagEffect(id) and c:IsControler(tp) and c:IsAbleToGraveAsCost() end -function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.halvelpcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local eqg=c:GetEquipGroup() - if chk==0 then return Duel.IsPhase(PHASE_MAIN1) and #eqg>0 and eqg:IsExists(s.eqfilter,1,nil,tp) - and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local ec=eqg:FilterSelect(tp,s.eqfilter,1,1,nil,tp) - Duel.SendtoGrave(ec,REASON_COST) + local eqg=c:GetEquipGroup():Match(s.halvelpcostfilter,nil,tp) + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) and #eqg>0 end + local g=nil + if #eqg==1 then + g=eqg + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + g=eqg:Select(tp,1,1,nil) + end + Duel.SendtoGrave(g,REASON_COST) + --You cannot conduct your Battle Phase the turn you activate this effect local e1=Effect.CreateEffect(c) + 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_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE|PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end +end \ No newline at end of file diff --git a/official/c95134948.lua b/official/c95134948.lua index 051c3da207..da99324652 100644 --- a/official/c95134948.lua +++ b/official/c95134948.lua @@ -1,37 +1,38 @@ ---No.99 希望皇ホープドラグナー +--No.99 希望皇ホープドラグナー --Number 99: Utopia Dragonar --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) - --xyz summon c:EnableReviveLimit() + --Xyz Summon procedure: 3+ Level 12 monsters Xyz.AddProcedure(c,nil,12,3,nil,nil,Xyz.InfiniteMats) - --Special Summon + --Special Summon from your Extra Deck, 1 "Number" monster that has a number between "1" and "100" in its name (this is treated as an Xyz Summon) 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:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(Cost.AND(Cost.Detach(2),s.spcost)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --disable attack + --Change the ATK of the opponent's monster to 0 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_ATTACK_ANNOUNCE) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.atkcon) + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) + --Keep track of Special Summons and direct attacks + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_XYZ) end) aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -40,87 +41,74 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={SET_NUMBER} s.xyz_number=99 -function s.counterfilter(c) - return c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA -end +s.listed_series={SET_NUMBER} function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() if not Duel.GetAttackTarget() then Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + eg:GetFirst():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) - and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 - and (Duel.GetFlagEffect(tp,id)==0 or Duel.GetFlagEffect(tp,id)==c:GetFlagEffect(id)) end - c:RemoveOverlayCard(tp,2,2,REASON_COST) - aux.RegisterClientHint(e:GetHandler(),EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,2),nil) - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD) - ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - ge1:SetTargetRange(1,0) - ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(ge1,tp) - --lizard check - aux.addTempLizardCheck(c,tp,s.lizfilter) - --cannot attack directly with other cards - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD) - ge2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - ge2:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) - ge2:SetTargetRange(LOCATION_MZONE,0) - ge2:SetTarget(s.ftarget) - ge2:SetLabel(c:GetFieldID()) - ge2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(ge2,tp) -end -function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) -end -function s.lizfilter(e,c) - return not c:IsOriginalType(TYPE_XYZ) -end -function s.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 + and (not Duel.HasFlagEffect(tp,id) or Duel.GetFlagEffect(tp,id)==c:GetFlagEffect(id)) end + local fid=c:GetFieldID() + --The turn you activate this effect, other monsters you control cannot attack directly + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:GetFieldID()~=fid end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --Also you cannot Special Summon from the Extra Deck, except Xyz Monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e2:SetTargetRange(1,0) + e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) end -function s.filter(c,e,tp,rp) - return c:IsSetCard(SET_NUMBER) and c.xyz_number and c.xyz_number>=1 and c.xyz_number<=100 - and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_NUMBER) and c.xyz_number and c.xyz_number>=1 and c.xyz_number<=100 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rp) end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rp):GetFirst() - if tc then - Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() + 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_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local at=Duel.GetAttacker() - if chk==0 then return at:IsOnField() and at:HasNonZeroAttack() end - Duel.SetTargetCard(at) + local bc=Duel.GetAttacker() + if chk==0 then return bc:IsOnField() and bc:HasNonZeroAttack() end + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + local bc=e:GetLabelObject() + if bc:IsRelateToEffect(e) and bc:IsFaceup() and bc:IsControler(1-tp) then + --The ATK of that opponent's monster becomes 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:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) - tc:RegisterEffect(e1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + bc:RegisterEffect(e1) end -end +end \ No newline at end of file From 9efe3a7a633deae88fb4335cb40c0f806888871d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 21:58:57 +0300 Subject: [PATCH 152/165] "Number 46: Dragluon" updates --- official/c2978414.lua | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 2946c79bc9..47aee7085a 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 8 Dragon-Type monsters + --Xyz Summon procedure: 2 Level 8 Dragon monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),8,2) --Activate 1 of these effects local e1=Effect.CreateEffect(c) @@ -21,19 +21,20 @@ s.xyz_number=46 function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.ctfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged() +function s.ctrlfilter(c) + return c:IsRace(RACE_DRAGON) and c:IsFaceup() and c:IsControlerCanBeChanged() end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetLabel()==2 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctfilter(chkc) end - if chk==0 then return true end + if chkc then return e:GetLabel()==2 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctrlfilter(chkc) end local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - local b2=Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) + local b2=Duel.IsExistingTarget(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil) + local b3=not Duel.HasFlagEffect(1-tp,id) + if chk==0 then return b1 or b2 or b3 end local op=Duel.SelectEffect(tp, {b1,aux.Stringid(id,1)}, {b2,aux.Stringid(id,2)}, - {true,aux.Stringid(id,3)}) + {b3,aux.Stringid(id,3)}) e:SetLabel(op) e:SetCategory(0) e:SetProperty(0) @@ -44,14 +45,14 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetCategory(CATEGORY_CONTROL) e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) + local g=Duel.SelectTarget(tp,s.ctrlfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) end end function s.effop(e,tp,eg,ep,ev,re,r,rp) local op=e:GetLabel() if op==1 then - --Special Summon 1 Dragon-Type monster from your hand + --Special Summon 1 Dragon monster from your hand 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) @@ -59,21 +60,25 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end elseif op==2 then - --Target 1 Dragon-Type monster your opponent controls; take control of that target + --Target 1 Dragon monster your opponent controls; take control of that target local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) then Duel.GetControl(tc,tp) end elseif op==3 then + local opp=1-tp + if Duel.HasFlagEffect(opp,id) then return end + Duel.RegisterFlagEffect(opp,id,RESET_PHASE|PHASE_END|RESET_OPPO_TURN,0,1) local c=e:GetHandler() - --Dragon-Type monsters your opponent controls cannot activate their effects until the end of your opponent's turn + aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,4),RESET_OPPO_TURN) + --Dragon monsters your opponent controls cannot activate their effects until the end of your opponent's turn local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTarget(function(e,c) return c:IsRace(RACE_DRAGON) end) e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,4)) end end From 102579859ae8c7da91b30dc422ac1ca72fd14c2d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 10 Jul 2025 22:00:34 +0300 Subject: [PATCH 153/165] Update c2978414.lua --- official/c2978414.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c2978414.lua b/official/c2978414.lua index 47aee7085a..d829c1a5ca 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -62,7 +62,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) elseif op==2 then --Target 1 Dragon monster your opponent controls; take control of that target local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) then + if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) and tc:IsFaceup() then Duel.GetControl(tc,tp) end elseif op==3 then From c70e6d59c40a1d97e69d6f6903570dcc7007e255 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 00:25:06 +0300 Subject: [PATCH 154/165] Update c89516305.lua --- official/c89516305.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/official/c89516305.lua b/official/c89516305.lua index 0713c0f2b9..f693d03f2f 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetHintTiming(TIMING_DAMAGE_STEP) + e1:SetHintTiming(TIMING_DAMAGE_STEP|TIMING_SSET,TIMING_DAMAGE_STEP|TIMING_SSET|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) @@ -21,7 +21,7 @@ function s.initial_effect(c) end s.xyz_number=87 function s.setfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsCanTurnSet() + return c:IsRace(RACE_PLANT) and c:IsCanTurnSet() end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -34,10 +34,10 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end end - local not_dmg_step=Duel.GetCurrentPhase()~=PHASE_DAMAGE + local not_dmg_step=not Duel.IsPhase(PHASE_DAMAGE) local b1=not_dmg_step and Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) local b2=not_dmg_step and Duel.IsExistingTarget(s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b3=aux.StatChangeDamageStepCondition(e,tp,eg,ep,ev,re,r,rp) + local b3=aux.StatChangeDamageStepCondition() and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) if chk==0 then return b1 or b2 or b3 end local op=Duel.SelectEffect(tp, @@ -53,34 +53,35 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetCategory(CATEGORY_POSITION) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) elseif op==3 then e:SetCategory(CATEGORY_ATKCHANGE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end end function s.effop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end - local c=e:GetHandler() local op=e:GetLabel() + local c=e:GetHandler() if op==1 then --Target 1 Set Spell/Trap your opponent controls; while this card is face-up on the field, that Set card cannot be activated if c:IsRelateToEffect(e) and tc:IsFacedown() then c:SetCardTarget(tc) + --While this card is face-up on the field, that Set card cannot be activated local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetCondition(function(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end) + e1:SetCondition(function() return c:IsHasCardTarget(tc) and tc:IsFacedown() end) e1:SetValue(1) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end elseif op==2 then --Target 1 Plant monster on the field; change that target to face-down Defense Position - if tc:IsFaceup() then + if tc:IsRace(RACE_PLANT) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end elseif op==3 then From 4a8bbaaef4141835607fca8cab8a35e1cf55f069 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:12:39 +0300 Subject: [PATCH 155/165] Update c84417082.lua --- official/c84417082.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/official/c84417082.lua b/official/c84417082.lua index 14fe7cb5a6..dc620a3eb2 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -31,13 +31,15 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=e:GetLabel()==1 and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) + or Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + 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=e:GetLabel()==1 - and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - or Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc) + or Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end From 88fba28d6362a2dfdfbeb4e9df6c53955573d9ad Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:19:45 +0300 Subject: [PATCH 156/165] Update c35103106.lua --- official/c35103106.lua | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/official/c35103106.lua b/official/c35103106.lua index ab5e43d6bc..a00d5a3b6b 100644 --- a/official/c35103106.lua +++ b/official/c35103106.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) e1:SetValue(function(e,re,rp) return rp==1-e:GetHandlerPlayer() and re:IsMonsterEffect() end) c:RegisterEffect(e1) - --Negate the effects of 1 face-up card your opponent controls + --Negate the effects of 1 face-up card your opponent controls until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE) @@ -23,26 +23,27 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(_,tp,_,_,_,_,_,rp) return rp==1-tp end) - e2:SetCost(Cost.Detach(s.negcostmin,2)) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(Cost.Detach(s.discostmin,2)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) c:RegisterEffect(e2) end -function s.negcostmin(e,tp,eg,ep,ev,re,r,rp,chk) +function s.discostmin(e,tp,eg,ep,ev,re,r,rp,chk) local g=e:GetHandler():GetOverlayGroup() return #g==g:FilterCount(Card.IsRace,nil,RACE_REPTILE|RACE_DINOSAUR) and 1 or 2 end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end -function s.negop(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - tc:NegateEffects(e:GetHandler(),nil,true) + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Negate its effects until the end of this turn + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END,true) end end From 5d45ecb95496d86406f31d4173f1165171658934 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:08:11 +0300 Subject: [PATCH 157/165] unofficial Xyz updates --- unofficial/c511001339.lua | 16 ++++++---------- unofficial/c511001363.lua | 8 ++------ unofficial/c511001781.lua | 15 +++++++-------- unofficial/c511002059.lua | 14 +++----------- unofficial/c511002384.lua | 11 +++-------- unofficial/c511002763.lua | 10 ++-------- unofficial/c511002866.lua | 5 ++--- unofficial/c511002870.lua | 15 ++++----------- unofficial/c511009136.lua | 10 ++++------ unofficial/c511009387.lua | 8 +++----- unofficial/c511009560.lua | 4 ++-- unofficial/c511010011.lua | 8 +++----- unofficial/c511010039.lua | 16 ++-------------- unofficial/c511010053.lua | 11 +++-------- unofficial/c511010107.lua | 9 ++++----- unofficial/c511010132.lua | 8 +++----- unofficial/c511010173.lua | 10 ++-------- unofficial/c511023000.lua | 9 ++------- unofficial/c513000017.lua | 9 ++------- unofficial/c700000027.lua | 8 ++------ 20 files changed, 61 insertions(+), 143 deletions(-) diff --git a/unofficial/c511001339.lua b/unofficial/c511001339.lua index 619aba5692..f3f2c3971a 100644 --- a/unofficial/c511001339.lua +++ b/unofficial/c511001339.lua @@ -11,7 +11,10 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCost(s.cost) + e1:SetCost(Cost.Choice( + {Cost.Detach(1),aux.Stringid(id,1), + {s.cost,aux.Stringid(id,2)} + )) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -25,14 +28,7 @@ end s.xyz_number=2 s.counter_place_list={0x1101} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local op1Con=e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - local op2Con=Duel.GetAttacker():GetCounter(0x1101)>0 - if chk==0 then return op1Con or op2Con end - local op=Duel.SelectEffect(tp,{op1Con,aux.Stringid(id,1)},{op2Con,aux.Stringid(id,2)}) - if op==1 then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - end - e:SetLabel(op) + if chk==0 then return Duel.GetAttacker():GetCounter(0x1101)>0 end end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -82,4 +78,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e) return e:GetHandler():GetCounter(0x1101)>0 -end +end \ No newline at end of file diff --git a/unofficial/c511001363.lua b/unofficial/c511001363.lua index da0cd1cb7e..3ef4671a6f 100644 --- a/unofficial/c511001363.lua +++ b/unofficial/c511001363.lua @@ -1,6 +1,5 @@ --CX 冀望皇バリアン (Anime) --CXyz Barian Hope (Anime) ---Rescripted by Larry126 local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -18,10 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e0a) local e0b=e0a:Clone() e0b:SetCode(EFFECT_XYZ_LEVEL) - e0b:SetValue(function(e,mc,rc) - if rc==e:GetHandler() then return 7,mc:GetLevel() end - return mc:GetLevel() - end) + e0b:SetValue(function(e,mc,rc) return rc==e:GetHandler() and 7,mc:GetLevel() or mc:GetLevel() end) c:RegisterEffect(e0b) --This card's ATK is equal to the number of Xyz Materials attached to it x 1000 local e1=Effect.CreateEffect(c) @@ -132,4 +128,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) end e:SetLabel(0) e:SetLabelObject(nil) -end +end \ No newline at end of file diff --git a/unofficial/c511001781.lua b/unofficial/c511001781.lua index 4da9178643..43a8bccdab 100644 --- a/unofficial/c511001781.lua +++ b/unofficial/c511001781.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e5:SetDescription(aux.Stringid(id,3)) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_MZONE) - e5:SetCost(s.lpcost) + e5:SetCost(Cost.AND(Cost.Detach(3),s.lpcost)) e5:SetTarget(s.lptg) e5:SetOperation(s.lpop) --spsummon @@ -88,7 +88,7 @@ function s.initial_effect(c) c:RegisterEffect(e10) local e11=e7:Clone() e11:SetLabelObject(e5) - c:RegisterEffect(e11) + c:RegisterEffect(e11,false,EFFECT_MARKER_DETACH_XMAT) local e12=e7:Clone() e12:SetLabelObject(e6) c:RegisterEffect(e12) @@ -163,15 +163,14 @@ function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(1-tp)~=1 end end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,3,REASON_COST) and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - c:RemoveOverlayCard(tp,3,3,REASON_COST) + if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end + --You canno declare an attack during the turn you activate this effect local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) + e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) @@ -206,4 +205,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/unofficial/c511002059.lua b/unofficial/c511002059.lua index 119a8229eb..3c89b08140 100644 --- a/unofficial/c511002059.lua +++ b/unofficial/c511002059.lua @@ -11,8 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetLabel(3) + e1:SetCost(Cost.AND(Cost.Detach(3),Cost.HintSelectedEffect)) e1:SetTarget(s.destg1) e1:SetOperation(s.desop1) c:RegisterEffect(e1) @@ -22,8 +21,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) - e2:SetLabel(5) + e2:SetCost(Cost.AND(Cost.Detach(5),Cost.HintSelectedEffect)) e2:SetTarget(s.destg2) e2:SetOperation(s.desop2) c:RegisterEffect(e2) @@ -35,12 +33,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=91 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetLabel() - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST) -end function s.destg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) @@ -61,4 +53,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511002384.lua b/unofficial/c511002384.lua index 7a5563bdcc..077309da99 100644 --- a/unofficial/c511002384.lua +++ b/unofficial/c511002384.lua @@ -10,8 +10,8 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -26,11 +26,6 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetDefense()>0 end @@ -71,4 +66,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT+0x57a0000) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/unofficial/c511002763.lua b/unofficial/c511002763.lua index f71e52a68f..a77771f41a 100644 --- a/unofficial/c511002763.lua +++ b/unofficial/c511002763.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -23,12 +23,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetOverlayCount(tp,1,1)>1 end end @@ -45,4 +39,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/unofficial/c511002866.lua b/unofficial/c511002866.lua index d7fe1f1146..f8ca23b479 100644 --- a/unofficial/c511002866.lua +++ b/unofficial/c511002866.lua @@ -51,8 +51,7 @@ s.listed_names={2407234} s.xyz_number=69 function s.target(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:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) end @@ -86,4 +85,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/unofficial/c511002870.lua b/unofficial/c511002870.lua index 3927cf4589..8c0cde8641 100644 --- a/unofficial/c511002870.lua +++ b/unofficial/c511002870.lua @@ -31,8 +31,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(s.indescost) - e3:SetTarget(s.indestg) + e3:SetCost(Cost.Detach(s.indescost,s.indescost)) e3:SetOperation(s.indesop) c:RegisterEffect(e3) --Detach all materials from this to prevent this card's destruction (Card effect) @@ -104,14 +103,8 @@ function s.indescon2(e,tp,eg,ep,ev,re,r,rp) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg and tg:IsContains(e:GetHandler()) end -function s.indescost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - if chk==0 then return ct>0 and c:CheckRemoveOverlayCard(tp,ct,REASON_COST) end - c:RemoveOverlayCard(tp,ct,ct,REASON_COST) -end -function s.indestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end +function s.indescost(e,tp) + return e:GetHandler():GetOverlayCount() end function s.indesop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -137,4 +130,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) end c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/unofficial/c511009136.lua b/unofficial/c511009136.lua index b89ba93130..435fc7942f 100644 --- a/unofficial/c511009136.lua +++ b/unofficial/c511009136.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(s.cost,s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) local e2=Effect.CreateEffect(c) @@ -59,10 +59,8 @@ function s.valcheck(e,c) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD,0,1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetOverlayCount() - if chk==0 then return ct>0 and e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST) +function s.cost(e,tp) + return e:GetHandler():GetOverlayCount() end function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() @@ -136,4 +134,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/unofficial/c511009387.lua b/unofficial/c511009387.lua index 0719c10070..84f8e03381 100644 --- a/unofficial/c511009387.lua +++ b/unofficial/c511009387.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -33,9 +33,8 @@ function s.initial_effect(c) end s.pendulum_level=7 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -86,9 +85,8 @@ function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end function s.penop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.CheckPendulumZones(tp) then return false end local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index e96a37712a..aaff245f4b 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -76,7 +76,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) + c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -123,4 +123,4 @@ function s.dirregop(e,tp,eg,ep,ev,re,r,rp) end function s.dircon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/unofficial/c511010011.lua b/unofficial/c511010011.lua index 2fa0243f6f..1bd1d132b8 100644 --- a/unofficial/c511010011.lua +++ b/unofficial/c511010011.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -26,9 +26,7 @@ function s.initial_effect(c) end s.xyz_number=11 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetAttackAnnouncedCount()==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) @@ -51,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010039.lua b/unofficial/c511010039.lua index 89fe409e34..bf9f677d44 100644 --- a/unofficial/c511010039.lua +++ b/unofficial/c511010039.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1,1,function(e,og) Duel.Overlay(e:GetHandler():GetBattleTarget(),og) end)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -31,18 +31,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc and bc:IsType(TYPE_XYZ) and bc:IsFaceup() and bc:IsControler(1-tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - local g=c:GetOverlayGroup() - if #g>0 then - local mg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(mg,REASON_COST) - Duel.RaiseSingleEvent(c,EVENT_DETACH_MATERIAL,e,0,0,0,0) - Duel.Overlay(bc,mg) - end -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetCard(e:GetHandler():GetBattleTarget()) @@ -68,4 +56,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010053.lua b/unofficial/c511010053.lua index b5b85679ff..6243155482 100644 --- a/unofficial/c511010053.lua +++ b/unofficial/c511010053.lua @@ -57,7 +57,7 @@ function s.initial_effect(c) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) e6:SetCode(id+1) - e6:SetCost(s.bdcost) + e6:SetCost(Cost.Detach(1)) e6:SetTarget(s.rectg) e6:SetOperation(s.recop) c:RegisterEffect(e6) @@ -71,7 +71,7 @@ function s.initial_effect(c) e7:SetRange(LOCATION_MZONE) e7:SetCountLimit(1) e7:SetCondition(s.bdcon) - e7:SetCost(s.bdcost) + e7:SetCost(Cost.Detach(1)) e7:SetTarget(s.bdtg) e7:SetOperation(s.bdop) c:RegisterEffect(e7) @@ -169,11 +169,6 @@ end function s.bdcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp end -function s.bdcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.bdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -211,4 +206,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/unofficial/c511010107.lua b/unofficial/c511010107.lua index 0403dda427..9fbe66fb59 100644 --- a/unofficial/c511010107.lua +++ b/unofficial/c511010107.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCountLimit(1) e3:SetCondition(s.discon) - e3:SetCost(s.discost) + e3:SetCost(Cost.AND(Cost.Detach(1),s.discost)) c:RegisterEffect(e3) --Global effects to keep track of total effect resolutions and the last attacker aux.GlobalCheck(s,function() @@ -64,10 +64,9 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) and not Duel.HasFlagEffect(tp,id+1) and not Duel.IsPhase(PHASE_BATTLE_START) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return true end if Duel.IsTurnPlayer(tp) then + local c=e:GetHandler() Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_BATTLE,0,1) c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE|PHASE_BATTLE,0,1) --Cannot attack with any other card after activating this effect @@ -175,4 +174,4 @@ function s.endbpop(e,tp,eg,ep,ev,re,r,rp) e2:SetOperation(function(e) e:Reset() Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end) e2:SetReset(RESET_PHASE|PHASE_END|PHASE_BATTLE) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/unofficial/c511010132.lua b/unofficial/c511010132.lua index 903f8df1fb..2db08485a4 100644 --- a/unofficial/c511010132.lua +++ b/unofficial/c511010132.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -61,9 +61,7 @@ function s.rfilter(c) return c:IsMonster() and c:IsShark() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -94,4 +92,4 @@ function s.descon(e) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end +end \ No newline at end of file diff --git a/unofficial/c511010173.lua b/unofficial/c511010173.lua index 87aa92efc2..3a633af75e 100644 --- a/unofficial/c511010173.lua +++ b/unofficial/c511010173.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --battle indestructable @@ -29,12 +29,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc and bc:IsControler(1-tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -46,4 +40,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(bc:GetAttack()) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/unofficial/c511023000.lua b/unofficial/c511023000.lua index 0a076f0d88..028455862a 100644 --- a/unofficial/c511023000.lua +++ b/unofficial/c511023000.lua @@ -13,16 +13,11 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.copycost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.copytg) e1:SetOperation(s.copyop) c:RegisterEffect(e1) end -function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.copyfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsType(TYPE_TRAPMONSTER) and not c:IsType(TYPE_TOKEN) end @@ -38,4 +33,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then c:CopyEffect(tc:GetCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) end -end +end \ No newline at end of file diff --git a/unofficial/c513000017.lua b/unofficial/c513000017.lua index 12b6b65898..0879c49306 100644 --- a/unofficial/c513000017.lua +++ b/unofficial/c513000017.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -33,11 +33,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=101 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsAbleToChangeControler() and not c:IsType(TYPE_TOKEN) end @@ -62,4 +57,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/unofficial/c700000027.lua b/unofficial/c700000027.lua index 2ed3869b30..4a8feadd2c 100644 --- a/unofficial/c700000027.lua +++ b/unofficial/c700000027.lua @@ -11,15 +11,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,ep,eg,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e) return c:HasNonZeroAttack() and (not e or not c:IsImmuneToEffect(e)) end @@ -56,4 +52,4 @@ function s.operation(e,tp,ep,eg,ev,re,r,rp) ct=g:GetNext() until rc<=0 or not Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil,e) or not Duel.SelectYesNo(tp,210) -end +end \ No newline at end of file From 14efc5633a4802bbb094fe72708ae28bc3d0aa21 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:10:12 +0300 Subject: [PATCH 158/165] Missing bracket --- unofficial/c511001339.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial/c511001339.lua b/unofficial/c511001339.lua index f3f2c3971a..ab0dc755a5 100644 --- a/unofficial/c511001339.lua +++ b/unofficial/c511001339.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCost(Cost.Choice( - {Cost.Detach(1),aux.Stringid(id,1), + {Cost.Detach(1),aux.Stringid(id,1)}, {s.cost,aux.Stringid(id,2)} )) e1:SetTarget(s.target) From e931f74959b35f4d1cdbebaa5406cdd72150a58f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:07:55 +0300 Subject: [PATCH 159/165] Update c12081875.lua --- official/c12081875.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/official/c12081875.lua b/official/c12081875.lua index 85544ab975..4f8734bdbb 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -55,6 +55,8 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local op=#options==1 and 1 or Duel.SelectEffect(tp,table.unpack(options)) local te=effs[op] Duel.Hint(HINT_OPSELECTED,1-tp,te:GetDescription()) + Duel.ClearTargetCard() + tc:CreateEffectRelation(e) e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) local targ_fn=te:GetTarget() @@ -64,18 +66,18 @@ function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) te:SetLabelObject(e:GetLabelObject()) Duel.ClearOperationInfo(0) end - e:SetLabelObject({tc,te}) + e:SetLabelObject(te) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,0) end function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local tc,te=table.unpack(e:GetLabelObject()) - if not (tc:IsRelateToEffect(e) and te) then return end + local te=e:GetLabelObject() + if not te then return end + local tc=te:GetHandler() + if not tc:IsRelateToEffect(e) then return end local op=te:GetOperation() if op then e:SetLabel(te:GetLabel()) e:SetLabelObject(te:GetLabelObject()) - local tg=Duel.GetTargetCards(e)-tc - if #tg>0 then Duel.ChangeTargetCard(ev,tg) end op(e,tp,eg,ep,ev,re,r,rp) end if tc:IsAbleToDeck() then @@ -101,4 +103,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end From ddd6bb913aec507805bbaeef3115385d1b850a67 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:15:36 +0300 Subject: [PATCH 160/165] Update c49195710.lua --- official/c49195710.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/official/c49195710.lua b/official/c49195710.lua index e5e99018f6..ebeeddcd66 100644 --- a/official/c49195710.lua +++ b/official/c49195710.lua @@ -20,6 +20,7 @@ function s.initial_effect(c) --Effect Monsters your opponent controls cannot activate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_CANNOT_TRIGGER) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE) @@ -27,19 +28,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=65 -s.listed_names={3790062} +s.listed_names={3790062} --"Number 65: Djinn Buster" function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000) - Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,tc,1,tp,-1000) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,-1000) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,g,1,tp,-1000) end function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local c=e:GetHandler() + --It loses 1000 ATK and DEF tc:UpdateAttack(-1000,nil,c) tc:UpdateDefense(-1000,nil,c) end From f473f97187310a7dbec3f01b1f20d2be37d695f8 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:33:29 +0300 Subject: [PATCH 161/165] Update c43490025.lua --- official/c43490025.lua | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/official/c43490025.lua b/official/c43490025.lua index 807cec93dd..8a6f23bc61 100644 --- a/official/c43490025.lua +++ b/official/c43490025.lua @@ -3,15 +3,15 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Xyz summon procedure: 2 Xyz Monsters with the same Rank, except "Number" monsters - Xyz.AddProcedure(c,s.xyzfilter,nil,2,s.ovfilter,aux.Stringid(id,1),nil,nil,false,s.xyzcheck) - --Gains 500 ATK per "Number" Xyz monsters in the GYs + --Xyz Summon procedure: 2 Xyz Monsters with the same Rank, except "Number" monsters OR 1 "Utopia" monster or "Number F0: Utopic Future" you control + Xyz.AddProcedure(c,s.xyzfilter,nil,2,s.ovfilter,aux.Stringid(id,0),nil,nil,false,s.xyzcheck) + --Gains 500 ATK for each "Number" Xyz Monster in the GYs local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 end) + e1:SetValue(function(e,c) return Duel.GetMatchingGroupCount(function(c) return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) end,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 end) c:RegisterEffect(e1) --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) @@ -19,21 +19,21 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) c:RegisterEffect(e2) - --Make this card able to make a second attack + --Make this card able to make a second attack during each Battle Phase this turn local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) + e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function() return Duel.IsAbleToEnterBP() end) e3:SetCost(Cost.Detach(1)) - e3:SetTarget(s.atktg) - e3:SetOperation(s.atkop) + e3:SetTarget(s.secondatktg) + e3:SetOperation(s.secondatkop) c:RegisterEffect(e3) end -s.listed_series={SET_NUMBER,SET_UTOPIA} s.xyz_number=0 -s.listed_names={65305468} +s.listed_series={SET_NUMBER,SET_UTOPIA} +s.listed_names={65305468} --"Number F0: Utopic Future" function s.xyzfilter(c,xyz,sumtype,tp) return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and not c:IsSetCard(SET_NUMBER,xyz,sumtype,tp) end @@ -41,16 +41,16 @@ function s.xyzcheck(g,tp,xyz) local mg=g:Filter(function(c) return not c:IsHasEffect(EFFECT_EQUIP_SPELL_XYZ_MAT) end,nil) return mg:GetClassCount(Card.GetRank)==1 end -function s.ovfilter(c,tp,lc) - return c:IsFaceup() and (c:IsSetCard(SET_UTOPIA,lc,SUMMON_TYPE_XYZ,tp) or c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65305468)) +function s.ovfilter(c,tp,xyzc) + return (c:IsSetCard(SET_UTOPIA,xyzc,SUMMON_TYPE_XYZ,tp) or c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,65305468)) and c:IsFaceup() end -function s.atkfilter(c) - return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end +function s.secondatktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + return c:CanAttack() and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 + end end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) +function s.secondatkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then --This card can make a second attack during each Battle Phase this turn From d3530246232dc6b64824f2e45ab3e48bb0a956d0 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 12 Jul 2025 19:41:57 +0300 Subject: [PATCH 162/165] "Traptrix Rafflesia" update --- official/c6511113.lua | 148 ++++++++++++++++++++++-------------------- 1 file changed, 79 insertions(+), 69 deletions(-) diff --git a/official/c6511113.lua b/official/c6511113.lua index e063f88ace..7c7ab65836 100644 --- a/official/c6511113.lua +++ b/official/c6511113.lua @@ -2,92 +2,102 @@ --Traptrix Rafflesia local s,id=GetID() function s.initial_effect(c) - --Xyz summon - Xyz.AddProcedure(c,nil,4,2) c:EnableReviveLimit() - --Unaffected by trap effects + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Unaffected by Trap effects while it has material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetCondition(s.imcon) - e1:SetValue(s.efilter) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e1:SetValue(function(e,te) return te:IsTrapEffect() end) c:RegisterEffect(e1) - --Other "Traptrix" monsters cannot be destroyed by battle or card effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(s.imtg) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + --"Traptrix" monsters you control, except "Traptrix Rafflesia", cannot be destroyed by battle or card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTargetRange(LOCATION_MZONE,0) + e2a:SetTarget(function(e,c) return c:IsSetCard(SET_TRAPTRIX) and not c:IsCode(id) end) + e2a:SetValue(1) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2b) + --Your opponent cannot target "Traptrix" monsters you control, except "Traptrix Rafflesia", with card effects + local e2c=e2a:Clone() + e2c:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e2c:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2c:SetValue(aux.tgoval) + c:RegisterEffect(e2c) + --This effect becomes that sent "Hole" Normal Trap's effect when that card is activated + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetRange(LOCATION_MZONE) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetCountLimit(1) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_MSET|TIMINGS_CHECK_MONSTER_E) + e3:SetCost(Cost.AND(Cost.Detach(1),s.effcost)) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) c:RegisterEffect(e3) - --Other "Traptrix" monsters cannot be target - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --Copy 1 "Hole" trap - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetHintTiming(TIMINGS_CHECK_MONSTER|TIMING_BATTLE_START|TIMING_MAIN_END) - e5:SetCountLimit(1) - e5:SetCost(s.cost) - e5:SetTarget(s.target) - e5:SetOperation(s.operation) - c:RegisterEffect(e5) end s.listed_names={id} s.listed_series={SET_TRAPTRIX,SET_TRAP_HOLE,SET_HOLE} -function s.imcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function s.efilter(e,te) - return te:IsTrapEffect() -end -function s.imtg(e,c) - return c:IsSetCard(SET_TRAPTRIX) and not c:IsCode(id) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function s.filter(c) - return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) and c:IsAbleToGraveAsCost() +function s.copyfilter(c) + return c:IsNormalTrap() and c:IsSetCard({SET_HOLE,SET_TRAP_HOLE}) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,true)~=nil end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) + --Storing the legal group before detaching due to rulings (Q&A #16286) + local g=Duel.GetMatchingGroup(s.copyfilter,tp,LOCATION_DECK,0,nil) + e:SetLabelObject(g) + return #g>0 end - e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) - local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.SendtoGrave(g,REASON_COST) - e:SetProperty(te:GetProperty()) + local sc=e:GetLabelObject():Select(tp,1,1,nil):GetFirst() + e:SetLabelObject(sc) + Duel.SendtoGrave(sc,REASON_COST) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local te,ceg,cep,cev,cre,cr,crp=table.unpack(e:GetLabelObject()) + return te and te:GetTarget() and te:GetTarget()(e,tp,ceg,cep,cev,cre,cr,crp,chk,chkc) + end + if chk==0 then + local res=e:GetLabel()==-100 + e:SetLabel(0) + return res + end + local sc=e:GetLabelObject() + local te,ceg,cep,cev,cre,cr,crp=sc:CheckActivateEffect(true,true,true) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) local tg=te:GetTarget() - if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end - te:SetLabelObject(e:GetLabelObject()) - e:SetLabelObject(te) - Duel.ClearOperationInfo(0) + if tg then + e:SetProperty(te:GetProperty()) + tg(e,tp,ceg,cep,cev,cre,cr,crp,1) + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + Duel.ClearOperationInfo(0) + end + e:SetLabel(0) + e:SetLabelObject({te,ceg,cep,cev,cre,cr,crp}) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local te,ceg,cep,cev,cre,cr,crp=table.unpack(e:GetLabelObject()) if not te then return end - e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end + if op then + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + op(e,tp,ceg,cep,cev,cre,cr,crp) + end + e:SetLabel(0) + e:SetLabelObject(nil) end From 7e072bafbdd98d73d45bcfca5f658f6dc3053682 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 13 Jul 2025 03:02:26 +0800 Subject: [PATCH 163/165] rename Cost.Detach to Cost.DetachFromSelf --- deprecated_functions.lua | 2 +- official/c10000030.lua | 4 ++-- official/c10389142.lua | 4 ++-- official/c10406322.lua | 2 +- official/c10443957.lua | 2 +- official/c10613952.lua | 2 +- official/c10666000.lua | 2 +- official/c10678778.lua | 2 +- official/c11398059.lua | 2 +- official/c11411223.lua | 2 +- official/c11441009.lua | 4 ++-- official/c11510448.lua | 2 +- official/c11522979.lua | 2 +- official/c11646785.lua | 2 +- official/c1174075.lua | 4 ++-- official/c12014404.lua | 2 +- official/c12219047.lua | 2 +- official/c1249315.lua | 2 +- official/c12533811.lua | 2 +- official/c12615446.lua | 2 +- official/c12632096.lua | 4 ++-- official/c1269512.lua | 2 +- official/c13030280.lua | 2 +- official/c13183454.lua | 2 +- official/c14152862.lua | 2 +- official/c1426714.lua | 2 +- official/c14301396.lua | 2 +- official/c14306092.lua | 2 +- official/c15092394.lua | 2 +- official/c15232745.lua | 2 +- official/c15561463.lua | 2 +- official/c15862758.lua | 2 +- official/c15914410.lua | 2 +- official/c15939229.lua | 4 ++-- official/c16037007.lua | 2 +- official/c16110708.lua | 2 +- official/c16195942.lua | 2 +- official/c1621413.lua | 4 ++-- official/c1639384.lua | 2 +- official/c16643334.lua | 2 +- official/c16691074.lua | 2 +- official/c16699558.lua | 2 +- official/c1688285.lua | 2 +- official/c16955631.lua | 2 +- official/c17016362.lua | 2 +- official/c1828513.lua | 2 +- official/c18326736.lua | 6 +++--- official/c18511599.lua | 2 +- official/c18897163.lua | 2 +- official/c18963306.lua | 2 +- official/c19333131.lua | 2 +- official/c19369609.lua | 4 ++-- official/c19684740.lua | 2 +- official/c19891310.lua | 4 ++-- official/c1992816.lua | 2 +- official/c20145685.lua | 4 ++-- official/c20155904.lua | 4 ++-- official/c20343502.lua | 2 +- official/c20563387.lua | 2 +- official/c2061963.lua | 2 +- official/c20785975.lua | 2 +- official/c2091298.lua | 2 +- official/c21044178.lua | 2 +- official/c21065189.lua | 2 +- official/c21223277.lua | 2 +- official/c21313376.lua | 2 +- official/c21501505.lua | 2 +- official/c21521304.lua | 2 +- official/c21858819.lua | 2 +- official/c2191144.lua | 2 +- official/c22110647.lua | 2 +- official/c22653490.lua | 2 +- official/c23085002.lua | 4 ++-- official/c23454876.lua | 2 +- official/c23603403.lua | 2 +- official/c23649496.lua | 2 +- official/c23776077.lua | 2 +- official/c23848752.lua | 2 +- official/c24701066.lua | 2 +- official/c2530830.lua | 2 +- official/c25341652.lua | 2 +- official/c2609443.lua | 4 ++-- official/c26096328.lua | 2 +- official/c26211048.lua | 2 +- official/c26329679.lua | 2 +- official/c26556950.lua | 2 +- official/c26563200.lua | 2 +- official/c2665273.lua | 2 +- official/c26973555.lua | 4 ++-- official/c26988374.lua | 2 +- official/c27069566.lua | 2 +- official/c27240101.lua | 4 ++-- official/c27337596.lua | 4 ++-- official/c27420823.lua | 4 ++-- official/c27552504.lua | 2 +- official/c2766877.lua | 2 +- official/c28150174.lua | 2 +- official/c28290705.lua | 2 +- official/c28346136.lua | 2 +- official/c28400508.lua | 2 +- official/c28781003.lua | 2 +- official/c28912357.lua | 2 +- official/c2896663.lua | 2 +- official/c28981598.lua | 2 +- official/c29085954.lua | 2 +- official/c29208536.lua | 2 +- official/c29423048.lua | 2 +- official/c29510428.lua | 2 +- official/c29515122.lua | 2 +- official/c29669359.lua | 4 ++-- official/c2978414.lua | 2 +- official/c30095833.lua | 2 +- official/c30100551.lua | 2 +- official/c30128445.lua | 2 +- official/c30350202.lua | 2 +- official/c30439101.lua | 2 +- official/c30741334.lua | 4 ++-- official/c31123642.lua | 2 +- official/c31320433.lua | 2 +- official/c31437713.lua | 4 ++-- official/c31539614.lua | 2 +- official/c31563350.lua | 2 +- official/c31801517.lua | 4 ++-- official/c32003338.lua | 2 +- official/c32224143.lua | 2 +- official/c32302078.lua | 4 ++-- official/c32446630.lua | 2 +- official/c32530043.lua | 2 +- official/c32559361.lua | 4 ++-- official/c3292267.lua | 2 +- official/c33776843.lua | 2 +- official/c33779875.lua | 2 +- official/c33909817.lua | 2 +- official/c34086406.lua | 2 +- official/c34481518.lua | 2 +- official/c34876719.lua | 4 ++-- official/c34909328.lua | 2 +- official/c34945480.lua | 2 +- official/c35103106.lua | 2 +- official/c35772782.lua | 4 ++-- official/c3594985.lua | 2 +- official/c359563.lua | 2 +- official/c36076683.lua | 2 +- official/c36757171.lua | 2 +- official/c36776089.lua | 2 +- official/c3685372.lua | 4 ++-- official/c37057743.lua | 2 +- official/c37164373.lua | 2 +- official/c37279508.lua | 2 +- official/c3743515.lua | 2 +- official/c3758046.lua | 2 +- official/c37649320.lua | 2 +- official/c3790062.lua | 2 +- official/c37926346.lua | 2 +- official/c38026562.lua | 2 +- official/c3814632.lua | 2 +- official/c38180759.lua | 2 +- official/c38250531.lua | 2 +- official/c38273745.lua | 2 +- official/c3828844.lua | 2 +- official/c38495396.lua | 2 +- official/c38694052.lua | 2 +- official/c39030163.lua | 4 ++-- official/c39139935.lua | 2 +- official/c39272762.lua | 2 +- official/c39622156.lua | 2 +- official/c3989465.lua | 4 ++-- official/c39943352.lua | 4 ++-- official/c39972129.lua | 2 +- official/c39987164.lua | 2 +- official/c4019153.lua | 2 +- official/c40390147.lua | 4 ++-- official/c40424929.lua | 2 +- official/c40673853.lua | 2 +- official/c40706444.lua | 4 ++-- official/c41147577.lua | 2 +- official/c41309158.lua | 2 +- official/c41375811.lua | 2 +- official/c4145852.lua | 4 ++-- official/c41522092.lua | 2 +- official/c41524885.lua | 2 +- official/c42160203.lua | 2 +- official/c42230449.lua | 2 +- official/c42421606.lua | 2 +- official/c42589641.lua | 2 +- official/c42741437.lua | 2 +- official/c42752141.lua | 2 +- official/c42940335.lua | 2 +- official/c43047672.lua | 2 +- official/c43490025.lua | 2 +- official/c4367330.lua | 4 ++-- official/c440556.lua | 2 +- official/c4423206.lua | 2 +- official/c44311445.lua | 4 ++-- official/c44405066.lua | 2 +- official/c44505297.lua | 2 +- official/c44698398.lua | 2 +- official/c45533023.lua | 2 +- official/c45742626.lua | 2 +- official/c45852939.lua | 2 +- official/c45935145.lua | 4 ++-- official/c46772449.lua | 2 +- official/c46871387.lua | 2 +- official/c46895036.lua | 2 +- official/c47017574.lua | 2 +- official/c47060528.lua | 2 +- official/c47132793.lua | 2 +- official/c47349116.lua | 2 +- official/c47506081.lua | 2 +- official/c47579719.lua | 2 +- official/c47805931.lua | 2 +- official/c48009503.lua | 4 ++-- official/c48348921.lua | 2 +- official/c48608796.lua | 2 +- official/c48626373.lua | 4 ++-- official/c48739166.lua | 2 +- official/c48905153.lua | 2 +- official/c48928529.lua | 2 +- official/c49032236.lua | 2 +- official/c49121795.lua | 2 +- official/c49195710.lua | 2 +- official/c49202331.lua | 2 +- official/c49221191.lua | 4 ++-- official/c49456901.lua | 2 +- official/c4965193.lua | 4 ++-- official/c49678559.lua | 2 +- official/c49689480.lua | 4 ++-- official/c4997565.lua | 2 +- official/c5014629.lua | 2 +- official/c50260683.lua | 2 +- official/c50449881.lua | 2 +- official/c50789693.lua | 2 +- official/c5088741.lua | 2 +- official/c51497409.lua | 4 ++-- official/c51543904.lua | 2 +- official/c51735257.lua | 4 ++-- official/c51960178.lua | 2 +- official/c52323874.lua | 2 +- official/c52558805.lua | 2 +- official/c52653092.lua | 2 +- official/c53054164.lua | 2 +- official/c53244294.lua | 2 +- official/c53334641.lua | 2 +- official/c53701457.lua | 2 +- official/c54191698.lua | 4 ++-- official/c54358015.lua | 2 +- official/c54366836.lua | 4 ++-- official/c54719828.lua | 2 +- official/c54919528.lua | 4 ++-- official/c5530780.lua | 4 ++-- official/c55470553.lua | 2 +- official/c55727845.lua | 2 +- official/c55935416.lua | 2 +- official/c56051086.lua | 2 +- official/c56292140.lua | 2 +- official/c56337500.lua | 4 ++-- official/c56410769.lua | 4 ++-- official/c56638325.lua | 2 +- official/c56832966.lua | 4 ++-- official/c56840427.lua | 4 ++-- official/c56910167.lua | 2 +- official/c57031794.lua | 2 +- official/c57043117.lua | 2 +- official/c57314798.lua | 2 +- official/c57450198.lua | 2 +- official/c57566760.lua | 2 +- official/c57707471.lua | 2 +- official/c58058134.lua | 2 +- official/c58069384.lua | 2 +- official/c581014.lua | 2 +- official/c58504745.lua | 2 +- official/c58600555.lua | 2 +- official/c58712976.lua | 2 +- official/c58720904.lua | 2 +- official/c58820923.lua | 2 +- official/c58858807.lua | 4 ++-- official/c58931850.lua | 4 ++-- official/c59071624.lua | 4 ++-- official/c5916510.lua | 2 +- official/c59170782.lua | 4 ++-- official/c59208943.lua | 2 +- official/c59242457.lua | 2 +- official/c59627393.lua | 4 ++-- official/c60195675.lua | 2 +- official/c60517697.lua | 4 ++-- official/c60645181.lua | 2 +- official/c60992364.lua | 2 +- official/c613013.lua | 4 ++-- official/c61307542.lua | 2 +- official/c61344030.lua | 2 +- official/c61374414.lua | 2 +- official/c61399402.lua | 4 ++-- official/c61641818.lua | 2 +- official/c6165656.lua | 2 +- official/c62070231.lua | 2 +- official/c6247535.lua | 2 +- official/c62517849.lua | 4 ++-- official/c62541668.lua | 2 +- official/c62709239.lua | 2 +- official/c6284176.lua | 2 +- official/c62967433.lua | 2 +- official/c63746411.lua | 2 +- official/c63767246.lua | 2 +- official/c6387204.lua | 2 +- official/c64182380.lua | 4 ++-- official/c64245689.lua | 2 +- official/c64276752.lua | 2 +- official/c64332231.lua | 2 +- official/c64414267.lua | 2 +- official/c64554883.lua | 2 +- official/c64689404.lua | 2 +- official/c6511113.lua | 2 +- official/c65301952.lua | 4 ++-- official/c65676461.lua | 2 +- official/c65884091.lua | 2 +- official/c65892585.lua | 2 +- official/c66011101.lua | 2 +- official/c66506689.lua | 2 +- official/c66523544.lua | 2 +- official/c66547759.lua | 2 +- official/c6659193.lua | 2 +- official/c66970002.lua | 2 +- official/c67173574.lua | 2 +- official/c67865534.lua | 4 ++-- official/c68300121.lua | 4 ++-- official/c68396121.lua | 2 +- official/c68597372.lua | 2 +- official/c68618157.lua | 4 ++-- official/c68679595.lua | 2 +- official/c68836428.lua | 2 +- official/c69058960.lua | 2 +- official/c69069911.lua | 2 +- official/c69170557.lua | 2 +- official/c69610924.lua | 2 +- official/c69655484.lua | 6 +++--- official/c69757518.lua | 2 +- official/c6983839.lua | 2 +- official/c69840739.lua | 2 +- official/c698785.lua | 2 +- official/c7020743.lua | 2 +- official/c70597485.lua | 2 +- official/c70636044.lua | 2 +- official/c71068247.lua | 2 +- official/c71166481.lua | 4 ++-- official/c71222868.lua | 4 ++-- official/c71612253.lua | 2 +- official/c7194917.lua | 2 +- official/c72409226.lua | 2 +- official/c72971064.lua | 2 +- official/c73082255.lua | 2 +- official/c73289035.lua | 2 +- official/c73347079.lua | 2 +- official/c73445448.lua | 4 ++-- official/c73659078.lua | 2 +- official/c73887236.lua | 2 +- official/c73964868.lua | 2 +- official/c74294676.lua | 4 ++-- official/c74371660.lua | 2 +- official/c74416224.lua | 2 +- official/c74593218.lua | 2 +- official/c74689476.lua | 4 ++-- official/c75083197.lua | 2 +- official/c75253697.lua | 2 +- official/c75367227.lua | 2 +- official/c75402014.lua | 2 +- official/c75433814.lua | 2 +- official/c75574498.lua | 2 +- official/c75620895.lua | 2 +- official/c75797046.lua | 2 +- official/c75840616.lua | 2 +- official/c7593748.lua | 2 +- official/c76067258.lua | 2 +- official/c7628844.lua | 2 +- official/c76290637.lua | 2 +- official/c76372778.lua | 2 +- official/c76419637.lua | 2 +- official/c76589815.lua | 2 +- official/c770365.lua | 2 +- official/c77205367.lua | 2 +- official/c77334267.lua | 4 ++-- official/c77571454.lua | 2 +- official/c77799846.lua | 2 +- official/c77894049.lua | 4 ++-- official/c78135071.lua | 2 +- official/c78144171.lua | 2 +- official/c78625448.lua | 2 +- official/c78872731.lua | 4 ++-- official/c78876707.lua | 2 +- official/c79559912.lua | 2 +- official/c79625003.lua | 2 +- official/c80117527.lua | 4 ++-- official/c80764541.lua | 2 +- official/c80796456.lua | 2 +- official/c80993256.lua | 2 +- official/c81096431.lua | 2 +- official/c81122844.lua | 4 ++-- official/c8165596.lua | 2 +- official/c81927732.lua | 2 +- official/c82308875.lua | 2 +- official/c82633039.lua | 4 ++-- official/c82697249.lua | 2 +- official/c82944432.lua | 2 +- official/c83531441.lua | 4 ++-- official/c83827392.lua | 2 +- official/c84013237.lua | 2 +- official/c84025439.lua | 2 +- official/c84124261.lua | 2 +- official/c84224627.lua | 2 +- official/c84401683.lua | 2 +- official/c84417082.lua | 4 ++-- official/c8491961.lua | 2 +- official/c85004150.lua | 2 +- official/c85115440.lua | 2 +- official/c85121942.lua | 2 +- official/c85252081.lua | 2 +- official/c85692042.lua | 6 +++--- official/c85747929.lua | 2 +- official/c8617563.lua | 4 ++-- official/c86221741.lua | 2 +- official/c86238081.lua | 2 +- official/c86331741.lua | 4 ++-- official/c86532744.lua | 4 ++-- official/c8660395.lua | 4 ++-- official/c86848580.lua | 2 +- official/c87327776.lua | 2 +- official/c87676171.lua | 2 +- official/c87911394.lua | 2 +- official/c88021907.lua | 2 +- official/c88120966.lua | 2 +- official/c88177324.lua | 2 +- official/c88581108.lua | 2 +- official/c88722973.lua | 2 +- official/c88754763.lua | 2 +- official/c88917691.lua | 2 +- official/c88942504.lua | 2 +- official/c89477759.lua | 2 +- official/c89516305.lua | 2 +- official/c89642993.lua | 2 +- official/c90098780.lua | 2 +- official/c90162951.lua | 2 +- official/c90303227.lua | 4 ++-- official/c90448279.lua | 4 ++-- official/c90664857.lua | 2 +- official/c90726340.lua | 2 +- official/c90809975.lua | 2 +- official/c91279700.lua | 2 +- official/c91499077.lua | 2 +- official/c9161357.lua | 4 ++-- official/c91895091.lua | 2 +- official/c92661479.lua | 2 +- official/c9272381.lua | 2 +- official/c92918648.lua | 2 +- official/c93039339.lua | 2 +- official/c93568288.lua | 2 +- official/c93713837.lua | 2 +- official/c93730230.lua | 2 +- official/c94119480.lua | 2 +- official/c94151981.lua | 2 +- official/c94380860.lua | 2 +- official/c9453320.lua | 2 +- official/c9486959.lua | 2 +- official/c95113856.lua | 2 +- official/c95134948.lua | 4 ++-- official/c95169481.lua | 2 +- official/c95239444.lua | 2 +- official/c95243515.lua | 2 +- official/c95442074.lua | 2 +- official/c95474755.lua | 2 +- official/c95685352.lua | 2 +- official/c95992081.lua | 2 +- official/c96157835.lua | 2 +- official/c96381979.lua | 4 ++-- official/c96471335.lua | 2 +- official/c96592102.lua | 4 ++-- official/c96864105.lua | 4 ++-- official/c97170107.lua | 2 +- official/c97403510.lua | 2 +- official/c97453744.lua | 2 +- official/c97584719.lua | 2 +- official/c99469936.lua | 2 +- official/c99666430.lua | 2 +- pre-release/c101302044.lua | 4 ++-- pre-release/c101302045.lua | 4 ++-- pre-release/c101302106.lua | 2 +- unofficial/c100000178.lua | 2 +- unofficial/c100000179.lua | 2 +- unofficial/c100000498.lua | 2 +- unofficial/c100000549.lua | 2 +- unofficial/c111011803.lua | 2 +- unofficial/c111011903.lua | 2 +- unofficial/c111011904.lua | 2 +- unofficial/c111011905.lua | 2 +- unofficial/c511000034.lua | 2 +- unofficial/c511000041.lua | 2 +- unofficial/c511000183.lua | 2 +- unofficial/c511000184.lua | 2 +- unofficial/c511000192.lua | 4 ++-- unofficial/c511000230.lua | 2 +- unofficial/c511000231.lua | 2 +- unofficial/c511000232.lua | 2 +- unofficial/c511000233.lua | 2 +- unofficial/c511000277.lua | 2 +- unofficial/c511000294.lua | 2 +- unofficial/c511000296.lua | 2 +- unofficial/c511000369.lua | 2 +- unofficial/c511000512.lua | 2 +- unofficial/c511000513.lua | 2 +- unofficial/c511000515.lua | 2 +- unofficial/c511000674.lua | 2 +- unofficial/c511000675.lua | 2 +- unofficial/c511001247.lua | 2 +- unofficial/c511001273.lua | 2 +- unofficial/c511001275.lua | 2 +- unofficial/c511001338.lua | 2 +- unofficial/c511001339.lua | 4 ++-- unofficial/c511001371.lua | 2 +- unofficial/c511001372.lua | 2 +- unofficial/c511001374.lua | 2 +- unofficial/c511001376.lua | 4 ++-- unofficial/c511001429.lua | 6 +++--- unofficial/c511001430.lua | 2 +- unofficial/c511001431.lua | 2 +- unofficial/c511001432.lua | 2 +- unofficial/c511001624.lua | 2 +- unofficial/c511001659.lua | 4 ++-- unofficial/c511001776.lua | 2 +- unofficial/c511001777.lua | 2 +- unofficial/c511001778.lua | 2 +- unofficial/c511001779.lua | 2 +- unofficial/c511001781.lua | 4 ++-- unofficial/c511001791.lua | 2 +- unofficial/c511001997.lua | 2 +- unofficial/c511001998.lua | 2 +- unofficial/c511001999.lua | 2 +- unofficial/c511002001.lua | 4 ++-- unofficial/c511002046.lua | 6 +++--- unofficial/c511002054.lua | 2 +- unofficial/c511002058.lua | 2 +- unofficial/c511002059.lua | 6 +++--- unofficial/c511002060.lua | 2 +- unofficial/c511002064.lua | 2 +- unofficial/c511002075.lua | 2 +- unofficial/c511002076.lua | 2 +- unofficial/c511002077.lua | 2 +- unofficial/c511002079.lua | 2 +- unofficial/c511002088.lua | 2 +- unofficial/c511002090.lua | 2 +- unofficial/c511002091.lua | 2 +- unofficial/c511002092.lua | 2 +- unofficial/c511002111.lua | 2 +- unofficial/c511002112.lua | 2 +- unofficial/c511002384.lua | 4 ++-- unofficial/c511002482.lua | 2 +- unofficial/c511002543.lua | 2 +- unofficial/c511002591.lua | 4 ++-- unofficial/c511002599.lua | 2 +- unofficial/c511002658.lua | 2 +- unofficial/c511002727.lua | 2 +- unofficial/c511002737.lua | 2 +- unofficial/c511002749.lua | 2 +- unofficial/c511002762.lua | 4 ++-- unofficial/c511002763.lua | 4 ++-- unofficial/c511002764.lua | 2 +- unofficial/c511002778.lua | 2 +- unofficial/c511002829.lua | 2 +- unofficial/c511002830.lua | 2 +- unofficial/c511002839.lua | 2 +- unofficial/c511002855.lua | 4 ++-- unofficial/c511002858.lua | 2 +- unofficial/c511002864.lua | 2 +- unofficial/c511002866.lua | 6 +++--- unofficial/c511002870.lua | 6 +++--- unofficial/c511002871.lua | 2 +- unofficial/c511002872.lua | 2 +- unofficial/c511002873.lua | 4 ++-- unofficial/c511002896.lua | 2 +- unofficial/c511002912.lua | 2 +- unofficial/c511002913.lua | 2 +- unofficial/c511003219.lua | 4 ++-- unofficial/c511003224.lua | 2 +- unofficial/c511003236.lua | 2 +- unofficial/c511009002.lua | 2 +- unofficial/c511009026.lua | 2 +- unofficial/c511009062.lua | 2 +- unofficial/c511009074.lua | 4 ++-- unofficial/c511009136.lua | 4 ++-- unofficial/c511009321.lua | 2 +- unofficial/c511009340.lua | 4 ++-- unofficial/c511009387.lua | 4 ++-- unofficial/c511009462.lua | 2 +- unofficial/c511009480.lua | 4 ++-- unofficial/c511009508.lua | 4 ++-- unofficial/c511009560.lua | 4 ++-- unofficial/c511009567.lua | 4 ++-- unofficial/c511010007.lua | 2 +- unofficial/c511010009.lua | 2 +- unofficial/c511010010.lua | 4 ++-- unofficial/c511010011.lua | 4 ++-- unofficial/c511010020.lua | 4 ++-- unofficial/c511010021.lua | 4 ++-- unofficial/c511010025.lua | 4 ++-- unofficial/c511010032.lua | 2 +- unofficial/c511010034.lua | 2 +- unofficial/c511010039.lua | 4 ++-- unofficial/c511010047.lua | 2 +- unofficial/c511010053.lua | 6 +++--- unofficial/c511010056.lua | 2 +- unofficial/c511010064.lua | 2 +- unofficial/c511010065.lua | 2 +- unofficial/c511010083.lua | 2 +- unofficial/c511010096.lua | 2 +- unofficial/c511010103.lua | 2 +- unofficial/c511010104.lua | 2 +- unofficial/c511010105.lua | 2 +- unofficial/c511010107.lua | 6 +++--- unofficial/c511010132.lua | 4 ++-- unofficial/c511010139.lua | 2 +- unofficial/c511010165.lua | 2 +- unofficial/c511010173.lua | 4 ++-- unofficial/c511010192.lua | 2 +- unofficial/c511010196.lua | 2 +- unofficial/c511010205.lua | 2 +- unofficial/c511010207.lua | 2 +- unofficial/c511010238.lua | 2 +- unofficial/c511010239.lua | 2 +- unofficial/c511010504.lua | 2 +- unofficial/c511010515.lua | 2 +- unofficial/c511015129.lua | 2 +- unofficial/c511020000.lua | 2 +- unofficial/c511023000.lua | 4 ++-- unofficial/c511027117.lua | 2 +- unofficial/c511050008.lua | 4 ++-- unofficial/c511600284.lua | 4 ++-- unofficial/c511600298.lua | 2 +- unofficial/c511600369.lua | 2 +- unofficial/c511600384.lua | 2 +- unofficial/c513000017.lua | 4 ++-- unofficial/c513000018.lua | 2 +- unofficial/c513000059.lua | 2 +- unofficial/c513000060.lua | 2 +- unofficial/c513000061.lua | 2 +- unofficial/c513000062.lua | 2 +- unofficial/c513000063.lua | 2 +- unofficial/c513000141.lua | 4 ++-- unofficial/c700000026.lua | 2 +- unofficial/c700000027.lua | 4 ++-- unofficial/c810000081.lua | 2 +- utility.lua | 2 +- 648 files changed, 793 insertions(+), 793 deletions(-) diff --git a/deprecated_functions.lua b/deprecated_functions.lua index 04ee204068..80dc0ae50e 100644 --- a/deprecated_functions.lua +++ b/deprecated_functions.lua @@ -37,7 +37,7 @@ make_deprecated_function_no_replacement("Duel.GetTributeCount", "You should use make_deprecated_function_alias("Auxiliary.selfbanishcost","Cost.SelfBanish") make_deprecated_function_alias("Auxiliary.SelfBanishCost","Cost.SelfBanish") make_deprecated_function_alias("Auxiliary.DiscardCost","Cost.Discard") -make_deprecated_function_alias("Auxiliary.dxmcostgen","Cost.Detach") +make_deprecated_function_alias("Auxiliary.dxmcostgen","Cost.DetachFromSelf") make_deprecated_function_alias("Auxiliary.selfreleasecost","Cost.SelfRelease") make_deprecated_function_alias("Auxiliary.SelfReleaseCost","Cost.SelfRelease") make_deprecated_function_alias("Auxiliary.SelfTributeCost","Cost.SelfRelease") diff --git a/official/c10000030.lua b/official/c10000030.lua index e7dcd3c0c9..56fce531ff 100644 --- a/official/c10000030.lua +++ b/official/c10000030.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(1),s.effcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.effcost)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) @@ -64,4 +64,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Special Summon 1 monster from your opponent's GY Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c10389142.lua b/official/c10389142.lua index 09b0f77fb1..5fda7831ef 100644 --- a/official/c10389142.lua +++ b/official/c10389142.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -49,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c10406322.lua b/official/c10406322.lua index a8f82219d2..2882be8a82 100644 --- a/official/c10406322.lua +++ b/official/c10406322.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.tdcon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c10443957.lua b/official/c10443957.lua index 84d5aeb1c6..077bf9ff78 100644 --- a/official/c10443957.lua +++ b/official/c10443957.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.discon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) diff --git a/official/c10613952.lua b/official/c10613952.lua index 9043ac75fb..d95a2c76f4 100644 --- a/official/c10613952.lua +++ b/official/c10613952.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c10666000.lua b/official/c10666000.lua index 6ff92790ce..c6ba870a3d 100644 --- a/official/c10666000.lua +++ b/official/c10666000.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c10678778.lua b/official/c10678778.lua index 9b60ada2a3..a506740a61 100644 --- a/official/c10678778.lua +++ b/official/c10678778.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c11398059.lua b/official/c11398059.lua index ad958d0b3e..8a24680748 100644 --- a/official/c11398059.lua +++ b/official/c11398059.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c11411223.lua b/official/c11411223.lua index 523dc7e172..8721985b4c 100644 --- a/official/c11411223.lua +++ b/official/c11411223.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c11441009.lua b/official/c11441009.lua index dbba3cb0f9..11438b2f50 100644 --- a/official/c11441009.lua +++ b/official/c11441009.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.AND(Cost.PayLP(600),Cost.Detach(1))) + e1:SetCost(Cost.AND(Cost.PayLP(600),Cost.DetachFromSelf(1))) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(Cost.Detach(1,1)) + e2:SetCost(Cost.DetachFromSelf(1,1)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) diff --git a/official/c11510448.lua b/official/c11510448.lua index db155c38e6..615ac50097 100644 --- a/official/c11510448.lua +++ b/official/c11510448.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c11522979.lua b/official/c11522979.lua index 3add83fc59..1847354329 100644 --- a/official/c11522979.lua +++ b/official/c11522979.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c11646785.lua b/official/c11646785.lua index d5a8b58aab..95ab83277d 100644 --- a/official/c11646785.lua +++ b/official/c11646785.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e2:SetCondition(aux.NOT(s.quickeffcond)) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c1174075.lua b/official/c1174075.lua index a8686af1a5..2cd985fed1 100644 --- a/official/c1174075.lua +++ b/official/c1174075.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.negcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) c:RegisterEffect(e3) @@ -79,4 +79,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c12014404.lua b/official/c12014404.lua index ecc61bfbc5..67095c1ef4 100644 --- a/official/c12014404.lua +++ b/official/c12014404.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c12219047.lua b/official/c12219047.lua index 6c9a71a517..1ed1b8329c 100644 --- a/official/c12219047.lua +++ b/official/c12219047.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) e1:SetCondition(s.condition1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c1249315.lua b/official/c1249315.lua index 62466fd3c4..277716ff1e 100644 --- a/official/c1249315.lua +++ b/official/c1249315.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c12533811.lua b/official/c12533811.lua index 3d1e64f381..0d4301e01a 100644 --- a/official/c12533811.lua +++ b/official/c12533811.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c12615446.lua b/official/c12615446.lua index 0a5160ca43..5cc75abedb 100644 --- a/official/c12615446.lua +++ b/official/c12615446.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCategory(CATEGORY_POSITION+CATEGORY_DISABLE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) diff --git a/official/c12632096.lua b/official/c12632096.lua index 59e9253d0c..6f565c892b 100644 --- a/official/c12632096.lua +++ b/official/c12632096.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_CIPHER) end) - e1:SetCost(Cost.Detach(1,s.ctcostmax,function(e,og) e:SetLabel(#og) end)) + e1:SetCost(Cost.DetachFromSelf(1,s.ctcostmax,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) @@ -65,4 +65,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/official/c1269512.lua b/official/c1269512.lua index b7fe5e17be..d802aa6baf 100644 --- a/official/c1269512.lua +++ b/official/c1269512.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCondition(s.exatkcon) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetOperation(function() Duel.ChainAttack() end) c:RegisterEffect(e3) end diff --git a/official/c13030280.lua b/official/c13030280.lua index f5459ac8cb..b5594b6dc3 100644 --- a/official/c13030280.lua +++ b/official/c13030280.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCondition(s.damcon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) diff --git a/official/c13183454.lua b/official/c13183454.lua index 4df5914d67..3b23ba3216 100644 --- a/official/c13183454.lua +++ b/official/c13183454.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c14152862.lua b/official/c14152862.lua index fa73e44bbd..ad76dee694 100644 --- a/official/c14152862.lua +++ b/official/c14152862.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.discon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) diff --git a/official/c1426714.lua b/official/c1426714.lua index f301354647..260562eac0 100644 --- a/official/c1426714.lua +++ b/official/c1426714.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) e1:SetCondition(s.spcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c14301396.lua b/official/c14301396.lua index f80385782c..8043b9d919 100644 --- a/official/c14301396.lua +++ b/official/c14301396.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c14306092.lua b/official/c14306092.lua index 91d70cfb87..90a6a49915 100644 --- a/official/c14306092.lua +++ b/official/c14306092.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.ctop) c:RegisterEffect(e1) --atkup diff --git a/official/c15092394.lua b/official/c15092394.lua index 4f5a5f86ff..ed0689c46b 100644 --- a/official/c15092394.lua +++ b/official/c15092394.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.descon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c15232745.lua b/official/c15232745.lua index 076d848979..0ac40dc1fe 100644 --- a/official/c15232745.lua +++ b/official/c15232745.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c15561463.lua b/official/c15561463.lua index 56161568e5..aa33c9cb7e 100644 --- a/official/c15561463.lua +++ b/official/c15561463.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c15862758.lua b/official/c15862758.lua index 04ff5b7f7d..d8573a9cd3 100644 --- a/official/c15862758.lua +++ b/official/c15862758.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e7:SetCode(EVENT_ATTACK_ANNOUNCE) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.nacon) - e7:SetCost(Cost.Detach(1)) + e7:SetCost(Cost.DetachFromSelf(1)) e7:SetTarget(s.natg) e7:SetOperation(s.naop) c:RegisterEffect(e7) diff --git a/official/c15914410.lua b/official/c15914410.lua index 2f47530c7a..1324794984 100644 --- a/official/c15914410.lua +++ b/official/c15914410.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) diff --git a/official/c15939229.lua b/official/c15939229.lua index ec5f20ec0f..5781335ac7 100644 --- a/official/c15939229.lua +++ b/official/c15939229.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1) e2:SetHintTiming(0,TIMING_SSET|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.settg) e3:SetOperation(s.setop) c:RegisterEffect(e3) diff --git a/official/c16037007.lua b/official/c16037007.lua index 3eb2ec263b..2944a630ed 100644 --- a/official/c16037007.lua +++ b/official/c16037007.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.discon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) diff --git a/official/c16110708.lua b/official/c16110708.lua index 901b983493..f62b99759d 100644 --- a/official/c16110708.lua +++ b/official/c16110708.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(function(e) return not e:GetHandler():IsBaseAttack(1500) end) - e3:SetCost(Cost.Detach(1,1)) + e3:SetCost(Cost.DetachFromSelf(1,1)) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end diff --git a/official/c16195942.lua b/official/c16195942.lua index 22d5e4ae8d..7886aeb66a 100644 --- a/official/c16195942.lua +++ b/official/c16195942.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c1621413.lua b/official/c1621413.lua index 5b6605bf0c..e1f4e29f91 100644 --- a/official/c1621413.lua +++ b/official/c1621413.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c1639384.lua b/official/c1639384.lua index c8d01f8e68..34d5a4d0a3 100644 --- a/official/c1639384.lua +++ b/official/c1639384.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) diff --git a/official/c16643334.lua b/official/c16643334.lua index 67ddd0c6c7..c5a0503772 100644 --- a/official/c16643334.lua +++ b/official/c16643334.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) e4:SetCondition(s.spcon2) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) c:RegisterEffect(e4) diff --git a/official/c16691074.lua b/official/c16691074.lua index c9e8c0ca32..b2bec637ad 100644 --- a/official/c16691074.lua +++ b/official/c16691074.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c16699558.lua b/official/c16699558.lua index 80cdd3eff5..588998d835 100644 --- a/official/c16699558.lua +++ b/official/c16699558.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1,1)) + e3:SetCost(Cost.DetachFromSelf(1,1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c1688285.lua b/official/c1688285.lua index 17ae93a921..c8e2bcf556 100644 --- a/official/c1688285.lua +++ b/official/c1688285.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,1)) + e2:SetCost(Cost.DetachFromSelf(1,1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c16955631.lua b/official/c16955631.lua index 9759a71e62..284e13132f 100644 --- a/official/c16955631.lua +++ b/official/c16955631.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c17016362.lua b/official/c17016362.lua index 61f8971a73..d4e32968d8 100644 --- a/official/c17016362.lua +++ b/official/c17016362.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetHintTiming(0,TIMING_MAIN_END) e2:SetCondition(s.mtcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.mttg) e2:SetOperation(s.mtop) c:RegisterEffect(e2) diff --git a/official/c1828513.lua b/official/c1828513.lua index 3ee740717a..eedb84c36d 100644 --- a/official/c1828513.lua +++ b/official/c1828513.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c18326736.lua b/official/c18326736.lua index 57454fddba..46b41230cd 100644 --- a/official/c18326736.lua +++ b/official/c18326736.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(Cost.AND(Cost.Detach(3),Cost.HintSelectedEffect)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(3),Cost.HintSelectedEffect)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.AND(Cost.Detach(7),Cost.HintSelectedEffect)) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(7),Cost.HintSelectedEffect)) e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end end) e2:SetOperation(s.skipop) c:RegisterEffect(e2) @@ -90,4 +90,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end \ No newline at end of file +end diff --git a/official/c18511599.lua b/official/c18511599.lua index 98ed599f66..ec451b89be 100644 --- a/official/c18511599.lua +++ b/official/c18511599.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c18897163.lua b/official/c18897163.lua index c1cceedad4..7765641655 100644 --- a/official/c18897163.lua +++ b/official/c18897163.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) diff --git a/official/c18963306.lua b/official/c18963306.lua index 74bfd82f79..9e8964d8cf 100644 --- a/official/c18963306.lua +++ b/official/c18963306.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c19333131.lua b/official/c19333131.lua index 0e04401d63..02233341e5 100644 --- a/official/c19333131.lua +++ b/official/c19333131.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/official/c19369609.lua b/official/c19369609.lua index 2b3e4a60f5..3b54c683b5 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) - e3:SetCost(Cost.Detach(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) + e3:SetCost(Cost.DetachFromSelf(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end diff --git a/official/c19684740.lua b/official/c19684740.lua index 3234ee8210..9a933675a0 100644 --- a/official/c19684740.lua +++ b/official/c19684740.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c19891310.lua b/official/c19891310.lua index 2f67cfb30c..eab67e21e8 100644 --- a/official/c19891310.lua +++ b/official/c19891310.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_ATTACK|TIMING_BATTLE_PHASE) e1:SetCondition(s.discon) - e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.SoftOncePerBattle)) e1:SetOperation(s.disop) c:RegisterEffect(e1) --Add 1 other "Geargia" card from your GY to your hand @@ -67,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c1992816.lua b/official/c1992816.lua index 42e9ddce76..0fb82f3c68 100644 --- a/official/c1992816.lua +++ b/official/c1992816.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.dacon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetOperation(s.daop) c:RegisterEffect(e3) end diff --git a/official/c20145685.lua b/official/c20145685.lua index 0af5204fd5..792065cbae 100644 --- a/official/c20145685.lua +++ b/official/c20145685.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,s.thmaxcost,function(e,og) e:SetLabel(#og) end)) + e1:SetCost(Cost.DetachFromSelf(1,s.thmaxcost,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -61,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(thg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,thg) end -end \ No newline at end of file +end diff --git a/official/c20155904.lua b/official/c20155904.lua index 680772c1eb..6cbb5d710d 100644 --- a/official/c20155904.lua +++ b/official/c20155904.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -62,4 +62,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) -end \ No newline at end of file +end diff --git a/official/c20343502.lua b/official/c20343502.lua index 3d83480bed..830225e341 100644 --- a/official/c20343502.lua +++ b/official/c20343502.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.immtg) e1:SetOperation(s.immop) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) diff --git a/official/c20563387.lua b/official/c20563387.lua index d524831e05..62b800365e 100644 --- a/official/c20563387.lua +++ b/official/c20563387.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.rmcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) diff --git a/official/c2061963.lua b/official/c2061963.lua index c3752b7b8c..3f4d149af0 100644 --- a/official/c2061963.lua +++ b/official/c2061963.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c20785975.lua b/official/c20785975.lua index 7bb0378ea0..75ff22f1b0 100644 --- a/official/c20785975.lua +++ b/official/c20785975.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c2091298.lua b/official/c2091298.lua index 92a1a33146..3b3b5fb018 100644 --- a/official/c2091298.lua +++ b/official/c2091298.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/official/c21044178.lua b/official/c21044178.lua index 035a490846..0190107688 100644 --- a/official/c21044178.lua +++ b/official/c21044178.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_DRAW_PHASE) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.operation) c:RegisterEffect(e2) end diff --git a/official/c21065189.lua b/official/c21065189.lua index e9f5e92ae7..7de7595a05 100644 --- a/official/c21065189.lua +++ b/official/c21065189.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(2)) + e2:SetCost(Cost.DetachFromSelf(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c21223277.lua b/official/c21223277.lua index 8c70156481..50080b36fb 100644 --- a/official/c21223277.lua +++ b/official/c21223277.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c21313376.lua b/official/c21313376.lua index 712ed3a6ba..05f4d12f33 100644 --- a/official/c21313376.lua +++ b/official/c21313376.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCondition(aux.bdogcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c21501505.lua b/official/c21501505.lua index 918dbd0323..94906045eb 100644 --- a/official/c21501505.lua +++ b/official/c21501505.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c21521304.lua b/official/c21521304.lua index 6f16be7bf3..48abe842d2 100644 --- a/official/c21521304.lua +++ b/official/c21521304.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c21858819.lua b/official/c21858819.lua index c05867296d..44c89fcbbd 100644 --- a/official/c21858819.lua +++ b/official/c21858819.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c2191144.lua b/official/c2191144.lua index 043b3b942e..3ae2b89539 100644 --- a/official/c2191144.lua +++ b/official/c2191144.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c22110647.lua b/official/c22110647.lua index 68b3e48f7b..daa3bb1930 100644 --- a/official/c22110647.lua +++ b/official/c22110647.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c22653490.lua b/official/c22653490.lua index bbe8a2d6ad..05314cdd25 100644 --- a/official/c22653490.lua +++ b/official/c22653490.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.tdtg2) e2:SetOperation(s.tdop2) c:RegisterEffect(e2) diff --git a/official/c23085002.lua b/official/c23085002.lua index b14da367b3..073c624564 100644 --- a/official/c23085002.lua +++ b/official/c23085002.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetOperation(s.operation) c:RegisterEffect(e3) end @@ -58,4 +58,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c) return c:IsLocation(LOCATION_GRAVE) -end \ No newline at end of file +end diff --git a/official/c23454876.lua b/official/c23454876.lua index 84a453b21d..d5114442b6 100644 --- a/official/c23454876.lua +++ b/official/c23454876.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCondition(s.damcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) diff --git a/official/c23603403.lua b/official/c23603403.lua index 8405f62bc2..870b5e8476 100644 --- a/official/c23603403.lua +++ b/official/c23603403.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetCondition(aux.StatChangeDamageStepCondition) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) diff --git a/official/c23649496.lua b/official/c23649496.lua index de631690f9..39ba4d443f 100644 --- a/official/c23649496.lua +++ b/official/c23649496.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c23776077.lua b/official/c23776077.lua index 8589865eb7..2b4ab90dc1 100644 --- a/official/c23776077.lua +++ b/official/c23776077.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) diff --git a/official/c23848752.lua b/official/c23848752.lua index 5e0afbdb2e..4c93f2839e 100644 --- a/official/c23848752.lua +++ b/official/c23848752.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c24701066.lua b/official/c24701066.lua index bae0777497..455931abe4 100644 --- a/official/c24701066.lua +++ b/official/c24701066.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.thtgtg) e2:SetOperation(s.thtgop) c:RegisterEffect(e2) diff --git a/official/c2530830.lua b/official/c2530830.lua index a2fdf102ba..6d811e5abb 100644 --- a/official/c2530830.lua +++ b/official/c2530830.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c25341652.lua b/official/c25341652.lua index 126b6fd43a..6efd4ccc28 100644 --- a/official/c25341652.lua +++ b/official/c25341652.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) diff --git a/official/c2609443.lua b/official/c2609443.lua index 01f3621c08..7e0bf2fdeb 100644 --- a/official/c2609443.lua +++ b/official/c2609443.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(2)) + e2:SetCost(Cost.DetachFromSelf(2)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -82,4 +82,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c26096328.lua b/official/c26096328.lua index 029f3aecc4..669389ea13 100644 --- a/official/c26096328.lua +++ b/official/c26096328.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --multi attack diff --git a/official/c26211048.lua b/official/c26211048.lua index 26028a6f23..5f152efbaf 100644 --- a/official/c26211048.lua +++ b/official/c26211048.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c26329679.lua b/official/c26329679.lua index 50994ab702..6039d35fc0 100644 --- a/official/c26329679.lua +++ b/official/c26329679.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1) diff --git a/official/c26556950.lua b/official/c26556950.lua index 7cad760932..e7f8a8a94f 100644 --- a/official/c26556950.lua +++ b/official/c26556950.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1,1,nil)) + e4:SetCost(Cost.DetachFromSelf(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) diff --git a/official/c26563200.lua b/official/c26563200.lua index e8f784f049..e23e69c736 100644 --- a/official/c26563200.lua +++ b/official/c26563200.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end diff --git a/official/c2665273.lua b/official/c2665273.lua index b7a923dad3..646544de1c 100644 --- a/official/c2665273.lua +++ b/official/c2665273.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,id) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c26973555.lua b/official/c26973555.lua index 195ddbf9c5..12319fe04f 100644 --- a/official/c26973555.lua +++ b/official/c26973555.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.discon) - e4:SetCost(Cost.Detach(1,1,nil)) + e4:SetCost(Cost.DetachFromSelf(1,1,nil)) e4:SetTarget(s.distg) e4:SetOperation(s.disop) c:RegisterEffect(e4) @@ -62,4 +62,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.GetControl(rc,tp) end -end \ No newline at end of file +end diff --git a/official/c26988374.lua b/official/c26988374.lua index 533d609ab5..aac509a418 100644 --- a/official/c26988374.lua +++ b/official/c26988374.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.damcon) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/official/c27069566.lua b/official/c27069566.lua index 0e95069842..18fc767d4a 100644 --- a/official/c27069566.lua +++ b/official/c27069566.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.rmvtg) e1:SetOperation(s.rmvop) c:RegisterEffect(e1) diff --git a/official/c27240101.lua b/official/c27240101.lua index e7f1f8fb39..0bc75742f7 100644 --- a/official/c27240101.lua +++ b/official/c27240101.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(2)) + e2:SetCost(Cost.DetachFromSelf(2)) e2:SetOperation(s.indop) e2:SetHintTiming(0,TIMING_BATTLE_START) c:RegisterEffect(e2) @@ -47,4 +47,4 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c27337596.lua b/official/c27337596.lua index d7cc3b8e22..e04e1e76ba 100644 --- a/official/c27337596.lua +++ b/official/c27337596.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(1),s.spcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.spcost)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c27420823.lua b/official/c27420823.lua index 6d354dce1f..17e1b4935a 100644 --- a/official/c27420823.lua +++ b/official/c27420823.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) c:RegisterEffect(e2) diff --git a/official/c27552504.lua b/official/c27552504.lua index a71e4b4bec..0fc34c02f1 100644 --- a/official/c27552504.lua +++ b/official/c27552504.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) diff --git a/official/c2766877.lua b/official/c2766877.lua index aefb7f9989..1ffddf1431 100644 --- a/official/c2766877.lua +++ b/official/c2766877.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c28150174.lua b/official/c28150174.lua index fedb1b3813..2c9e5371cd 100644 --- a/official/c28150174.lua +++ b/official/c28150174.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) diff --git a/official/c28290705.lua b/official/c28290705.lua index 3685adc42a..b1292341df 100644 --- a/official/c28290705.lua +++ b/official/c28290705.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) c:RegisterEffect(e1) diff --git a/official/c28346136.lua b/official/c28346136.lua index 401714df3d..5b6770532c 100644 --- a/official/c28346136.lua +++ b/official/c28346136.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.cannottgtg) e1:SetOperation(s.cannottgop) c:RegisterEffect(e1) diff --git a/official/c28400508.lua b/official/c28400508.lua index 4d746349cb..0c2e367044 100644 --- a/official/c28400508.lua +++ b/official/c28400508.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c28781003.lua b/official/c28781003.lua index 7777115168..a286954238 100644 --- a/official/c28781003.lua +++ b/official/c28781003.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c28912357.lua b/official/c28912357.lua index 1b5ee1018a..d9e7212579 100644 --- a/official/c28912357.lua +++ b/official/c28912357.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c2896663.lua b/official/c2896663.lua index ef0392bdf1..8c2d798b48 100644 --- a/official/c2896663.lua +++ b/official/c2896663.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c28981598.lua b/official/c28981598.lua index b244890a18..c8453c1e37 100644 --- a/official/c28981598.lua +++ b/official/c28981598.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c29085954.lua b/official/c29085954.lua index 06b8ac5820..1ebf1d582d 100644 --- a/official/c29085954.lua +++ b/official/c29085954.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c29208536.lua b/official/c29208536.lua index 7278e94cba..11d3e466e0 100644 --- a/official/c29208536.lua +++ b/official/c29208536.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c29423048.lua b/official/c29423048.lua index 0b38e35c05..071297ee8f 100644 --- a/official/c29423048.lua +++ b/official/c29423048.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.thtgtg) e1:SetOperation(s.thtgop) c:RegisterEffect(e1) diff --git a/official/c29510428.lua b/official/c29510428.lua index 5241db2b3e..707c2b847d 100644 --- a/official/c29510428.lua +++ b/official/c29510428.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c29515122.lua b/official/c29515122.lua index 0cd592b964..22eafb4fda 100644 --- a/official/c29515122.lua +++ b/official/c29515122.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c29669359.lua b/official/c29669359.lua index c4fc7c4e86..f16c669b3f 100644 --- a/official/c29669359.lua +++ b/official/c29669359.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(1),s.descost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.descost)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -50,4 +50,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c2978414.lua b/official/c2978414.lua index d829c1a5ca..450f123491 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c30095833.lua b/official/c30095833.lua index 18deeb5ea5..435998d170 100644 --- a/official/c30095833.lua +++ b/official/c30095833.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1,1)) + e3:SetCost(Cost.DetachFromSelf(1,1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c30100551.lua b/official/c30100551.lua index 3efb7911b8..6394d44e5e 100644 --- a/official/c30100551.lua +++ b/official/c30100551.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.distg) e1:SetOperation(s.drop) c:RegisterEffect(e1) diff --git a/official/c30128445.lua b/official/c30128445.lua index 053df4bf73..9aa92fcb8a 100644 --- a/official/c30128445.lua +++ b/official/c30128445.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c30350202.lua b/official/c30350202.lua index 9a0715d772..625b545227 100644 --- a/official/c30350202.lua +++ b/official/c30350202.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) diff --git a/official/c30439101.lua b/official/c30439101.lua index 39a239f402..f04874ab6f 100644 --- a/official/c30439101.lua +++ b/official/c30439101.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c30741334.lua b/official/c30741334.lua index ae411abdcf..8904f486bf 100644 --- a/official/c30741334.lua +++ b/official/c30741334.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(3,id) - e1:SetCost(Cost.AND(Cost.Detach(1),s.drcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.drcost)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) @@ -45,4 +45,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end \ No newline at end of file +end diff --git a/official/c31123642.lua b/official/c31123642.lua index f7e286b636..b32e37c86f 100644 --- a/official/c31123642.lua +++ b/official/c31123642.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c31320433.lua b/official/c31320433.lua index c8752a4d26..6d7f95e74a 100644 --- a/official/c31320433.lua +++ b/official/c31320433.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.dacon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.datg) e2:SetOperation(s.daop) c:RegisterEffect(e2) diff --git a/official/c31437713.lua b/official/c31437713.lua index 876f2727ef..738da21e3d 100644 --- a/official/c31437713.lua +++ b/official/c31437713.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(e) return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) end) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.effop) c:RegisterEffect(e2) end @@ -49,4 +49,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e2:SetTarget(function(e,c) return c:GetFieldID()~=fid end) e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/official/c31539614.lua b/official/c31539614.lua index 79215ed438..08d8ffe36c 100644 --- a/official/c31539614.lua +++ b/official/c31539614.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.changeatkdeftg) e1:SetOperation(s.changeatkdefop) c:RegisterEffect(e1) diff --git a/official/c31563350.lua b/official/c31563350.lua index d3b609df1f..f9e2ee0700 100644 --- a/official/c31563350.lua +++ b/official/c31563350.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c31801517.lua b/official/c31801517.lua index 662f9d989f..2d71199a62 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e) return e:GetHandler():IsRelateToBattle() end) - e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Special Summon this card during your 2nd Standby Phase after activation and double its ATK @@ -88,4 +88,4 @@ function s.standbyspop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c32003338.lua b/official/c32003338.lua index 0dcb1b8901..1f81971941 100644 --- a/official/c32003338.lua +++ b/official/c32003338.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c32224143.lua b/official/c32224143.lua index fdfd150e22..76cb0ed5f7 100644 --- a/official/c32224143.lua +++ b/official/c32224143.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c32302078.lua b/official/c32302078.lua index 284fa3e059..ab5e0d2f7e 100644 --- a/official/c32302078.lua +++ b/official/c32302078.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_CUSTOM+id) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c32446630.lua b/official/c32446630.lua index 5b5deaff62..fbf165a36d 100644 --- a/official/c32446630.lua +++ b/official/c32446630.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c32530043.lua b/official/c32530043.lua index 329b908be5..0f94691a57 100644 --- a/official/c32530043.lua +++ b/official/c32530043.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c32559361.lua b/official/c32559361.lua index 8720d9921b..1b97333e67 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,1992816) end) - e3:SetCost(Cost.Detach(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) + e3:SetCost(Cost.DetachFromSelf(1,function(e) return e:GetHandler():GetOverlayCount() end,function(e,og) e:SetLabel(#og) end)) e3:SetTarget(s.dam800tg) e3:SetOperation(s.dam800op) c:RegisterEffect(e3) @@ -73,4 +73,4 @@ function s.dam800op(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c3292267.lua b/official/c3292267.lua index 737214d24e..2c0142a789 100644 --- a/official/c3292267.lua +++ b/official/c3292267.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.discon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) diff --git a/official/c33776843.lua b/official/c33776843.lua index 8f53569235..0d8a857b9c 100644 --- a/official/c33776843.lua +++ b/official/c33776843.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c33779875.lua b/official/c33779875.lua index 4a4a3de3c3..eca86736cb 100644 --- a/official/c33779875.lua +++ b/official/c33779875.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) e1:SetCondition(s.igncon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.trtg) e1:SetOperation(s.trop) c:RegisterEffect(e1) diff --git a/official/c33909817.lua b/official/c33909817.lua index 1e3d78bdd2..96d5e1041c 100644 --- a/official/c33909817.lua +++ b/official/c33909817.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c34086406.lua b/official/c34086406.lua index b1b7497b83..0a5798c538 100644 --- a/official/c34086406.lua +++ b/official/c34086406.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c34481518.lua b/official/c34481518.lua index 629cfb99a5..3e4c1567a2 100644 --- a/official/c34481518.lua +++ b/official/c34481518.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.damcon) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/official/c34876719.lua b/official/c34876719.lua index 61c59bff9c..e484703f7c 100644 --- a/official/c34876719.lua +++ b/official/c34876719.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,id) e2:SetCondition(s.attcon) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.atttg) e2:SetOperation(s.attop) c:RegisterEffect(e2) @@ -63,4 +63,4 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c34909328.lua b/official/c34909328.lua index 4f3d9c55b5..770ff76e80 100644 --- a/official/c34909328.lua +++ b/official/c34909328.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) 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(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c34945480.lua b/official/c34945480.lua index ea54597d7f..bb16a8697d 100644 --- a/official/c34945480.lua +++ b/official/c34945480.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.condition) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c35103106.lua b/official/c35103106.lua index a00d5a3b6b..7dbd20a7ac 100644 --- a/official/c35103106.lua +++ b/official/c35103106.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(Cost.Detach(s.discostmin,2)) + e2:SetCost(Cost.DetachFromSelf(s.discostmin,2)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c35772782.lua b/official/c35772782.lua index 7da78fd84e..91ab408001 100644 --- a/official/c35772782.lua +++ b/official/c35772782.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -92,4 +92,4 @@ function s.diceop(e,tp,eg,ep,ev,re,r,rp) s[0]=cid e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end -end \ No newline at end of file +end diff --git a/official/c3594985.lua b/official/c3594985.lua index 9b98068f36..7baff145ac 100644 --- a/official/c3594985.lua +++ b/official/c3594985.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(2,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c359563.lua b/official/c359563.lua index 78b4718768..cb9a9cbe40 100644 --- a/official/c359563.lua +++ b/official/c359563.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c36076683.lua b/official/c36076683.lua index 2b15fa5928..6a02b806d2 100644 --- a/official/c36076683.lua +++ b/official/c36076683.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end diff --git a/official/c36757171.lua b/official/c36757171.lua index f97f1ba615..7f7fe57a2d 100644 --- a/official/c36757171.lua +++ b/official/c36757171.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c36776089.lua b/official/c36776089.lua index 8458917b97..a1f1220562 100644 --- a/official/c36776089.lua +++ b/official/c36776089.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetCondition(s.retcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.rettg) e2:SetOperation(s.retop) c:RegisterEffect(e2) diff --git a/official/c3685372.lua b/official/c3685372.lua index 37d95797b7..e934ebed6f 100644 --- a/official/c3685372.lua +++ b/official/c3685372.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -132,4 +132,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and tc:GetBaseAttack()>0 then Duel.Damage(1-tp,tc:GetBaseAttack()//2,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c37057743.lua b/official/c37057743.lua index fce1877d1b..e648c48d00 100644 --- a/official/c37057743.lua +++ b/official/c37057743.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c37164373.lua b/official/c37164373.lua index 8252cd4a8a..76f045a10f 100644 --- a/official/c37164373.lua +++ b/official/c37164373.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c37279508.lua b/official/c37279508.lua index 923e81f3fb..65ea4ae3ba 100644 --- a/official/c37279508.lua +++ b/official/c37279508.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c3743515.lua b/official/c3743515.lua index 75e7f9481b..5cfb658385 100644 --- a/official/c3743515.lua +++ b/official/c3743515.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c3758046.lua b/official/c3758046.lua index f59e4ecad9..08af1c94e5 100644 --- a/official/c3758046.lua +++ b/official/c3758046.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(function() return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.regtg) e1:SetOperation(s.regop) c:RegisterEffect(e1) diff --git a/official/c37649320.lua b/official/c37649320.lua index e1180531e0..c5ddc2543a 100644 --- a/official/c37649320.lua +++ b/official/c37649320.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.thcon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c3790062.lua b/official/c3790062.lua index 600b430bdf..8fdff176f0 100644 --- a/official/c3790062.lua +++ b/official/c3790062.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c37926346.lua b/official/c37926346.lua index da21bdc2c8..3f5ff4fc2d 100644 --- a/official/c37926346.lua +++ b/official/c37926346.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SPSUMMON) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c38026562.lua b/official/c38026562.lua index bc222c4a10..7c57a72948 100644 --- a/official/c38026562.lua +++ b/official/c38026562.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.tgcon) - e4:SetCost(Cost.Detach(1,1,nil)) + e4:SetCost(Cost.DetachFromSelf(1,1,nil)) e4:SetTarget(s.tgtg) e4:SetOperation(s.tgop) c:RegisterEffect(e4) diff --git a/official/c3814632.lua b/official/c3814632.lua index d51645a3bd..af2506f56e 100644 --- a/official/c3814632.lua +++ b/official/c3814632.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.AND(Cost.Detach(1),s.descost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.descost)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c38180759.lua b/official/c38180759.lua index 1f345e7a6f..129e162242 100644 --- a/official/c38180759.lua +++ b/official/c38180759.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c38250531.lua b/official/c38250531.lua index 8f418cebc9..185f353f37 100644 --- a/official/c38250531.lua +++ b/official/c38250531.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c38273745.lua b/official/c38273745.lua index e05d12fe1d..d8c99ff773 100644 --- a/official/c38273745.lua +++ b/official/c38273745.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c3828844.lua b/official/c3828844.lua index 3ef0709c02..a6c1032b81 100644 --- a/official/c3828844.lua +++ b/official/c3828844.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c38495396.lua b/official/c38495396.lua index 0af8088d87..e902b82a55 100644 --- a/official/c38495396.lua +++ b/official/c38495396.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c38694052.lua b/official/c38694052.lua index 4ba5134a06..0112d08004 100644 --- a/official/c38694052.lua +++ b/official/c38694052.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e1:SetCondition(function(e) return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsRace,1,nil,RACE_DRAGON) end) - e1:SetCost(Cost.AND(Cost.Detach(2),s.descost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(2),s.descost)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c39030163.lua b/official/c39030163.lua index 01773babb5..3e5e118415 100644 --- a/official/c39030163.lua +++ b/official/c39030163.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.AND(Cost.Detach(1),Cost.HintSelectedEffect)) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.HintSelectedEffect)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c39139935.lua b/official/c39139935.lua index 768ac83705..0be571154b 100644 --- a/official/c39139935.lua +++ b/official/c39139935.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c39272762.lua b/official/c39272762.lua index 5e7ed72fad..f78cca4962 100644 --- a/official/c39272762.lua +++ b/official/c39272762.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.attg) e3:SetOperation(s.atop) c:RegisterEffect(e3) diff --git a/official/c39622156.lua b/official/c39622156.lua index e5fd044bdd..09670939f8 100644 --- a/official/c39622156.lua +++ b/official/c39622156.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetTarget(Cost.Detach(1)) + e1:SetTarget(Cost.DetachFromSelf(1)) e1:SetOperation(s.btop) c:RegisterEffect(e1) --control diff --git a/official/c3989465.lua b/official/c3989465.lua index 0bd73915c1..8d59d455ba 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end @@ -28,4 +28,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) --This card gains 500 ATK until the end of this turn c:UpdateAttack(500,RESETS_STANDARD_DISABLE_PHASE_END) end -end \ No newline at end of file +end diff --git a/official/c39943352.lua b/official/c39943352.lua index 52db0eb866..29f16566b5 100644 --- a/official/c39943352.lua +++ b/official/c39943352.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(1,1)) + e2:SetCost(Cost.DetachFromSelf(1,1)) e2:SetTarget(s.pltg) e2:SetOperation(s.plop) c:RegisterEffect(e2) @@ -91,4 +91,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/official/c39972129.lua b/official/c39972129.lua index 98d72ffdf7..e4faa5adbc 100644 --- a/official/c39972129.lua +++ b/official/c39972129.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c39987164.lua b/official/c39987164.lua index a9f29ed78b..e2dfb22079 100644 --- a/official/c39987164.lua +++ b/official/c39987164.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c4019153.lua b/official/c4019153.lua index 71bcf67cc1..56974b7a1e 100644 --- a/official/c4019153.lua +++ b/official/c4019153.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c40390147.lua b/official/c40390147.lua index 5ec605bd8d..cbce291b13 100644 --- a/official/c40390147.lua +++ b/official/c40390147.lua @@ -13,8 +13,8 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(Cost.Choice( - {Cost.Detach(1),aux.Stringid(id,1),s.spcheck(LOCATION_HAND)}, - {Cost.Detach(2),aux.Stringid(id,2),s.spcheck(LOCATION_DECK)} + {Cost.DetachFromSelf(1),aux.Stringid(id,1),s.spcheck(LOCATION_HAND)}, + {Cost.DetachFromSelf(2),aux.Stringid(id,2),s.spcheck(LOCATION_DECK)} )) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) diff --git a/official/c40424929.lua b/official/c40424929.lua index a1fecc3c88..cf6ef39fdd 100644 --- a/official/c40424929.lua +++ b/official/c40424929.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/official/c40673853.lua b/official/c40673853.lua index d10ddbd53e..437728aa48 100644 --- a/official/c40673853.lua +++ b/official/c40673853.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) diff --git a/official/c40706444.lua b/official/c40706444.lua index 9fcffb7452..9a7dc7fd76 100644 --- a/official/c40706444.lua +++ b/official/c40706444.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(2)) + e2:SetCost(Cost.DetachFromSelf(2)) e2:SetTarget(s.pltg) e2:SetOperation(s.plop) c:RegisterEffect(e2) @@ -74,4 +74,4 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end end -end \ No newline at end of file +end diff --git a/official/c41147577.lua b/official/c41147577.lua index 3908ceed5e..cf02cd6dd7 100644 --- a/official/c41147577.lua +++ b/official/c41147577.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1) e2:SetCondition(s.poscon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) diff --git a/official/c41309158.lua b/official/c41309158.lua index 784d167fad..b3045afc34 100644 --- a/official/c41309158.lua +++ b/official/c41309158.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DAMAGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCondition(s.damcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) diff --git a/official/c41375811.lua b/official/c41375811.lua index 34579e396f..a34a75a26f 100644 --- a/official/c41375811.lua +++ b/official/c41375811.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c4145852.lua b/official/c4145852.lua index 15775d9192..9db3f0c669 100644 --- a/official/c4145852.lua +++ b/official/c4145852.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -66,4 +66,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c41522092.lua b/official/c41522092.lua index fc432502f8..bc5620dfb7 100644 --- a/official/c41522092.lua +++ b/official/c41522092.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(s.ctcon) - e5:SetCost(Cost.Detach(1)) + e5:SetCost(Cost.DetachFromSelf(1)) e5:SetTarget(s.cttg) e5:SetOperation(s.ctop) c:RegisterEffect(e5) diff --git a/official/c41524885.lua b/official/c41524885.lua index 9d9d324743..071435088d 100644 --- a/official/c41524885.lua +++ b/official/c41524885.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c42160203.lua b/official/c42160203.lua index 4d2bd9c186..1e0ad66ace 100644 --- a/official/c42160203.lua +++ b/official/c42160203.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_CONFIRM) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --special summon diff --git a/official/c42230449.lua b/official/c42230449.lua index bd1ea118ca..2bd710e86a 100644 --- a/official/c42230449.lua +++ b/official/c42230449.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c42421606.lua b/official/c42421606.lua index d31c175e8e..834119ca67 100644 --- a/official/c42421606.lua +++ b/official/c42421606.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.eftg) e2:SetOperation(s.efop) c:RegisterEffect(e2) diff --git a/official/c42589641.lua b/official/c42589641.lua index be5a6db09d..5268dd4ec6 100644 --- a/official/c42589641.lua +++ b/official/c42589641.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.hdtg) e4:SetOperation(s.hdop) c:RegisterEffect(e4) diff --git a/official/c42741437.lua b/official/c42741437.lua index 30322da551..a7ad3ece06 100644 --- a/official/c42741437.lua +++ b/official/c42741437.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c42752141.lua b/official/c42752141.lua index 91e9938059..6e8f7ffd3d 100644 --- a/official/c42752141.lua +++ b/official/c42752141.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c42940335.lua b/official/c42940335.lua index c89e994d25..87b3511ea6 100644 --- a/official/c42940335.lua +++ b/official/c42940335.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c43047672.lua b/official/c43047672.lua index 50dc3f92dd..8701f7e071 100644 --- a/official/c43047672.lua +++ b/official/c43047672.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c43490025.lua b/official/c43490025.lua index 8a6f23bc61..3a5ce2a5e6 100644 --- a/official/c43490025.lua +++ b/official/c43490025.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function() return Duel.IsAbleToEnterBP() end) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.secondatktg) e3:SetOperation(s.secondatkop) c:RegisterEffect(e3) diff --git a/official/c4367330.lua b/official/c4367330.lua index e42d595ac8..74504d91df 100644 --- a/official/c4367330.lua +++ b/official/c4367330.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -63,4 +63,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c440556.lua b/official/c440556.lua index 1192c99e64..4603399726 100644 --- a/official/c440556.lua +++ b/official/c440556.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c4423206.lua b/official/c4423206.lua index c4a9d313c3..081266f570 100644 --- a/official/c4423206.lua +++ b/official/c4423206.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c44311445.lua b/official/c44311445.lua index 2b261ffe8b..4f1cbd6a05 100644 --- a/official/c44311445.lua +++ b/official/c44311445.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e2:SetCondition(s.spcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) and sc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c44405066.lua b/official/c44405066.lua index 07f9b341a5..409308a447 100644 --- a/official/c44405066.lua +++ b/official/c44405066.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1,1,nil)) + e4:SetCost(Cost.DetachFromSelf(1,1,nil)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) diff --git a/official/c44505297.lua b/official/c44505297.lua index 096e5f97b6..5fe11bd049 100644 --- a/official/c44505297.lua +++ b/official/c44505297.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) diff --git a/official/c44698398.lua b/official/c44698398.lua index 2a3abb51f2..b0048016ab 100644 --- a/official/c44698398.lua +++ b/official/c44698398.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c45533023.lua b/official/c45533023.lua index 3204e6de1f..ed64fda26e 100644 --- a/official/c45533023.lua +++ b/official/c45533023.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) c:RegisterEffect(e3) diff --git a/official/c45742626.lua b/official/c45742626.lua index 2c62b1056d..3816511b87 100644 --- a/official/c45742626.lua +++ b/official/c45742626.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c45852939.lua b/official/c45852939.lua index 3a9d57dece..deedb6774b 100644 --- a/official/c45852939.lua +++ b/official/c45852939.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function() return Duel.IsAbleToEnterBP() end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c45935145.lua b/official/c45935145.lua index f4b55b4a54..dfad14c7fd 100644 --- a/official/c45935145.lua +++ b/official/c45935145.lua @@ -55,8 +55,8 @@ function s.tccheck(op) end end s.effdetachcost=Cost.Choice( - {Cost.Detach(1),aux.Stringid(id,1),s.tccheck(1)}, - {Cost.Detach(2),aux.Stringid(id,2),s.tccheck(2)} + {Cost.DetachFromSelf(1),aux.Stringid(id,1),s.tccheck(1)}, + {Cost.DetachFromSelf(2),aux.Stringid(id,2),s.tccheck(2)} ) function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c46772449.lua b/official/c46772449.lua index f8b5435599..b4f4fbf87f 100644 --- a/official/c46772449.lua +++ b/official/c46772449.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_SPSUMMON,TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e1:SetCondition(s.descon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c46871387.lua b/official/c46871387.lua index afd536b64a..8fd91f1530 100644 --- a/official/c46871387.lua +++ b/official/c46871387.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c46895036.lua b/official/c46895036.lua index e4d6faf17d..8ba5c093be 100644 --- a/official/c46895036.lua +++ b/official/c46895036.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(aux.StatChangeDamageStepCondition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c47017574.lua b/official/c47017574.lua index 552167f0b1..39843ecfc7 100644 --- a/official/c47017574.lua +++ b/official/c47017574.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.discon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) diff --git a/official/c47060528.lua b/official/c47060528.lua index 3081c1fe3d..174618a583 100644 --- a/official/c47060528.lua +++ b/official/c47060528.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c47132793.lua b/official/c47132793.lua index eb14e1b81e..1cf27517a0 100644 --- a/official/c47132793.lua +++ b/official/c47132793.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c47349116.lua b/official/c47349116.lua index e56995a00a..0b176db738 100644 --- a/official/c47349116.lua +++ b/official/c47349116.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c47506081.lua b/official/c47506081.lua index 143bcd984b..278fa439a0 100644 --- a/official/c47506081.lua +++ b/official/c47506081.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCondition(s.damcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/official/c47579719.lua b/official/c47579719.lua index e4d5aeda6a..d605b9ed5b 100644 --- a/official/c47579719.lua +++ b/official/c47579719.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c47805931.lua b/official/c47805931.lua index 8fde461cbd..51437dde6c 100644 --- a/official/c47805931.lua +++ b/official/c47805931.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/official/c48009503.lua b/official/c48009503.lua index 53a66b9f93..cbdeb63a1d 100644 --- a/official/c48009503.lua +++ b/official/c48009503.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -29,4 +29,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c48348921.lua b/official/c48348921.lua index ac8d913582..81aff22ae8 100644 --- a/official/c48348921.lua +++ b/official/c48348921.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --Unaffected by opponent's monster effects diff --git a/official/c48608796.lua b/official/c48608796.lua index 3b92ba74e2..af933dcc1b 100644 --- a/official/c48608796.lua +++ b/official/c48608796.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetOperation(s.indop) c:RegisterEffect(e4) end diff --git a/official/c48626373.lua b/official/c48626373.lua index c8b53cb02d..a15587cc7e 100644 --- a/official/c48626373.lua +++ b/official/c48626373.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) - e3:SetCost(Cost.Detach(3,3)) + e3:SetCost(Cost.DetachFromSelf(3,3)) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3) @@ -82,4 +82,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c48739166.lua b/official/c48739166.lua index 391e1be231..c1107f50ee 100644 --- a/official/c48739166.lua +++ b/official/c48739166.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c48905153.lua b/official/c48905153.lua index dffef9468f..c52df6d349 100644 --- a/official/c48905153.lua +++ b/official/c48905153.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c48928529.lua b/official/c48928529.lua index 66a54d315e..1e5c4448dd 100644 --- a/official/c48928529.lua +++ b/official/c48928529.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/official/c49032236.lua b/official/c49032236.lua index 779189fa2b..fad748fd98 100644 --- a/official/c49032236.lua +++ b/official/c49032236.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) diff --git a/official/c49121795.lua b/official/c49121795.lua index 59c4e17810..c35105105a 100644 --- a/official/c49121795.lua +++ b/official/c49121795.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.dacon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.datg) e1:SetOperation(s.daop) c:RegisterEffect(e1) diff --git a/official/c49195710.lua b/official/c49195710.lua index ebeeddcd66..689f68ffc9 100644 --- a/official/c49195710.lua +++ b/official/c49195710.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atkdeftg) e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) diff --git a/official/c49202331.lua b/official/c49202331.lua index 812ddf9702..82ffdf4e2c 100644 --- a/official/c49202331.lua +++ b/official/c49202331.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCountLimit(1) e2:SetCondition(s.atcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.atop) c:RegisterEffect(e2) end diff --git a/official/c49221191.lua b/official/c49221191.lua index fbd2fb0e8e..932a2026e6 100644 --- a/official/c49221191.lua +++ b/official/c49221191.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCondition(function(e,tp) return Duel.GetLP(tp)<=1000 and aux.StatChangeDamageStepCondition() end) - e1:SetCost(Cost.AND(s.atkdefcost,Cost.Detach(1))) + e1:SetCost(Cost.AND(s.atkdefcost,Cost.DetachFromSelf(1))) e1:SetTarget(s.atkdeftg) e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) @@ -57,4 +57,4 @@ function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c49456901.lua b/official/c49456901.lua index f5fa4c181d..00e8251b87 100644 --- a/official/c49456901.lua +++ b/official/c49456901.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c4965193.lua b/official/c4965193.lua index 407193bba3..5dce0dd35e 100644 --- a/official/c4965193.lua +++ b/official/c4965193.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(Cost.AND(s.applycost,Cost.Detach(1))) + e1:SetCost(Cost.AND(s.applycost,Cost.DetachFromSelf(1))) e1:SetTarget(s.applytg) e1:SetOperation(s.applyop) c:RegisterEffect(e1) @@ -108,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c49678559.lua b/official/c49678559.lua index 4cded6a594..035c439558 100644 --- a/official/c49678559.lua +++ b/official/c49678559.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c49689480.lua b/official/c49689480.lua index 3ce170c315..401155e3c1 100644 --- a/official/c49689480.lua +++ b/official/c49689480.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) @@ -79,4 +79,4 @@ function s.texop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c4997565.lua b/official/c4997565.lua index a41cba6c16..ff37c3629a 100644 --- a/official/c4997565.lua +++ b/official/c4997565.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c5014629.lua b/official/c5014629.lua index e773788a49..b131e0fd92 100644 --- a/official/c5014629.lua +++ b/official/c5014629.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/official/c50260683.lua b/official/c50260683.lua index 90e9e231ab..fc151c17eb 100644 --- a/official/c50260683.lua +++ b/official/c50260683.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c50449881.lua b/official/c50449881.lua index a85c94cbc4..0593a5180a 100644 --- a/official/c50449881.lua +++ b/official/c50449881.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c50789693.lua b/official/c50789693.lua index 78b88156df..c981dee4e3 100644 --- a/official/c50789693.lua +++ b/official/c50789693.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.adop) c:RegisterEffect(e1) -- diff --git a/official/c5088741.lua b/official/c5088741.lua index 0cab045745..125f8d2d59 100644 --- a/official/c5088741.lua +++ b/official/c5088741.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) c:RegisterEffect(e2) --Add 1 "A.I." Trap from your Deck to your hand local e3=Effect.CreateEffect(c) diff --git a/official/c51497409.lua b/official/c51497409.lua index 4b081603f5..8358b804e5 100644 --- a/official/c51497409.lua +++ b/official/c51497409.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.ddtg) e1:SetOperation(s.ddop) c:RegisterEffect(e1) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetCondition(s.incon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.inop) c:RegisterEffect(e2) end diff --git a/official/c51543904.lua b/official/c51543904.lua index 8a1647ce4a..da87fb934c 100644 --- a/official/c51543904.lua +++ b/official/c51543904.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c51735257.lua b/official/c51735257.lua index 9540d9ec7b..113a02e218 100644 --- a/official/c51735257.lua +++ b/official/c51735257.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(1),s.tgcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.tgcost)) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -49,4 +49,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) and tc:IsLocation(LOCATION_GRAVE) then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c51960178.lua b/official/c51960178.lua index d8c96b4f50..fe1b472d1f 100644 --- a/official/c51960178.lua +++ b/official/c51960178.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c52323874.lua b/official/c52323874.lua index bc4d19e712..82983fa316 100644 --- a/official/c52323874.lua +++ b/official/c52323874.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c52558805.lua b/official/c52558805.lua index 4ebfd51976..43c03bca69 100644 --- a/official/c52558805.lua +++ b/official/c52558805.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1) e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c52653092.lua b/official/c52653092.lua index b984d80b3e..add3b3fbdd 100644 --- a/official/c52653092.lua +++ b/official/c52653092.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e6:SetHintTiming(0,TIMING_DRAW_PHASE) e6:SetCountLimit(1) e6:SetCondition(s.actcon) - e6:SetCost(Cost.Detach(1)) + e6:SetCost(Cost.DetachFromSelf(1)) e6:SetOperation(s.actop) c:RegisterEffect(e6) end diff --git a/official/c53054164.lua b/official/c53054164.lua index 69094a0c96..558fddb44d 100644 --- a/official/c53054164.lua +++ b/official/c53054164.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcond) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c53244294.lua b/official/c53244294.lua index 8484942ec9..488285c515 100644 --- a/official/c53244294.lua +++ b/official/c53244294.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.zcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.ztg) e2:SetOperation(s.zop) c:RegisterEffect(e2) diff --git a/official/c53334641.lua b/official/c53334641.lua index 2a22f14307..56daacc7c8 100644 --- a/official/c53334641.lua +++ b/official/c53334641.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c53701457.lua b/official/c53701457.lua index 1503382487..c96cba8597 100644 --- a/official/c53701457.lua +++ b/official/c53701457.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetCondition(s.damcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) c:RegisterEffect(e3) diff --git a/official/c54191698.lua b/official/c54191698.lua index 62c7afe8d0..ed81db033b 100644 --- a/official/c54191698.lua +++ b/official/c54191698.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -75,4 +75,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end \ No newline at end of file +end diff --git a/official/c54358015.lua b/official/c54358015.lua index ab1bf74f0f..5708846896 100644 --- a/official/c54358015.lua +++ b/official/c54358015.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c54366836.lua b/official/c54366836.lua index 9228ae60c9..307b5bef88 100644 --- a/official/c54366836.lua +++ b/official/c54366836.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(function(e,tp) local bc=e:GetHandler():GetBattleTarget() return bc and bc:IsControler(1-tp) end) - e3:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle)) + e3:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.SoftOncePerBattle)) e3:SetOperation(s.reversedamop) c:RegisterEffect(e3) end @@ -56,4 +56,4 @@ function s.reversedamop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c54719828.lua b/official/c54719828.lua index b6a9c28323..2ce019df67 100644 --- a/official/c54719828.lua +++ b/official/c54719828.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c54919528.lua b/official/c54919528.lua index 93bd49d9cb..f2a398d310 100644 --- a/official/c54919528.lua +++ b/official/c54919528.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.rmvtg) e4:SetOperation(s.rmvop) c:RegisterEffect(e4) @@ -78,4 +78,4 @@ function s.rmvop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c5530780.lua b/official/c5530780.lua index 83690c0f57..8dbf51a70c 100644 --- a/official/c5530780.lua +++ b/official/c5530780.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.AND(Cost.Detach(1),Cost.HintSelectedEffect)) + e3:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.HintSelectedEffect)) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end @@ -85,4 +85,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(800) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c55470553.lua b/official/c55470553.lua index 0f1f9aa6bf..4ab762b5e2 100644 --- a/official/c55470553.lua +++ b/official/c55470553.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) diff --git a/official/c55727845.lua b/official/c55727845.lua index 49dc0eb60f..caa96397be 100644 --- a/official/c55727845.lua +++ b/official/c55727845.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c55935416.lua b/official/c55935416.lua index aed1250cde..8cb3cfafff 100644 --- a/official/c55935416.lua +++ b/official/c55935416.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) diff --git a/official/c56051086.lua b/official/c56051086.lua index f9550e15bc..fc1f55ce06 100644 --- a/official/c56051086.lua +++ b/official/c56051086.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c56292140.lua b/official/c56292140.lua index 5ff1994a44..292bc22ce2 100644 --- a/official/c56292140.lua +++ b/official/c56292140.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) c:RegisterEffect(e2) diff --git a/official/c56337500.lua b/official/c56337500.lua index e79d9e2eed..911b0af04b 100644 --- a/official/c56337500.lua +++ b/official/c56337500.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.cost)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -94,4 +94,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end \ No newline at end of file +end diff --git a/official/c56410769.lua b/official/c56410769.lua index 9878c68f66..40cad7625a 100644 --- a/official/c56410769.lua +++ b/official/c56410769.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1,1)) + e1:SetCost(Cost.DetachFromSelf(1,1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) @@ -52,4 +52,4 @@ function s.poscon(pos) local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0) return #g==g:FilterCount(Card.IsPosition,nil,pos) end -end \ No newline at end of file +end diff --git a/official/c56638325.lua b/official/c56638325.lua index 934f82a426..bd0a53cfcf 100644 --- a/official/c56638325.lua +++ b/official/c56638325.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c56832966.lua b/official/c56832966.lua index 5091ffd3b3..2921d5528f 100644 --- a/official/c56832966.lua +++ b/official/c56832966.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) - e2:SetCost(Cost.AND(Cost.Detach(2),Cost.SoftOncePerBattle)) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(2),Cost.SoftOncePerBattle)) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end @@ -58,4 +58,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c56840427.lua b/official/c56840427.lua index 9f29958667..09b53b848c 100644 --- a/official/c56840427.lua +++ b/official/c56840427.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp) return Duel.GetLP(tp)<=1000 end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -46,4 +46,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(-1000) sc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c56910167.lua b/official/c56910167.lua index ffb6382c7f..2fbb32e56b 100644 --- a/official/c56910167.lua +++ b/official/c56910167.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c57031794.lua b/official/c57031794.lua index 4dcc2515b7..b3f217d64a 100644 --- a/official/c57031794.lua +++ b/official/c57031794.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e2:SetCondition(aux.NOT(s.quickeffcond)) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c57043117.lua b/official/c57043117.lua index b64f9c2039..6b0bc9b54b 100644 --- a/official/c57043117.lua +++ b/official/c57043117.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1) e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.operation) c:RegisterEffect(e2) end diff --git a/official/c57314798.lua b/official/c57314798.lua index 3e1de1cc15..295c6fd9e9 100644 --- a/official/c57314798.lua +++ b/official/c57314798.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c57450198.lua b/official/c57450198.lua index dcdb1e805d..3aa7560574 100644 --- a/official/c57450198.lua +++ b/official/c57450198.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e2:SetCondition(aux.NOT(s.quickeffcond)) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c57566760.lua b/official/c57566760.lua index 1b805a31f9..4791fc2435 100644 --- a/official/c57566760.lua +++ b/official/c57566760.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_DAMAGE_STEP_END) e4:SetCondition(s.atcon) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetOperation(s.atop) c:RegisterEffect(e4) end diff --git a/official/c57707471.lua b/official/c57707471.lua index 2cd4879271..c54a44a8ed 100644 --- a/official/c57707471.lua +++ b/official/c57707471.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c58058134.lua b/official/c58058134.lua index b835f7143b..5a9a1a01d8 100644 --- a/official/c58058134.lua +++ b/official/c58058134.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.negcon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) diff --git a/official/c58069384.lua b/official/c58069384.lua index 7c50da1ec5..8650d1408f 100644 --- a/official/c58069384.lua +++ b/official/c58069384.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c581014.lua b/official/c581014.lua index b41729ffc5..e959210d0a 100644 --- a/official/c581014.lua +++ b/official/c581014.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c58504745.lua b/official/c58504745.lua index 6527581e77..a6a9959a2c 100644 --- a/official/c58504745.lua +++ b/official/c58504745.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c58600555.lua b/official/c58600555.lua index b389794bbd..1403635c0a 100644 --- a/official/c58600555.lua +++ b/official/c58600555.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c58712976.lua b/official/c58712976.lua index cf0c1c623c..b9fb9996cf 100644 --- a/official/c58712976.lua +++ b/official/c58712976.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --destroy diff --git a/official/c58720904.lua b/official/c58720904.lua index 84c7657348..1a3cc7dbcb 100644 --- a/official/c58720904.lua +++ b/official/c58720904.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c58820923.lua b/official/c58820923.lua index 6c4e5b170e..627439d2d3 100644 --- a/official/c58820923.lua +++ b/official/c58820923.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) diff --git a/official/c58858807.lua b/official/c58858807.lua index 454b7ed686..837d2eb708 100644 --- a/official/c58858807.lua +++ b/official/c58858807.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(s.applycost,Cost.Detach(1))) + e2:SetCost(Cost.AND(s.applycost,Cost.DetachFromSelf(1))) e2:SetTarget(s.applytg) e2:SetOperation(s.applyop) c:RegisterEffect(e2) @@ -125,4 +125,4 @@ function s.applyop(e,tp,eg,ep,ev,re,r,rp) end e:SetLabel(0) e:SetLabelObject(nil) -end \ No newline at end of file +end diff --git a/official/c58931850.lua b/official/c58931850.lua index 50b54590ad..fb52423905 100644 --- a/official/c58931850.lua +++ b/official/c58931850.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=25 end) - e4:SetCost(Cost.Detach(1,1)) + e4:SetCost(Cost.DetachFromSelf(1,1)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c59071624.lua b/official/c59071624.lua index 4682998c19..5952941eb2 100644 --- a/official/c59071624.lua +++ b/official/c59071624.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(2)) + e2:SetCost(Cost.DetachFromSelf(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_TO_GRAVE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetCondition(s.sscon) e3:SetTarget(s.sstg) e3:SetOperation(s.ssop) diff --git a/official/c5916510.lua b/official/c5916510.lua index 93d10e73db..60ff0779ce 100644 --- a/official/c5916510.lua +++ b/official/c5916510.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c59170782.lua b/official/c59170782.lua index ffc3297131..a0595b5869 100644 --- a/official/c59170782.lua +++ b/official/c59170782.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.tgcon1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.tgop1) c:RegisterEffect(e1) --Change battle target @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.tgcon2) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.tgop2) c:RegisterEffect(e2) --Special Summon diff --git a/official/c59208943.lua b/official/c59208943.lua index 4e7576b3db..b8fad2bf9a 100644 --- a/official/c59208943.lua +++ b/official/c59208943.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c59242457.lua b/official/c59242457.lua index 73f633e395..fcea49e857 100644 --- a/official/c59242457.lua +++ b/official/c59242457.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) diff --git a/official/c59627393.lua b/official/c59627393.lua index 3e1ad17f44..606cc67817 100644 --- a/official/c59627393.lua +++ b/official/c59627393.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_ATTACK|TIMING_BATTLE_PHASE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e1:SetCondition(s.discon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.disop) c:RegisterEffect(e1) end @@ -47,4 +47,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) bc1:RegisterEffect(e2,true) end -end \ No newline at end of file +end diff --git a/official/c60195675.lua b/official/c60195675.lua index 9a61f8fd11..b3e894b15b 100644 --- a/official/c60195675.lua +++ b/official/c60195675.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetOperation(s.atkop) c:RegisterEffect(e2) --Special Summon this card from the GY in Defense Position diff --git a/official/c60517697.lua b/official/c60517697.lua index aa1ad13f02..f78a70473e 100644 --- a/official/c60517697.lua +++ b/official/c60517697.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(2),s.rthcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(2),s.rthcost)) e1:SetTarget(s.rthtg) e1:SetOperation(s.rthop) c:RegisterEffect(e1) @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g==3 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c60645181.lua b/official/c60645181.lua index 5b47e3740d..58705f789c 100644 --- a/official/c60645181.lua +++ b/official/c60645181.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/official/c60992364.lua b/official/c60992364.lua index c0cf8aaf88..b83881272a 100644 --- a/official/c60992364.lua +++ b/official/c60992364.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c613013.lua b/official/c613013.lua index 2b2c1882d7..3a01fd2b20 100644 --- a/official/c613013.lua +++ b/official/c613013.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSetCard(SET_SHARK_DRAKE) and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end) - e3:SetCost(Cost.Detach(2,2,nil)) + e3:SetCost(Cost.DetachFromSelf(2,2,nil)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) @@ -78,4 +78,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c61307542.lua b/official/c61307542.lua index 725ec1e193..c0c38fe41e 100644 --- a/official/c61307542.lua +++ b/official/c61307542.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCondition(s.descon) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c61344030.lua b/official/c61344030.lua index 715ad446d5..a93d79844f 100644 --- a/official/c61344030.lua +++ b/official/c61344030.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c61374414.lua b/official/c61374414.lua index 92a30d9ae8..994983918c 100644 --- a/official/c61374414.lua +++ b/official/c61374414.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c61399402.lua b/official/c61399402.lua index 8320a29688..6a371945e9 100644 --- a/official/c61399402.lua +++ b/official/c61399402.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c61641818.lua b/official/c61641818.lua index 9922a4b2c2..ad11e55296 100644 --- a/official/c61641818.lua +++ b/official/c61641818.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(2)) + e2:SetCost(Cost.DetachFromSelf(2)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c6165656.lua b/official/c6165656.lua index a7bed17a32..ce219c6884 100644 --- a/official/c6165656.lua +++ b/official/c6165656.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c62070231.lua b/official/c62070231.lua index 398b03e5dc..947033cb6e 100644 --- a/official/c62070231.lua +++ b/official/c62070231.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c6247535.lua b/official/c6247535.lua index f6c53ac599..973d23f2fb 100644 --- a/official/c6247535.lua +++ b/official/c6247535.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c62517849.lua b/official/c62517849.lua index 64b0a69600..0a578f11c3 100644 --- a/official/c62517849.lua +++ b/official/c62517849.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) @@ -81,4 +81,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(sc:GetTextAttack()*2) e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) -end \ No newline at end of file +end diff --git a/official/c62541668.lua b/official/c62541668.lua index bafca0c3ba..4e74cff50d 100644 --- a/official/c62541668.lua +++ b/official/c62541668.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) diff --git a/official/c62709239.lua b/official/c62709239.lua index 6c8544b24b..16704f5a44 100644 --- a/official/c62709239.lua +++ b/official/c62709239.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c6284176.lua b/official/c6284176.lua index e8cdf5cdb2..4171fc06da 100644 --- a/official/c6284176.lua +++ b/official/c6284176.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c62967433.lua b/official/c62967433.lua index 8e1881e5c6..476976c8c2 100644 --- a/official/c62967433.lua +++ b/official/c62967433.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) diff --git a/official/c63746411.lua b/official/c63746411.lua index 053bea8eb5..ffd150527d 100644 --- a/official/c63746411.lua +++ b/official/c63746411.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c63767246.lua b/official/c63767246.lua index d0bbb9049a..6bcb4c6126 100644 --- a/official/c63767246.lua +++ b/official/c63767246.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()~=e:GetHandler() end) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetOperation(s.chngtgop) c:RegisterEffect(e2) --Make 1 of your Xyz monsters gain ATK diff --git a/official/c6387204.lua b/official/c6387204.lua index b74a168af6..605741589c 100644 --- a/official/c6387204.lua +++ b/official/c6387204.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(e,tp) return Duel.GetLP(1-tp)~=100 and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,9161357) end) - e2:SetCost(Cost.AND(Cost.Detach(3),s.lpcost)) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(3),s.lpcost)) e2:SetOperation(s.lpop) c:RegisterEffect(e2) end diff --git a/official/c64182380.lua b/official/c64182380.lua index 3dcc6eeff0..caf684877c 100644 --- a/official/c64182380.lua +++ b/official/c64182380.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.stdestg) e2:SetOperation(s.stdesop) c:RegisterEffect(e2) @@ -101,4 +101,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c64245689.lua b/official/c64245689.lua index 20a6f342b7..99490ae61a 100644 --- a/official/c64245689.lua +++ b/official/c64245689.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c64276752.lua b/official/c64276752.lua index 9cfb19eff7..7321b46b9c 100644 --- a/official/c64276752.lua +++ b/official/c64276752.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1,id) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c64332231.lua b/official/c64332231.lua index 7f63e67a60..574a17c472 100644 --- a/official/c64332231.lua +++ b/official/c64332231.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c64414267.lua b/official/c64414267.lua index 67c913f180..9adab994b1 100644 --- a/official/c64414267.lua +++ b/official/c64414267.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e2:SetCondition(aux.NOT(s.quickcon)) - e2:SetCost(Cost.AND(Cost.Detach(1),Cost.Discard())) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.Discard())) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c64554883.lua b/official/c64554883.lua index 8488ecf325..aaabb96372 100644 --- a/official/c64554883.lua +++ b/official/c64554883.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c64689404.lua b/official/c64689404.lua index 8f8d620070..ac61de8d28 100644 --- a/official/c64689404.lua +++ b/official/c64689404.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.ractg) e1:SetOperation(s.racop) c:RegisterEffect(e1) diff --git a/official/c6511113.lua b/official/c6511113.lua index 7c7ab65836..d12b316646 100644 --- a/official/c6511113.lua +++ b/official/c6511113.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCountLimit(1) e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_MSET|TIMINGS_CHECK_MONSTER_E) - e3:SetCost(Cost.AND(Cost.Detach(1),s.effcost)) + e3:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.effcost)) e3:SetTarget(s.efftg) e3:SetOperation(s.effop) c:RegisterEffect(e3) diff --git a/official/c65301952.lua b/official/c65301952.lua index 42078326d3..bb30168ba3 100644 --- a/official/c65301952.lua +++ b/official/c65301952.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetCost(Cost.AND(Cost.Detach(1),s.setcost)) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.setcost)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) @@ -44,4 +44,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end \ No newline at end of file +end diff --git a/official/c65676461.lua b/official/c65676461.lua index 36e304b8c0..bbf8abfb5c 100644 --- a/official/c65676461.lua +++ b/official/c65676461.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.atcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) diff --git a/official/c65884091.lua b/official/c65884091.lua index 4159a73d51..4d26f1af0d 100644 --- a/official/c65884091.lua +++ b/official/c65884091.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) diff --git a/official/c65892585.lua b/official/c65892585.lua index ca53aded6b..990780ff88 100644 --- a/official/c65892585.lua +++ b/official/c65892585.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c66011101.lua b/official/c66011101.lua index ad7c14c31b..7f33619144 100644 --- a/official/c66011101.lua +++ b/official/c66011101.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c66506689.lua b/official/c66506689.lua index e1fde6c1f7..b05ba2a152 100644 --- a/official/c66506689.lua +++ b/official/c66506689.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) diff --git a/official/c66523544.lua b/official/c66523544.lua index 07c8a2363d..bf9a22ecc3 100644 --- a/official/c66523544.lua +++ b/official/c66523544.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c66547759.lua b/official/c66547759.lua index 82f7558c38..c41917f59d 100644 --- a/official/c66547759.lua +++ b/official/c66547759.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.discon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) diff --git a/official/c6659193.lua b/official/c6659193.lua index 53d9bb951c..d7cacb8bab 100644 --- a/official/c6659193.lua +++ b/official/c6659193.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.atkcon) - e4:SetCost(Cost.Detach(1,1,nil)) + e4:SetCost(Cost.DetachFromSelf(1,1,nil)) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end diff --git a/official/c66970002.lua b/official/c66970002.lua index ff0ec7f6d0..2137ff94c0 100644 --- a/official/c66970002.lua +++ b/official/c66970002.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.descon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c67173574.lua b/official/c67173574.lua index fb0ad0c4ab..a3e0750d36 100644 --- a/official/c67173574.lua +++ b/official/c67173574.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCondition(s.condition) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c67865534.lua b/official/c67865534.lua index ead2978e18..796a05ec80 100644 --- a/official/c67865534.lua +++ b/official/c67865534.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -98,4 +98,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then Duel.Overlay(c,tc) end -end \ No newline at end of file +end diff --git a/official/c68300121.lua b/official/c68300121.lua index df6821b48c..e51979b78b 100644 --- a/official/c68300121.lua +++ b/official/c68300121.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) e2:SetCondition(s.gycon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.gytg) e2:SetOperation(s.gyop) c:RegisterEffect(e2) diff --git a/official/c68396121.lua b/official/c68396121.lua index a4acb7d16f..7aae844570 100644 --- a/official/c68396121.lua +++ b/official/c68396121.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.negop) c:RegisterEffect(e1) --atk diff --git a/official/c68597372.lua b/official/c68597372.lua index ae742ed35e..0cddcfd906 100644 --- a/official/c68597372.lua +++ b/official/c68597372.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c68618157.lua b/official/c68618157.lua index 2fe069ee16..0b1a5e9e3c 100644 --- a/official/c68618157.lua +++ b/official/c68618157.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.thcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c68679595.lua b/official/c68679595.lua index 7d1dd4f6e4..789b5fc623 100644 --- a/official/c68679595.lua +++ b/official/c68679595.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c68836428.lua b/official/c68836428.lua index c765fedf6f..d277eed5c7 100644 --- a/official/c68836428.lua +++ b/official/c68836428.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(aux.StatChangeDamageStepCondition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c69058960.lua b/official/c69058960.lua index f3041f1c26..49ed55b0d9 100644 --- a/official/c69058960.lua +++ b/official/c69058960.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c69069911.lua b/official/c69069911.lua index 3322720c36..1013efeb29 100644 --- a/official/c69069911.lua +++ b/official/c69069911.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCountLimit(1) e1:SetCondition(s.atcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.atop) c:RegisterEffect(e1) end diff --git a/official/c69170557.lua b/official/c69170557.lua index ddf2e2778a..943049316f 100644 --- a/official/c69170557.lua +++ b/official/c69170557.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) c:RegisterEffect(e2) diff --git a/official/c69610924.lua b/official/c69610924.lua index f660863ff3..0e8c268dc6 100644 --- a/official/c69610924.lua +++ b/official/c69610924.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --cannot direct attack diff --git a/official/c69655484.lua b/official/c69655484.lua index ef1890e063..1c63f678b2 100644 --- a/official/c69655484.lua +++ b/official/c69655484.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BECOME_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp,eg) return eg:IsContains(e:GetHandler()) end) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.edsptg) e1:SetOperation(s.edspop) c:RegisterEffect(e1) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.AND(Cost.Detach(1),s.thcost)) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.thcost)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -97,4 +97,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c69757518.lua b/official/c69757518.lua index b863feffe8..4628287a86 100644 --- a/official/c69757518.lua +++ b/official/c69757518.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetCondition(s.atcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.atop) --Place 1 card from the GY on the top of the Deck, and if you do, attach another to this card as material c:RegisterEffect(e2) diff --git a/official/c6983839.lua b/official/c6983839.lua index 0bd87176ea..161f0fc78f 100644 --- a/official/c6983839.lua +++ b/official/c6983839.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c69840739.lua b/official/c69840739.lua index 0a72dcb706..13270b39de 100644 --- a/official/c69840739.lua +++ b/official/c69840739.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c698785.lua b/official/c698785.lua index 22bf9daa3c..fc33e4fe91 100644 --- a/official/c698785.lua +++ b/official/c698785.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c7020743.lua b/official/c7020743.lua index 2c3bdcaf1e..70a5ff58c1 100644 --- a/official/c7020743.lua +++ b/official/c7020743.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e6:SetRange(LOCATION_MZONE) e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e6:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>=8 end) - e6:SetCost(Cost.Detach(4,4,nil)) + e6:SetCost(Cost.DetachFromSelf(4,4,nil)) e6:SetTarget(s.destg) e6:SetOperation(s.desop) c:RegisterEffect(e6) diff --git a/official/c70597485.lua b/official/c70597485.lua index 18db65bd78..13977812be 100644 --- a/official/c70597485.lua +++ b/official/c70597485.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.xyztg) e3:SetOperation(s.xyzop) c:RegisterEffect(e3) diff --git a/official/c70636044.lua b/official/c70636044.lua index b43f69179b..c7981e7b81 100644 --- a/official/c70636044.lua +++ b/official/c70636044.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.negcon) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) diff --git a/official/c71068247.lua b/official/c71068247.lua index c7e4e72f73..ed01ebb957 100644 --- a/official/c71068247.lua +++ b/official/c71068247.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c71166481.lua b/official/c71166481.lua index a720138752..7da92a3da1 100644 --- a/official/c71166481.lua +++ b/official/c71166481.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.chcon) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.chtg) e1:SetOperation(s.chop) c:RegisterEffect(e1) @@ -61,4 +61,4 @@ function s.xop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end \ No newline at end of file +end diff --git a/official/c71222868.lua b/official/c71222868.lua index f08ca7c501..e95327bbc2 100644 --- a/official/c71222868.lua +++ b/official/c71222868.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(3,3,nil)) + e3:SetCost(Cost.DetachFromSelf(3,3,nil)) e3:SetTarget(s.copytg) e3:SetOperation(s.copyop) c:RegisterEffect(e3) @@ -80,4 +80,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) local code=tc:GetOriginalCodeRule() c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end \ No newline at end of file +end diff --git a/official/c71612253.lua b/official/c71612253.lua index 85d63c3e7c..3103078d72 100644 --- a/official/c71612253.lua +++ b/official/c71612253.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c7194917.lua b/official/c7194917.lua index ee89c885ea..d132478890 100644 --- a/official/c7194917.lua +++ b/official/c7194917.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.adop) c:RegisterEffect(e1) --pos diff --git a/official/c72409226.lua b/official/c72409226.lua index d06b597852..cf76abdb5b 100644 --- a/official/c72409226.lua +++ b/official/c72409226.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.deckspthtg) e1:SetOperation(s.deckspthop) c:RegisterEffect(e1) diff --git a/official/c72971064.lua b/official/c72971064.lua index 7644992668..a6c22cfa98 100644 --- a/official/c72971064.lua +++ b/official/c72971064.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.retopthcon) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.retopthtg) e2:SetOperation(s.retopthop) c:RegisterEffect(e2) diff --git a/official/c73082255.lua b/official/c73082255.lua index 08ac8075c3..7010f7b16f 100644 --- a/official/c73082255.lua +++ b/official/c73082255.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.gytg) e3:SetOperation(s.gyop) c:RegisterEffect(e3) diff --git a/official/c73289035.lua b/official/c73289035.lua index 96f5b217cd..b250239130 100644 --- a/official/c73289035.lua +++ b/official/c73289035.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c73347079.lua b/official/c73347079.lua index 509913f7a2..5dd3b1292a 100644 --- a/official/c73347079.lua +++ b/official/c73347079.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c73445448.lua b/official/c73445448.lua index 8603d878c4..84b64cdda6 100644 --- a/official/c73445448.lua +++ b/official/c73445448.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(Cost.AND(Cost.Detach(1),s.discost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.discost)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -45,4 +45,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) --Negate that targeted card's effects, until the end of this turn tc:NegateEffects(c,RESET_PHASE|PHASE_END,true) end -end \ No newline at end of file +end diff --git a/official/c73659078.lua b/official/c73659078.lua index 8ad13394d7..bcda1f5d79 100644 --- a/official/c73659078.lua +++ b/official/c73659078.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.countertg) e1:SetOperation(s.counterop) c:RegisterEffect(e1) diff --git a/official/c73887236.lua b/official/c73887236.lua index 51cd95d9bc..131c61505e 100644 --- a/official/c73887236.lua +++ b/official/c73887236.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c73964868.lua b/official/c73964868.lua index e4a6c07e1d..fa2caf63a1 100644 --- a/official/c73964868.lua +++ b/official/c73964868.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c74294676.lua b/official/c74294676.lua index fbc107abef..831ca58179 100644 --- a/official/c74294676.lua +++ b/official/c74294676.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition1) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) c:RegisterEffect(e1) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_SUMMON) e2:SetCondition(s.condition2) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) c:RegisterEffect(e2) diff --git a/official/c74371660.lua b/official/c74371660.lua index ed204b91e3..6ae484bdfb 100644 --- a/official/c74371660.lua +++ b/official/c74371660.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c74416224.lua b/official/c74416224.lua index b5fbf9531f..dd2ff877fb 100644 --- a/official/c74416224.lua +++ b/official/c74416224.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c74593218.lua b/official/c74593218.lua index d924c4a6d6..c639f63ae2 100644 --- a/official/c74593218.lua +++ b/official/c74593218.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.negcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) diff --git a/official/c74689476.lua b/official/c74689476.lua index 2bb6e3805a..21cddab227 100644 --- a/official/c74689476.lua +++ b/official/c74689476.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -76,4 +76,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then tc:NegateEffects(e:GetHandler(),RESETS_STANDARD_PHASE_END) end -end \ No newline at end of file +end diff --git a/official/c75083197.lua b/official/c75083197.lua index 34a5bba8b7..547e8bf94d 100644 --- a/official/c75083197.lua +++ b/official/c75083197.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c75253697.lua b/official/c75253697.lua index 33dbb90a24..1d36c9c0a3 100644 --- a/official/c75253697.lua +++ b/official/c75253697.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c75367227.lua b/official/c75367227.lua index cd9ea59756..c77c5f68ca 100644 --- a/official/c75367227.lua +++ b/official/c75367227.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c75402014.lua b/official/c75402014.lua index dc886e4591..67d8c86ccb 100644 --- a/official/c75402014.lua +++ b/official/c75402014.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c75433814.lua b/official/c75433814.lua index 1be391620e..f5d47fa333 100644 --- a/official/c75433814.lua +++ b/official/c75433814.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) diff --git a/official/c75574498.lua b/official/c75574498.lua index c892cfddfb..955cf04a79 100644 --- a/official/c75574498.lua +++ b/official/c75574498.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_TO_GRAVE) e4:SetCondition(s.spcon2) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) c:RegisterEffect(e4) diff --git a/official/c75620895.lua b/official/c75620895.lua index 6c96dcd85f..055649c79d 100644 --- a/official/c75620895.lua +++ b/official/c75620895.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c75797046.lua b/official/c75797046.lua index 15d1cd64d5..083f040604 100644 --- a/official/c75797046.lua +++ b/official/c75797046.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) c:RegisterEffect(e1) diff --git a/official/c75840616.lua b/official/c75840616.lua index d70bd5f0a0..cf72f14f68 100644 --- a/official/c75840616.lua +++ b/official/c75840616.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c7593748.lua b/official/c7593748.lua index 8c040f0f82..3d7195dc8b 100644 --- a/official/c7593748.lua +++ b/official/c7593748.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) diff --git a/official/c76067258.lua b/official/c76067258.lua index 53b58eaf41..3c9c2012db 100644 --- a/official/c76067258.lua +++ b/official/c76067258.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c7628844.lua b/official/c7628844.lua index 1da1501404..5760841049 100644 --- a/official/c7628844.lua +++ b/official/c7628844.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) diff --git a/official/c76290637.lua b/official/c76290637.lua index bfe1f65d2d..db908ce331 100644 --- a/official/c76290637.lua +++ b/official/c76290637.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c76372778.lua b/official/c76372778.lua index 0a5fe7caed..4826cc2612 100644 --- a/official/c76372778.lua +++ b/official/c76372778.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLED) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/official/c76419637.lua b/official/c76419637.lua index 1e638e2498..99dfa931e1 100644 --- a/official/c76419637.lua +++ b/official/c76419637.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.damcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) diff --git a/official/c76589815.lua b/official/c76589815.lua index 4b70d4cc03..db3a4e640a 100644 --- a/official/c76589815.lua +++ b/official/c76589815.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.cfcon) - e3:SetCost(Cost.Detach(2)) + e3:SetCost(Cost.DetachFromSelf(2)) e3:SetTarget(s.cftg) e3:SetOperation(s.cfop) c:RegisterEffect(e3) diff --git a/official/c770365.lua b/official/c770365.lua index c3446ad9f9..ce8044926c 100644 --- a/official/c770365.lua +++ b/official/c770365.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c77205367.lua b/official/c77205367.lua index 8606ca2ca0..451cae28ee 100644 --- a/official/c77205367.lua +++ b/official/c77205367.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) diff --git a/official/c77334267.lua b/official/c77334267.lua index e3a0755822..df0f7aa9e1 100644 --- a/official/c77334267.lua +++ b/official/c77334267.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -32,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local dg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(dg,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/official/c77571454.lua b/official/c77571454.lua index a66d0cd89c..d735391495 100644 --- a/official/c77571454.lua +++ b/official/c77571454.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.namechangetg) e3:SetOperation(s.namechangeop) c:RegisterEffect(e3) diff --git a/official/c77799846.lua b/official/c77799846.lua index 2975224464..29e887597a 100644 --- a/official/c77799846.lua +++ b/official/c77799846.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --special summon diff --git a/official/c77894049.lua b/official/c77894049.lua index 714abbcf78..d821480a27 100644 --- a/official/c77894049.lua +++ b/official/c77894049.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.attrcon(ATTRIBUTE_EARTH)) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -77,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c78135071.lua b/official/c78135071.lua index 6154ed14be..a1278ff770 100644 --- a/official/c78135071.lua +++ b/official/c78135071.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c78144171.lua b/official/c78144171.lua index 7bb23c31a0..da56871e00 100644 --- a/official/c78144171.lua +++ b/official/c78144171.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c78625448.lua b/official/c78625448.lua index 99b96894f0..2c63b49d2f 100644 --- a/official/c78625448.lua +++ b/official/c78625448.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c78872731.lua b/official/c78872731.lua index 140decc29e..7883d5aa80 100644 --- a/official/c78872731.lua +++ b/official/c78872731.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetCondition(s.spcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -58,4 +58,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c78876707.lua b/official/c78876707.lua index 60df72c151..e0f3b4d720 100644 --- a/official/c78876707.lua +++ b/official/c78876707.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,s.thcostmax,function(e,og) e:SetLabel(#og) end)) + e1:SetCost(Cost.DetachFromSelf(1,s.thcostmax,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c79559912.lua b/official/c79559912.lua index 95b92cde60..0b052b8da0 100644 --- a/official/c79559912.lua +++ b/official/c79559912.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.negcon) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) diff --git a/official/c79625003.lua b/official/c79625003.lua index 67b2387c35..a3763d0c51 100644 --- a/official/c79625003.lua +++ b/official/c79625003.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1)) + e1:SetCost(Cost.DetachFromSelf(1,1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) diff --git a/official/c80117527.lua b/official/c80117527.lua index a2d557ead7..23026ee819 100644 --- a/official/c80117527.lua +++ b/official/c80117527.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(1),s.ctrlcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.ctrlcost)) e1:SetTarget(s.ctrltg) e1:SetOperation(s.ctrlop) c:RegisterEffect(e1) @@ -43,4 +43,4 @@ function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end \ No newline at end of file +end diff --git a/official/c80764541.lua b/official/c80764541.lua index a2fe077231..52cc91b92a 100644 --- a/official/c80764541.lua +++ b/official/c80764541.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c80796456.lua b/official/c80796456.lua index b07e8bfcc7..a93672dc4b 100644 --- a/official/c80796456.lua +++ b/official/c80796456.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) diff --git a/official/c80993256.lua b/official/c80993256.lua index 11fd217fc3..7dfd85a9d8 100644 --- a/official/c80993256.lua +++ b/official/c80993256.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) e3:SetCondition(s.negcond) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) c:RegisterEffect(e3) diff --git a/official/c81096431.lua b/official/c81096431.lua index 085cd5bbca..d3ac25714c 100644 --- a/official/c81096431.lua +++ b/official/c81096431.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCondition(function(e) return e:GetHandler():IsSetCard(SET_SHARK_DRAKE) end) - e3:SetCost(Cost.Detach(2,2,nil)) + e3:SetCost(Cost.DetachFromSelf(2,2,nil)) e3:SetTarget(s.attachtg) e3:SetOperation(s.attachop) c:RegisterEffect(e3) diff --git a/official/c81122844.lua b/official/c81122844.lua index 0bae9ce3d6..cdfc05a9d6 100644 --- a/official/c81122844.lua +++ b/official/c81122844.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_TO_GRAVE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.thcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c8165596.lua b/official/c8165596.lua index 20ac7fcbf7..d985115a53 100644 --- a/official/c8165596.lua +++ b/official/c8165596.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp,chk) return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end) - e2:SetCost(Cost.Detach(1,1,function(e,og) e:SetLabel(og:GetFirst():IsSetCard(SET_GALAXY) and 1 or 0) end)) + e2:SetCost(Cost.DetachFromSelf(1,1,function(e,og) e:SetLabel(og:GetFirst():IsSetCard(SET_GALAXY) and 1 or 0) end)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c81927732.lua b/official/c81927732.lua index 8cd9d236a5..e435d811cf 100644 --- a/official/c81927732.lua +++ b/official/c81927732.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --atk/def diff --git a/official/c82308875.lua b/official/c82308875.lua index 19fde79c32..1fedda548f 100644 --- a/official/c82308875.lua +++ b/official/c82308875.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_HANDES) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c82633039.lua b/official/c82633039.lua index eeaf10b152..bd8554aac1 100644 --- a/official/c82633039.lua +++ b/official/c82633039.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c82697249.lua b/official/c82697249.lua index 750bc0440c..cee90bce49 100644 --- a/official/c82697249.lua +++ b/official/c82697249.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c82944432.lua b/official/c82944432.lua index 6a8a35ce67..376f677ec6 100644 --- a/official/c82944432.lua +++ b/official/c82944432.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c83531441.lua b/official/c83531441.lua index 28f89fac09..b01d68f387 100644 --- a/official/c83531441.lua +++ b/official/c83531441.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(1),s.atkcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.atkcost)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --If this card attacks, it is changed to Defense Position at the end of the Battle Phase @@ -71,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c83827392.lua b/official/c83827392.lua index 820c22fd59..78cbb5725f 100644 --- a/official/c83827392.lua +++ b/official/c83827392.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.tdcon) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c84013237.lua b/official/c84013237.lua index f4d72a6843..4a4677d98c 100644 --- a/official/c84013237.lua +++ b/official/c84013237.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetOperation(function() Duel.NegateAttack() end) c:RegisterEffect(e1) --Self destroy diff --git a/official/c84025439.lua b/official/c84025439.lua index 77e80d7e98..8c39b1424c 100644 --- a/official/c84025439.lua +++ b/official/c84025439.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.tdcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) diff --git a/official/c84124261.lua b/official/c84124261.lua index c963f5067e..39ec3584cd 100644 --- a/official/c84124261.lua +++ b/official/c84124261.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c84224627.lua b/official/c84224627.lua index 82b0fa76dd..07bc83ce19 100644 --- a/official/c84224627.lua +++ b/official/c84224627.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) e2:SetCondition(aux.StatChangeDamageStepCondition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c84401683.lua b/official/c84401683.lua index e1dfb0a8c2..5357967560 100644 --- a/official/c84401683.lua +++ b/official/c84401683.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) diff --git a/official/c84417082.lua b/official/c84417082.lua index dc620a3eb2..c96eb81ff5 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -13,8 +13,8 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(Cost.Choice( - {Cost.Detach(3),aux.Stringid(id,1),s.desmonscheck}, - {Cost.Detach(5),aux.Stringid(id,2),s.desallcheck} + {Cost.DetachFromSelf(3),aux.Stringid(id,1),s.desmonscheck}, + {Cost.DetachFromSelf(5),aux.Stringid(id,2),s.desallcheck} )) e1:SetTarget(s.destg) e1:SetOperation(s.desop) diff --git a/official/c8491961.lua b/official/c8491961.lua index 578021fe27..d2f6f091d8 100644 --- a/official/c8491961.lua +++ b/official/c8491961.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c85004150.lua b/official/c85004150.lua index 99f5a89772..4db1b98d45 100644 --- a/official/c85004150.lua +++ b/official/c85004150.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c85115440.lua b/official/c85115440.lua index 992b60f1b6..04e9552fd5 100644 --- a/official/c85115440.lua +++ b/official/c85115440.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c85121942.lua b/official/c85121942.lua index 7bcefe4b00..82b5458fcf 100644 --- a/official/c85121942.lua +++ b/official/c85121942.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.descon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c85252081.lua b/official/c85252081.lua index 4c7f4ba505..dc3c6a1b42 100644 --- a/official/c85252081.lua +++ b/official/c85252081.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e2:SetCondition(aux.NOT(s.quickeffcond)) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c85692042.lua b/official/c85692042.lua index 15395299cb..13f4a0b4da 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e2:SetCost(Cost.Choice( - {Cost.Detach(2),aux.Stringid(id,2),s.thcheck(s.mmfilter)}, - {Cost.Detach(3),aux.Stringid(id,3),s.thcheck(s.l4filter)}, - {Cost.Detach(4),aux.Stringid(id,4),s.thcheck(s.stfilter)} + {Cost.DetachFromSelf(2),aux.Stringid(id,2),s.thcheck(s.mmfilter)}, + {Cost.DetachFromSelf(3),aux.Stringid(id,3),s.thcheck(s.l4filter)}, + {Cost.DetachFromSelf(4),aux.Stringid(id,4),s.thcheck(s.stfilter)} )) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) diff --git a/official/c85747929.lua b/official/c85747929.lua index 9a08d5cd38..61450f13c4 100644 --- a/official/c85747929.lua +++ b/official/c85747929.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c8617563.lua b/official/c8617563.lua index f4c13da07f..609dc1dfec 100644 --- a/official/c8617563.lua +++ b/official/c8617563.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsRace,1,nil,RACE_WINGEDBEAST) end) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c86221741.lua b/official/c86221741.lua index f547839850..f17dbb90fb 100644 --- a/official/c86221741.lua +++ b/official/c86221741.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetOperation(s.operation) c:RegisterEffect(e2) --Minus 1000 ATK for opp cards, optionally inflict damage diff --git a/official/c86238081.lua b/official/c86238081.lua index 618a9a0115..75549e9313 100644 --- a/official/c86238081.lua +++ b/official/c86238081.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(s.effcon) - e5:SetCost(Cost.Detach(1)) + e5:SetCost(Cost.DetachFromSelf(1)) e5:SetTarget(s.destg) e5:SetOperation(s.desop) c:RegisterEffect(e5) diff --git a/official/c86331741.lua b/official/c86331741.lua index a526d244fb..5178a412d1 100644 --- a/official/c86331741.lua +++ b/official/c86331741.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.ngcon) - e2:SetCost(Cost.Detach(2)) + e2:SetCost(Cost.DetachFromSelf(2)) e2:SetTarget(s.ngtg) e2:SetOperation(s.ngop) c:RegisterEffect(e2) diff --git a/official/c86532744.lua b/official/c86532744.lua index 7ff3ca8027..eddc5519be 100644 --- a/official/c86532744.lua +++ b/official/c86532744.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp) return Duel.GetLP(1-tp)>=Duel.GetLP(tp)+3000 end) - e1:SetCost(Cost.AND(Cost.Detach(3),Cost.PayLP(10,true))) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(3),Cost.PayLP(10,true))) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -44,4 +44,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,ct*300,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c8660395.lua b/official/c8660395.lua index fb1b0ac998..9e2cc70c70 100644 --- a/official/c8660395.lua +++ b/official/c8660395.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -74,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c86848580.lua b/official/c86848580.lua index 0c1aa61178..e2098d300e 100644 --- a/official/c86848580.lua +++ b/official/c86848580.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) diff --git a/official/c87327776.lua b/official/c87327776.lua index 1de8b23ef5..557d0fd47a 100644 --- a/official/c87327776.lua +++ b/official/c87327776.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c87676171.lua b/official/c87676171.lua index 4e633f536c..7a8cdcd983 100644 --- a/official/c87676171.lua +++ b/official/c87676171.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_CRYSTAL_GOD_TISTINA) end) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetOperation(s.atkop) c:RegisterEffect(e2) --Special Summon 1 "Tistina" monster from the GY diff --git a/official/c87911394.lua b/official/c87911394.lua index 32daba6455..7bc0cefa1d 100644 --- a/official/c87911394.lua +++ b/official/c87911394.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCondition(s.atkcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c88021907.lua b/official/c88021907.lua index 9e6ec391ee..e7360ce5e7 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,id) e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e2:SetCost(Cost.Detach(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) + e2:SetCost(Cost.DetachFromSelf(1,s.effcostmax,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) c:RegisterEffect(e2) diff --git a/official/c88120966.lua b/official/c88120966.lua index 718d19a3d7..1e8eb24e65 100644 --- a/official/c88120966.lua +++ b/official/c88120966.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(2) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c88177324.lua b/official/c88177324.lua index 5819bcf6b2..0abbae9201 100644 --- a/official/c88177324.lua +++ b/official/c88177324.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.negcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) diff --git a/official/c88581108.lua b/official/c88581108.lua index e98fee6e70..17bce443dd 100644 --- a/official/c88581108.lua +++ b/official/c88581108.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) diff --git a/official/c88722973.lua b/official/c88722973.lua index d0192d8e8f..f931895fb2 100644 --- a/official/c88722973.lua +++ b/official/c88722973.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c88754763.lua b/official/c88754763.lua index 62ef332f53..4d8afaad72 100644 --- a/official/c88754763.lua +++ b/official/c88754763.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c88917691.lua b/official/c88917691.lua index 44b55ffc27..f617d6f065 100644 --- a/official/c88917691.lua +++ b/official/c88917691.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,{SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) end) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c88942504.lua b/official/c88942504.lua index 27bfa26134..b918281f36 100644 --- a/official/c88942504.lua +++ b/official/c88942504.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c89477759.lua b/official/c89477759.lua index 4775600421..0b6dc02b91 100644 --- a/official/c89477759.lua +++ b/official/c89477759.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c89516305.lua b/official/c89516305.lua index f693d03f2f..b6bbfad3ec 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetHintTiming(TIMING_DAMAGE_STEP|TIMING_SSET,TIMING_DAMAGE_STEP|TIMING_SSET|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c89642993.lua b/official/c89642993.lua index 65de697f5e..eec3176d85 100644 --- a/official/c89642993.lua +++ b/official/c89642993.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.eftg) e1:SetOperation(s.efop) c:RegisterEffect(e1) diff --git a/official/c90098780.lua b/official/c90098780.lua index e61ad2b3a8..a6f00568cf 100644 --- a/official/c90098780.lua +++ b/official/c90098780.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c90162951.lua b/official/c90162951.lua index de98910ce5..47f7a35df8 100644 --- a/official/c90162951.lua +++ b/official/c90162951.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1,1,nil)) + e4:SetCost(Cost.DetachFromSelf(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) diff --git a/official/c90303227.lua b/official/c90303227.lua index 9b37ac94b6..1a34470d8c 100644 --- a/official/c90303227.lua +++ b/official/c90303227.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) c:RegisterEffect(e2) @@ -54,4 +54,4 @@ end function s.rescon(sg,e,tp,mg) return sg:FilterCount(Card.IsLocation,nil,LOCATION_ONFIELD)<=1 and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 -end \ No newline at end of file +end diff --git a/official/c90448279.lua b/official/c90448279.lua index 91af0eea3b..ae9f7a6800 100644 --- a/official/c90448279.lua +++ b/official/c90448279.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - e1:SetCost(Cost.Detach(2,2,nil)) + e1:SetCost(Cost.DetachFromSelf(2,2,nil)) e1:SetTarget(s.gytg) e1:SetOperation(s.gyop) c:RegisterEffect(e1) @@ -84,4 +84,4 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/official/c90664857.lua b/official/c90664857.lua index 172ca85946..36a66d3c03 100644 --- a/official/c90664857.lua +++ b/official/c90664857.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.indtg) e1:SetOperation(s.indop) c:RegisterEffect(e1) diff --git a/official/c90726340.lua b/official/c90726340.lua index c9fbfcae2c..be3c5ad4d8 100644 --- a/official/c90726340.lua +++ b/official/c90726340.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c90809975.lua b/official/c90809975.lua index ca5d5a804b..f75085d468 100644 --- a/official/c90809975.lua +++ b/official/c90809975.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c91279700.lua b/official/c91279700.lua index 3316e53021..0b41faf6c5 100644 --- a/official/c91279700.lua +++ b/official/c91279700.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c91499077.lua b/official/c91499077.lua index 8398a832a2..c92af12592 100644 --- a/official/c91499077.lua +++ b/official/c91499077.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) diff --git a/official/c9161357.lua b/official/c9161357.lua index cffbfe4fd3..c56c65c4d1 100644 --- a/official/c9161357.lua +++ b/official/c9161357.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.AND(Cost.Detach(1),s.halvelpcost)) + e3:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.halvelpcost)) e3:SetOperation(function(e,tp) local opp=1-tp Duel.SetLP(opp,Duel.GetLP(opp)/2) end) c:RegisterEffect(e3) end @@ -79,4 +79,4 @@ function s.halvelpcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/official/c91895091.lua b/official/c91895091.lua index 9f57188177..a7b8c7f897 100644 --- a/official/c91895091.lua +++ b/official/c91895091.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c92661479.lua b/official/c92661479.lua index e13fc122bf..985b613209 100644 --- a/official/c92661479.lua +++ b/official/c92661479.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c9272381.lua b/official/c9272381.lua index c82ca739f2..a57bde5135 100644 --- a/official/c9272381.lua +++ b/official/c9272381.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e4:SetCondition(s.condition) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.target) e4:SetOperation(s.operation) c:RegisterEffect(e4) diff --git a/official/c92918648.lua b/official/c92918648.lua index c797f9ef8e..c97baed47e 100644 --- a/official/c92918648.lua +++ b/official/c92918648.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c93039339.lua b/official/c93039339.lua index 93ad6a1efe..4659d81b13 100644 --- a/official/c93039339.lua +++ b/official/c93039339.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c93568288.lua b/official/c93568288.lua index aca9914d3b..c810820cfa 100644 --- a/official/c93568288.lua +++ b/official/c93568288.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(2,id) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) diff --git a/official/c93713837.lua b/official/c93713837.lua index f5fa5dc37f..0f98a4c586 100644 --- a/official/c93713837.lua +++ b/official/c93713837.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) diff --git a/official/c93730230.lua b/official/c93730230.lua index 6b79c37db0..5efd2593bd 100644 --- a/official/c93730230.lua +++ b/official/c93730230.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/official/c94119480.lua b/official/c94119480.lua index 21e0c81dde..492faa2cd0 100644 --- a/official/c94119480.lua +++ b/official/c94119480.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c94151981.lua b/official/c94151981.lua index b3a80fe629..23c637a0df 100644 --- a/official/c94151981.lua +++ b/official/c94151981.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(2,2,nil)) + e2:SetCost(Cost.DetachFromSelf(2,2,nil)) e2:SetTarget(s.drwtg) e2:SetOperation(s.drwop) c:RegisterEffect(e2) diff --git a/official/c94380860.lua b/official/c94380860.lua index 9ea801efad..6698df34f9 100644 --- a/official/c94380860.lua +++ b/official/c94380860.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) diff --git a/official/c9453320.lua b/official/c9453320.lua index 2fb261aab7..86eddc1591 100644 --- a/official/c9453320.lua +++ b/official/c9453320.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(Cost.Detach(1,1,nil)) + e4:SetCost(Cost.DetachFromSelf(1,1,nil)) e4:SetTarget(s.settg) e4:SetOperation(s.setop) c:RegisterEffect(e4) diff --git a/official/c9486959.lua b/official/c9486959.lua index 9a461c7ffd..21d3d2c963 100644 --- a/official/c9486959.lua +++ b/official/c9486959.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,1}) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) diff --git a/official/c95113856.lua b/official/c95113856.lua index 70f5c27ea9..e431494853 100644 --- a/official/c95113856.lua +++ b/official/c95113856.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c95134948.lua b/official/c95134948.lua index da99324652..f5f0ebee09 100644 --- a/official/c95134948.lua +++ b/official/c95134948.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(Cost.AND(Cost.Detach(2),s.spcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(2),s.spcost)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -111,4 +111,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c95169481.lua b/official/c95169481.lua index 4b074e5f68..548146e401 100644 --- a/official/c95169481.lua +++ b/official/c95169481.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c95239444.lua b/official/c95239444.lua index 9b41737b0a..1d834f0166 100644 --- a/official/c95239444.lua +++ b/official/c95239444.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1,1,nil)) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c95243515.lua b/official/c95243515.lua index 00fba92d06..eb495753f1 100644 --- a/official/c95243515.lua +++ b/official/c95243515.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) diff --git a/official/c95442074.lua b/official/c95442074.lua index e5a9e22686..27feb2d4fc 100644 --- a/official/c95442074.lua +++ b/official/c95442074.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c95474755.lua b/official/c95474755.lua index 7b0b1bbd95..c8ccdd3553 100644 --- a/official/c95474755.lua +++ b/official/c95474755.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1,1,nil)) + e1:SetCost(Cost.DetachFromSelf(1,1,nil)) e1:SetTarget(s.extg) e1:SetOperation(s.exop) c:RegisterEffect(e1) diff --git a/official/c95685352.lua b/official/c95685352.lua index 8654fbb7a4..e209c94950 100644 --- a/official/c95685352.lua +++ b/official/c95685352.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) e2:SetCondition(aux.StatChangeDamageStepCondition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.atkop2) c:RegisterEffect(e2) diff --git a/official/c95992081.lua b/official/c95992081.lua index 038840eaf7..7959e763e5 100644 --- a/official/c95992081.lua +++ b/official/c95992081.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c96157835.lua b/official/c96157835.lua index 478bc09877..87c6844b67 100644 --- a/official/c96157835.lua +++ b/official/c96157835.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) diff --git a/official/c96381979.lua b/official/c96381979.lua index 494b7b5b6c..ebc38f0952 100644 --- a/official/c96381979.lua +++ b/official/c96381979.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -124,4 +124,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonComplete() end -end \ No newline at end of file +end diff --git a/official/c96471335.lua b/official/c96471335.lua index ffbe960a58..69dd683929 100644 --- a/official/c96471335.lua +++ b/official/c96471335.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c96592102.lua b/official/c96592102.lua index cbdfe97a0e..3d85f2dd97 100644 --- a/official/c96592102.lua +++ b/official/c96592102.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCondition(aux.bdocon) - e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) end,function(e,og) e:SetLabel(#og) end)) + e2:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -48,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c96864105.lua b/official/c96864105.lua index 6a2669fafb..b72bdfa9e7 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --This card cannot be destroyed by card effects @@ -38,4 +38,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) --Your battling monster gains ATK equal to the ATK of the opponent's monster it is battling, during that damage calculation only bc1:UpdateAttack(bc2:GetAttack(),RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,e:GetHandler()) end -end \ No newline at end of file +end diff --git a/official/c97170107.lua b/official/c97170107.lua index 8d62bc98c5..9c4a10a87d 100644 --- a/official/c97170107.lua +++ b/official/c97170107.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c97403510.lua b/official/c97403510.lua index acc2df16ee..5a52974ec1 100644 --- a/official/c97403510.lua +++ b/official/c97403510.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.rmcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3) diff --git a/official/c97453744.lua b/official/c97453744.lua index 9f75a0910b..f79a78dd12 100644 --- a/official/c97453744.lua +++ b/official/c97453744.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,2}) e3:SetCondition(s.atkcon) - e3:SetCost(Cost.Detach(1,1,nil)) + e3:SetCost(Cost.DetachFromSelf(1,1,nil)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) diff --git a/official/c97584719.lua b/official/c97584719.lua index e2a44e389c..facbb7e81c 100644 --- a/official/c97584719.lua +++ b/official/c97584719.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetMatchingGroupCount(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) end,function(e,og) e:SetLabel(#og) end)) + e2:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetMatchingGroupCount(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c99469936.lua b/official/c99469936.lua index 13523ca136..63a0144dc9 100644 --- a/official/c99469936.lua +++ b/official/c99469936.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) diff --git a/official/c99666430.lua b/official/c99666430.lua index 2d09ce4d0c..9f08e8d2a7 100644 --- a/official/c99666430.lua +++ b/official/c99666430.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.ctrltg) e1:SetOperation(s.ctrlop) c:RegisterEffect(e1) diff --git a/pre-release/c101302044.lua b/pre-release/c101302044.lua index 8643b097ff..e28d6cfd0a 100644 --- a/pre-release/c101302044.lua +++ b/pre-release/c101302044.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/pre-release/c101302045.lua b/pre-release/c101302045.lua index 5b0733aca0..c619825d69 100644 --- a/pre-release/c101302045.lua +++ b/pre-release/c101302045.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.discon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) @@ -84,4 +84,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() c:EquipByEffectAndLimitRegister(e,tp,ec) end -end \ No newline at end of file +end diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua index 8536d879a2..72d419b6e3 100644 --- a/pre-release/c101302106.lua +++ b/pre-release/c101302106.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/unofficial/c100000178.lua b/unofficial/c100000178.lua index e60ad62716..580be0497f 100644 --- a/unofficial/c100000178.lua +++ b/unofficial/c100000178.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/unofficial/c100000179.lua b/unofficial/c100000179.lua index c2cfb990e6..c97f406ba6 100644 --- a/unofficial/c100000179.lua +++ b/unofficial/c100000179.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/unofficial/c100000498.lua b/unofficial/c100000498.lua index 638f90ee09..b79a783996 100644 --- a/unofficial/c100000498.lua +++ b/unofficial/c100000498.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.negcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) diff --git a/unofficial/c100000549.lua b/unofficial/c100000549.lua index ae0132126b..024ed7e52c 100644 --- a/unofficial/c100000549.lua +++ b/unofficial/c100000549.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/unofficial/c111011803.lua b/unofficial/c111011803.lua index 695b54ab70..369851b2a3 100644 --- a/unofficial/c111011803.lua +++ b/unofficial/c111011803.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_DESTROY) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/unofficial/c111011903.lua b/unofficial/c111011903.lua index 07d7efcb90..78258585e7 100644 --- a/unofficial/c111011903.lua +++ b/unofficial/c111011903.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c111011904.lua b/unofficial/c111011904.lua index ab78cf1601..64b4561c4d 100644 --- a/unofficial/c111011904.lua +++ b/unofficial/c111011904.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMINGS_CHECK_MONSTER) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.actg) e2:SetOperation(s.acop) c:RegisterEffect(e2) diff --git a/unofficial/c111011905.lua b/unofficial/c111011905.lua index 10dad40532..9d9d65ca4d 100644 --- a/unofficial/c111011905.lua +++ b/unofficial/c111011905.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511000034.lua b/unofficial/c511000034.lua index c2ad485c63..d75f85a49b 100644 --- a/unofficial/c511000034.lua +++ b/unofficial/c511000034.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.operation) c:RegisterEffect(e2) end diff --git a/unofficial/c511000041.lua b/unofficial/c511000041.lua index 743b3f6337..dd15cc4de6 100644 --- a/unofficial/c511000041.lua +++ b/unofficial/c511000041.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.cacon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.catg) e2:SetOperation(s.caop) c:RegisterEffect(e2) diff --git a/unofficial/c511000183.lua b/unofficial/c511000183.lua index 8a770685d6..6dcea4ed7b 100644 --- a/unofficial/c511000183.lua +++ b/unofficial/c511000183.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_CHAINING) e3:SetCondition(s.negcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) c:RegisterEffect(e3) diff --git a/unofficial/c511000184.lua b/unofficial/c511000184.lua index ec1101a47a..a60d720e2e 100644 --- a/unofficial/c511000184.lua +++ b/unofficial/c511000184.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_START) e1:SetCondition(s.tbcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.tbop) c:RegisterEffect(e1) --battle indestructable diff --git a/unofficial/c511000192.lua b/unofficial/c511000192.lua index b9895d402e..d06814dacd 100644 --- a/unofficial/c511000192.lua +++ b/unofficial/c511000192.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetOperation(s.op2) c:RegisterEffect(e4) --Prevent Effect damage @@ -49,7 +49,7 @@ function s.initial_effect(c) e5:SetCode(EVENT_FREE_CHAIN) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) - e5:SetCost(Cost.Detach(1)) + e5:SetCost(Cost.DetachFromSelf(1)) e5:SetOperation(s.op3) c:RegisterEffect(e5) end diff --git a/unofficial/c511000230.lua b/unofficial/c511000230.lua index 50fdca17b9..f1775dcf3a 100644 --- a/unofficial/c511000230.lua +++ b/unofficial/c511000230.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLED) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511000231.lua b/unofficial/c511000231.lua index 2581ae73c3..8a438d5e49 100644 --- a/unofficial/c511000231.lua +++ b/unofficial/c511000231.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLED) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511000232.lua b/unofficial/c511000232.lua index e86efdd636..1a52b9265d 100644 --- a/unofficial/c511000232.lua +++ b/unofficial/c511000232.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLED) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511000233.lua b/unofficial/c511000233.lua index ab8fb3afb9..94da5a40ee 100644 --- a/unofficial/c511000233.lua +++ b/unofficial/c511000233.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLED) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511000277.lua b/unofficial/c511000277.lua index f7e1e41bc2..195bdac313 100644 --- a/unofficial/c511000277.lua +++ b/unofficial/c511000277.lua @@ -93,7 +93,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.damcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) e1:SetLabel(e:GetLabel()) diff --git a/unofficial/c511000294.lua b/unofficial/c511000294.lua index 55ea13b4aa..3282eb6fe3 100644 --- a/unofficial/c511000294.lua +++ b/unofficial/c511000294.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) diff --git a/unofficial/c511000296.lua b/unofficial/c511000296.lua index 2faa3d0e9c..5cef578757 100644 --- a/unofficial/c511000296.lua +++ b/unofficial/c511000296.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e7:SetCode(EVENT_BE_BATTLE_TARGET) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.nacon) - e7:SetCost(Cost.Detach(1)) + e7:SetCost(Cost.DetachFromSelf(1)) e7:SetTarget(s.natg) e7:SetOperation(s.naop) c:RegisterEffect(e7) diff --git a/unofficial/c511000369.lua b/unofficial/c511000369.lua index d86f693aeb..7026a583b9 100644 --- a/unofficial/c511000369.lua +++ b/unofficial/c511000369.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetCountLimit(1) e4:SetRange(LOCATION_MZONE) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetOperation(s.regop) c:RegisterEffect(e4) --Cannot be destroyed by battle diff --git a/unofficial/c511000512.lua b/unofficial/c511000512.lua index 6fdcda73e3..bef76672d6 100644 --- a/unofficial/c511000512.lua +++ b/unofficial/c511000512.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511000513.lua b/unofficial/c511000513.lua index 2c070450f2..53c08e5a44 100644 --- a/unofficial/c511000513.lua +++ b/unofficial/c511000513.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.desatchtg) e2:SetOperation(s.desatchop) c:RegisterEffect(e2) diff --git a/unofficial/c511000515.lua b/unofficial/c511000515.lua index 1c8a8f36e6..2fec8dee3c 100644 --- a/unofficial/c511000515.lua +++ b/unofficial/c511000515.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetCondition(s.atcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetOperation(s.atop) c:RegisterEffect(e3) --remove diff --git a/unofficial/c511000674.lua b/unofficial/c511000674.lua index 202df306b2..4150705208 100644 --- a/unofficial/c511000674.lua +++ b/unofficial/c511000674.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.target) e4:SetOperation(s.operation) c:RegisterEffect(e4) diff --git a/unofficial/c511000675.lua b/unofficial/c511000675.lua index 5a27bc578d..0ae3bb257f 100644 --- a/unofficial/c511000675.lua +++ b/unofficial/c511000675.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511001247.lua b/unofficial/c511001247.lua index 341a53db25..d215faf304 100644 --- a/unofficial/c511001247.lua +++ b/unofficial/c511001247.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/unofficial/c511001273.lua b/unofficial/c511001273.lua index da3a6c8803..38dcd0a9e0 100644 --- a/unofficial/c511001273.lua +++ b/unofficial/c511001273.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/unofficial/c511001275.lua b/unofficial/c511001275.lua index b66301381d..b44b5bad61 100644 --- a/unofficial/c511001275.lua +++ b/unofficial/c511001275.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.con) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetOperation(s.op) c:RegisterEffect(e3) --gain atk diff --git a/unofficial/c511001338.lua b/unofficial/c511001338.lua index e960dc77a1..d8b982ef1f 100644 --- a/unofficial/c511001338.lua +++ b/unofficial/c511001338.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/unofficial/c511001339.lua b/unofficial/c511001339.lua index ab0dc755a5..6df32f8530 100644 --- a/unofficial/c511001339.lua +++ b/unofficial/c511001339.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCost(Cost.Choice( - {Cost.Detach(1),aux.Stringid(id,1)}, + {Cost.DetachFromSelf(1),aux.Stringid(id,1)}, {s.cost,aux.Stringid(id,2)} )) e1:SetTarget(s.target) @@ -78,4 +78,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e) return e:GetHandler():GetCounter(0x1101)>0 -end \ No newline at end of file +end diff --git a/unofficial/c511001371.lua b/unofficial/c511001371.lua index 7f7c0e9aec..d6a31631e2 100644 --- a/unofficial/c511001371.lua +++ b/unofficial/c511001371.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.cttg) e3:SetOperation(s.ctop) --destroy diff --git a/unofficial/c511001372.lua b/unofficial/c511001372.lua index 394ae48ee9..8663cf9533 100644 --- a/unofficial/c511001372.lua +++ b/unofficial/c511001372.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) --win diff --git a/unofficial/c511001374.lua b/unofficial/c511001374.lua index 5749b901fd..48bcc3332f 100644 --- a/unofficial/c511001374.lua +++ b/unofficial/c511001374.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_BATTLE_PHASE,TIMING_BATTLE_PHASE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) c:RegisterEffect(e2) diff --git a/unofficial/c511001376.lua b/unofficial/c511001376.lua index 9cc598cc1a..ca02b1ed97 100644 --- a/unofficial/c511001376.lua +++ b/unofficial/c511001376.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e3) e4:SetCondition(s.retcon) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.rettg) e4:SetOperation(s.retop) c:RegisterEffect(e4) diff --git a/unofficial/c511001429.lua b/unofficial/c511001429.lua index 1630f90506..6dd4bd5493 100644 --- a/unofficial/c511001429.lua +++ b/unofficial/c511001429.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.tg) e2:SetOperation(s.op) --Make this card unable to be destroyed by that battle or effect and inflict damage to your opponent equal to this card's ATK @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e3:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e3:SetTarget(s.indestg) e3:SetOperation(s.indesop) local e4=e3:Clone() @@ -152,4 +152,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,c:GetAttack(),REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511001430.lua b/unofficial/c511001430.lua index 47a3940737..966e21b998 100644 --- a/unofficial/c511001430.lua +++ b/unofficial/c511001430.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCode(511001265) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.damcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) diff --git a/unofficial/c511001431.lua b/unofficial/c511001431.lua index 8c8b74b634..7ba9878600 100644 --- a/unofficial/c511001431.lua +++ b/unofficial/c511001431.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DISABLE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) local e4=Effect.CreateEffect(c) diff --git a/unofficial/c511001432.lua b/unofficial/c511001432.lua index 60467b1eb2..20508f8f8a 100644 --- a/unofficial/c511001432.lua +++ b/unofficial/c511001432.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/unofficial/c511001624.lua b/unofficial/c511001624.lua index e35d8f5f08..677b008a7f 100644 --- a/unofficial/c511001624.lua +++ b/unofficial/c511001624.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511001659.lua b/unofficial/c511001659.lua index 8333e211ac..1544f87f61 100644 --- a/unofficial/c511001659.lua +++ b/unofficial/c511001659.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) + e3:SetCost(Cost.DetachFromSelf(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) e3:SetTarget(s.damtg2) e3:SetOperation(s.damop2) c:RegisterEffect(e3) @@ -100,4 +100,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511001776.lua b/unofficial/c511001776.lua index a3070b14a2..0add3ccc20 100644 --- a/unofficial/c511001776.lua +++ b/unofficial/c511001776.lua @@ -60,7 +60,7 @@ function s.initial_effect(c) e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.discon) - e6:SetCost(Cost.Detach(1)) + e6:SetCost(Cost.DetachFromSelf(1)) e6:SetTarget(s.distg) e6:SetOperation(s.disop) c:RegisterEffect(e6) diff --git a/unofficial/c511001777.lua b/unofficial/c511001777.lua index bfc75e4f6d..21eecc347f 100644 --- a/unofficial/c511001777.lua +++ b/unofficial/c511001777.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(s.spcon) - e5:SetCost(Cost.Detach(1)) + e5:SetCost(Cost.DetachFromSelf(1)) e5:SetTarget(s.sptg) e5:SetOperation(s.spop) -- diff --git a/unofficial/c511001778.lua b/unofficial/c511001778.lua index 481264e0ad..57eeef7ab9 100644 --- a/unofficial/c511001778.lua +++ b/unofficial/c511001778.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end diff --git a/unofficial/c511001779.lua b/unofficial/c511001779.lua index f971fc288d..dfcaf263b9 100644 --- a/unofficial/c511001779.lua +++ b/unofficial/c511001779.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511001781.lua b/unofficial/c511001781.lua index 43a8bccdab..d839f332b9 100644 --- a/unofficial/c511001781.lua +++ b/unofficial/c511001781.lua @@ -58,7 +58,7 @@ function s.initial_effect(c) e5:SetDescription(aux.Stringid(id,3)) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_MZONE) - e5:SetCost(Cost.AND(Cost.Detach(3),s.lpcost)) + e5:SetCost(Cost.AND(Cost.DetachFromSelf(3),s.lpcost)) e5:SetTarget(s.lptg) e5:SetOperation(s.lpop) --spsummon @@ -205,4 +205,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) sc:CompleteProcedure() end -end \ No newline at end of file +end diff --git a/unofficial/c511001791.lua b/unofficial/c511001791.lua index d33ab37b22..1cf0be6a17 100644 --- a/unofficial/c511001791.lua +++ b/unofficial/c511001791.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(function(e) return Duel.IsAbleToEnterBP() and s[1-e:GetHandlerPlayer()]>0 end) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) c:RegisterEffect(e4) diff --git a/unofficial/c511001997.lua b/unofficial/c511001997.lua index d5fe7a21f4..9ac389d55a 100644 --- a/unofficial/c511001997.lua +++ b/unofficial/c511001997.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/unofficial/c511001998.lua b/unofficial/c511001998.lua index b2d211dcb8..5dec403aad 100644 --- a/unofficial/c511001998.lua +++ b/unofficial/c511001998.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetCondition(s.spcon) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) diff --git a/unofficial/c511001999.lua b/unofficial/c511001999.lua index 3477e3a837..0899bd6cf9 100644 --- a/unofficial/c511001999.lua +++ b/unofficial/c511001999.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/unofficial/c511002001.lua b/unofficial/c511002001.lua index 65013443ff..00c8be5dbe 100644 --- a/unofficial/c511002001.lua +++ b/unofficial/c511002001.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end),s.lpcost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end),s.lpcost)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) @@ -46,4 +46,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local sum=Duel.GetOperatedGroup():GetSum(Card.GetAttack) Duel.Damage(1-tp,sum,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002046.lua b/unofficial/c511002046.lua index 9527c67717..33f1e85d60 100644 --- a/unofficial/c511002046.lua +++ b/unofficial/c511002046.lua @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_FREE_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.atkop) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(tc) @@ -50,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(id) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) @@ -80,4 +80,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c511002054.lua b/unofficial/c511002054.lua index 3eca1ae67b..b8a6ddff39 100644 --- a/unofficial/c511002054.lua +++ b/unofficial/c511002054.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(10389142,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/unofficial/c511002058.lua b/unofficial/c511002058.lua index 241c39ddf5..7be6acf4b6 100644 --- a/unofficial/c511002058.lua +++ b/unofficial/c511002058.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(95100120,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) c:RegisterEffect(e1) diff --git a/unofficial/c511002059.lua b/unofficial/c511002059.lua index 3c89b08140..c147b2187e 100644 --- a/unofficial/c511002059.lua +++ b/unofficial/c511002059.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.AND(Cost.Detach(3),Cost.HintSelectedEffect)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(3),Cost.HintSelectedEffect)) e1:SetTarget(s.destg1) e1:SetOperation(s.desop1) c:RegisterEffect(e1) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.AND(Cost.Detach(5),Cost.HintSelectedEffect)) + e2:SetCost(Cost.AND(Cost.DetachFromSelf(5),Cost.HintSelectedEffect)) e2:SetTarget(s.destg2) e2:SetOperation(s.desop2) c:RegisterEffect(e2) @@ -53,4 +53,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511002060.lua b/unofficial/c511002060.lua index bf97a8b0f1..c5d6bc2af5 100644 --- a/unofficial/c511002060.lua +++ b/unofficial/c511002060.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002064.lua b/unofficial/c511002064.lua index 44bff4b09e..d3852a44d9 100644 --- a/unofficial/c511002064.lua +++ b/unofficial/c511002064.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002075.lua b/unofficial/c511002075.lua index 214169475e..0480a39134 100644 --- a/unofficial/c511002075.lua +++ b/unofficial/c511002075.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/unofficial/c511002076.lua b/unofficial/c511002076.lua index e4013ebc7e..7dcd997c21 100644 --- a/unofficial/c511002076.lua +++ b/unofficial/c511002076.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002077.lua b/unofficial/c511002077.lua index 7c51119660..7cce1b6458 100644 --- a/unofficial/c511002077.lua +++ b/unofficial/c511002077.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable diff --git a/unofficial/c511002079.lua b/unofficial/c511002079.lua index 913a986387..5aee5537c5 100644 --- a/unofficial/c511002079.lua +++ b/unofficial/c511002079.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) diff --git a/unofficial/c511002088.lua b/unofficial/c511002088.lua index fb7976884c..a25b4c34b5 100644 --- a/unofficial/c511002088.lua +++ b/unofficial/c511002088.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(29669359,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002090.lua b/unofficial/c511002090.lua index d66b06550a..6971415aff 100644 --- a/unofficial/c511002090.lua +++ b/unofficial/c511002090.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.lpop) c:RegisterEffect(e2) --lp - 0 materials diff --git a/unofficial/c511002091.lua b/unofficial/c511002091.lua index 91bca600f6..9c29c484b7 100644 --- a/unofficial/c511002091.lua +++ b/unofficial/c511002091.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.damcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/unofficial/c511002092.lua b/unofficial/c511002092.lua index ae2ee03f3c..192a477018 100644 --- a/unofficial/c511002092.lua +++ b/unofficial/c511002092.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --battle indestructable diff --git a/unofficial/c511002111.lua b/unofficial/c511002111.lua index d80c9de1b7..5c3bf350e6 100644 --- a/unofficial/c511002111.lua +++ b/unofficial/c511002111.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/unofficial/c511002112.lua b/unofficial/c511002112.lua index 9261d093c0..b1564c39d6 100644 --- a/unofficial/c511002112.lua +++ b/unofficial/c511002112.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002384.lua b/unofficial/c511002384.lua index 077309da99..004c7d8ee6 100644 --- a/unofficial/c511002384.lua +++ b/unofficial/c511002384.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -66,4 +66,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT+0x57a0000) tc:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/unofficial/c511002482.lua b/unofficial/c511002482.lua index d21a1c4d22..b0818894a6 100644 --- a/unofficial/c511002482.lua +++ b/unofficial/c511002482.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) local e3=Effect.CreateEffect(c) diff --git a/unofficial/c511002543.lua b/unofficial/c511002543.lua index 50b2dcc8ed..b6a719300e 100644 --- a/unofficial/c511002543.lua +++ b/unofficial/c511002543.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) diff --git a/unofficial/c511002591.lua b/unofficial/c511002591.lua index 7df24c8896..ac01fac519 100644 --- a/unofficial/c511002591.lua +++ b/unofficial/c511002591.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetHintTiming(0,TIMING_MAIN_END) e2:SetCondition(s.mtcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.mttg) e2:SetOperation(s.mtop) c:RegisterEffect(e2) @@ -78,4 +78,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002599.lua b/unofficial/c511002599.lua index 1e021f932a..4264008391 100644 --- a/unofficial/c511002599.lua +++ b/unofficial/c511002599.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(e) return Duel.GetAttacker() and not e:GetHandler():IsStatus(STATUS_CHAINING) end) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end) c:RegisterEffect(e2) end diff --git a/unofficial/c511002658.lua b/unofficial/c511002658.lua index e7112e2537..d60ec72452 100644 --- a/unofficial/c511002658.lua +++ b/unofficial/c511002658.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002727.lua b/unofficial/c511002727.lua index cfe385027c..f5db2c79bb 100644 --- a/unofficial/c511002727.lua +++ b/unofficial/c511002727.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e4:SetCondition(function(e,tp) return Duel.GetBattleDamage(tp)>=Duel.GetLP(tp) end) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetOperation(s.damop) c:RegisterEffect(e4) end diff --git a/unofficial/c511002737.lua b/unofficial/c511002737.lua index d48f4ab33f..8e19e0d9f8 100644 --- a/unofficial/c511002737.lua +++ b/unofficial/c511002737.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(511001265) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.damcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/unofficial/c511002749.lua b/unofficial/c511002749.lua index 1152b00353..3851ce5488 100644 --- a/unofficial/c511002749.lua +++ b/unofficial/c511002749.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002762.lua b/unofficial/c511002762.lua index 3a4b734a55..5aa282294d 100644 --- a/unofficial/c511002762.lua +++ b/unofficial/c511002762.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) - e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e2:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end @@ -32,4 +32,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511002763.lua b/unofficial/c511002763.lua index a77771f41a..62727ca4a3 100644 --- a/unofficial/c511002763.lua +++ b/unofficial/c511002763.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.SoftOncePerBattle(id))) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -39,4 +39,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end \ No newline at end of file +end diff --git a/unofficial/c511002764.lua b/unofficial/c511002764.lua index 4a6ba07391..31f2aa318c 100644 --- a/unofficial/c511002764.lua +++ b/unofficial/c511002764.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) c:RegisterEffect(e1) diff --git a/unofficial/c511002778.lua b/unofficial/c511002778.lua index 04b8654948..b0ce423352 100644 --- a/unofficial/c511002778.lua +++ b/unofficial/c511002778.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/unofficial/c511002829.lua b/unofficial/c511002829.lua index 28ca0b03ba..ba7cba4bea 100644 --- a/unofficial/c511002829.lua +++ b/unofficial/c511002829.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(30741334,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002830.lua b/unofficial/c511002830.lua index 1f7fcc7521..5f903cc0f2 100644 --- a/unofficial/c511002830.lua +++ b/unofficial/c511002830.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) diff --git a/unofficial/c511002839.lua b/unofficial/c511002839.lua index 57931e100c..da127bad1e 100644 --- a/unofficial/c511002839.lua +++ b/unofficial/c511002839.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(74416224,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002855.lua b/unofficial/c511002855.lua index 6379721e20..624a437f74 100644 --- a/unofficial/c511002855.lua +++ b/unofficial/c511002855.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(aux.bdocon) - e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) end,function(e,og) e:SetLabel(#og) end)) + e2:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) local e3=Effect.CreateEffect(c) @@ -120,4 +120,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.BreakEffect() Duel.SendtoGrave(sg,REASON_EFFECT) Duel.ShuffleHand(1-tp) -end \ No newline at end of file +end diff --git a/unofficial/c511002858.lua b/unofficial/c511002858.lua index 4d8eab858e..95f597365c 100644 --- a/unofficial/c511002858.lua +++ b/unofficial/c511002858.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) c:RegisterEffect(e3) diff --git a/unofficial/c511002864.lua b/unofficial/c511002864.lua index b354aff227..989349b7de 100644 --- a/unofficial/c511002864.lua +++ b/unofficial/c511002864.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end diff --git a/unofficial/c511002866.lua b/unofficial/c511002866.lua index f8ca23b479..36aaa774e7 100644 --- a/unofficial/c511002866.lua +++ b/unofficial/c511002866.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) --destroy @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.descon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) -- @@ -85,4 +85,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002870.lua b/unofficial/c511002870.lua index 8c0cde8641..d5bcfc7d96 100644 --- a/unofficial/c511002870.lua +++ b/unofficial/c511002870.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.disatkchtg) e2:SetOperation(s.disatkchop) c:RegisterEffect(e2) @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(s.indescon) - e3:SetCost(Cost.Detach(s.indescost,s.indescost)) + e3:SetCost(Cost.DetachFromSelf(s.indescost,s.indescost)) e3:SetOperation(s.indesop) c:RegisterEffect(e3) --Detach all materials from this to prevent this card's destruction (Card effect) @@ -130,4 +130,4 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) end c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511002871.lua b/unofficial/c511002871.lua index 0c3ef577bd..e4313c22ae 100644 --- a/unofficial/c511002871.lua +++ b/unofficial/c511002871.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_CHAINING) e3:SetCondition(s.condition) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) local e4=Effect.CreateEffect(c) diff --git a/unofficial/c511002872.lua b/unofficial/c511002872.lua index a2186fcbd2..e6f2a07905 100644 --- a/unofficial/c511002872.lua +++ b/unofficial/c511002872.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) local e4=Effect.CreateEffect(c) diff --git a/unofficial/c511002873.lua b/unofficial/c511002873.lua index ff382f99ee..a17e6f313c 100644 --- a/unofficial/c511002873.lua +++ b/unofficial/c511002873.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e2:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) @@ -90,4 +90,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511002896.lua b/unofficial/c511002896.lua index d4660e9fbe..97a6fdaad7 100644 --- a/unofficial/c511002896.lua +++ b/unofficial/c511002896.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() and not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/unofficial/c511002912.lua b/unofficial/c511002912.lua index b2ba80563d..b7a721846d 100644 --- a/unofficial/c511002912.lua +++ b/unofficial/c511002912.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511002913.lua b/unofficial/c511002913.lua index 5a2f005911..80ad7f86b2 100644 --- a/unofficial/c511002913.lua +++ b/unofficial/c511002913.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511003219.lua b/unofficial/c511003219.lua index 3140a49299..9cd2e5a253 100644 --- a/unofficial/c511003219.lua +++ b/unofficial/c511003219.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_CONFIRM) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e2:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -154,4 +154,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end end -end \ No newline at end of file +end diff --git a/unofficial/c511003224.lua b/unofficial/c511003224.lua index edc3cc14c8..7ad3df0a44 100644 --- a/unofficial/c511003224.lua +++ b/unofficial/c511003224.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511003236.lua b/unofficial/c511003236.lua index bd3602b7b5..6ae3ade23d 100644 --- a/unofficial/c511003236.lua +++ b/unofficial/c511003236.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/unofficial/c511009002.lua b/unofficial/c511009002.lua index 2b35604398..37dff2e614 100644 --- a/unofficial/c511009002.lua +++ b/unofficial/c511009002.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetCondition(s.btcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.bttg) e2:SetOperation(s.btop) c:RegisterEffect(e2) diff --git a/unofficial/c511009026.lua b/unofficial/c511009026.lua index f62fc418e0..1d2b02c4ef 100644 --- a/unofficial/c511009026.lua +++ b/unofficial/c511009026.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function() return Duel.IsAbleToEnterBP() end) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/unofficial/c511009062.lua b/unofficial/c511009062.lua index 4f515c4c0c..a1ed5d3a8f 100644 --- a/unofficial/c511009062.lua +++ b/unofficial/c511009062.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511009074.lua b/unofficial/c511009074.lua index ef65440de5..25c572f8a0 100644 --- a/unofficial/c511009074.lua +++ b/unofficial/c511009074.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) local e2=Effect.CreateEffect(c) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_CHAINING) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetCondition(s.discon) e3:SetTarget(s.distg) e3:SetOperation(s.disop) diff --git a/unofficial/c511009136.lua b/unofficial/c511009136.lua index 435fc7942f..0ed7e99063 100644 --- a/unofficial/c511009136.lua +++ b/unofficial/c511009136.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(s.cost,s.cost)) + e1:SetCost(Cost.DetachFromSelf(s.cost,s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) local e2=Effect.CreateEffect(c) @@ -134,4 +134,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) else e:GetLabelObject():SetLabel(0) end -end \ No newline at end of file +end diff --git a/unofficial/c511009321.lua b/unofficial/c511009321.lua index 00eaa7d5b8..c776ff01ac 100644 --- a/unofficial/c511009321.lua +++ b/unofficial/c511009321.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511009340.lua b/unofficial/c511009340.lua index 4dc483a115..1118ccf320 100644 --- a/unofficial/c511009340.lua +++ b/unofficial/c511009340.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e4:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) local e5=Effect.CreateEffect(c) @@ -146,4 +146,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511009387.lua b/unofficial/c511009387.lua index 84f8e03381..5101021655 100644 --- a/unofficial/c511009387.lua +++ b/unofficial/c511009387.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -89,4 +89,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511009462.lua b/unofficial/c511009462.lua index f63ab76898..1a4d96f980 100644 --- a/unofficial/c511009462.lua +++ b/unofficial/c511009462.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511009480.lua b/unofficial/c511009480.lua index 525253d9d5..82d8da6213 100644 --- a/unofficial/c511009480.lua +++ b/unofficial/c511009480.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.descon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -51,7 +51,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_CHAINING) e4:SetCondition(s.rmcon) - e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e4:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.rmtg) e4:SetOperation(s.rmop) c:RegisterEffect(e4) diff --git a/unofficial/c511009508.lua b/unofficial/c511009508.lua index a1e2bf1689..e21b64f824 100644 --- a/unofficial/c511009508.lua +++ b/unofficial/c511009508.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetCondition(s.atkcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -162,4 +162,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -end \ No newline at end of file +end diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index aaff245f4b..55e7dda2aa 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.indcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.indop) c:RegisterEffect(e1) --effect @@ -123,4 +123,4 @@ function s.dirregop(e,tp,eg,ep,ev,re,r,rp) end function s.dircon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 -end \ No newline at end of file +end diff --git a/unofficial/c511009567.lua b/unofficial/c511009567.lua index 1eabcc82fb..ba15947f97 100644 --- a/unofficial/c511009567.lua +++ b/unofficial/c511009567.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.rtgtg) e1:SetOperation(s.rtgop) c:RegisterEffect(e1) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) - e2:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e2:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/unofficial/c511010007.lua b/unofficial/c511010007.lua index b49e8e2706..a0b64c0faf 100644 --- a/unofficial/c511010007.lua +++ b/unofficial/c511010007.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(s.atkcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/unofficial/c511010009.lua b/unofficial/c511010009.lua index ef1bf8f6a2..54ff6a2a38 100644 --- a/unofficial/c511010009.lua +++ b/unofficial/c511010009.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.dacon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetOperation(s.daop) c:RegisterEffect(e3) --Cannot be destroyed by battle, except by "Number" monsters diff --git a/unofficial/c511010010.lua b/unofficial/c511010010.lua index 5ab9b1081b..42f4a2a993 100644 --- a/unofficial/c511010010.lua +++ b/unofficial/c511010010.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010011.lua b/unofficial/c511010011.lua index 1bd1d132b8..1be87ab55e 100644 --- a/unofficial/c511010011.lua +++ b/unofficial/c511010011.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010020.lua b/unofficial/c511010020.lua index f09eb7ab90..5f3d046f2e 100644 --- a/unofficial/c511010020.lua +++ b/unofficial/c511010020.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010021.lua b/unofficial/c511010021.lua index 3ee670b92a..f5b4d64b23 100644 --- a/unofficial/c511010021.lua +++ b/unofficial/c511010021.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -48,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010025.lua b/unofficial/c511010025.lua index d136535b0b..a9c0188ea0 100644 --- a/unofficial/c511010025.lua +++ b/unofficial/c511010025.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -59,4 +59,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end \ No newline at end of file +end diff --git a/unofficial/c511010032.lua b/unofficial/c511010032.lua index 73ca26c0a2..47ab4737dd 100644 --- a/unofficial/c511010032.lua +++ b/unofficial/c511010032.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.atcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) diff --git a/unofficial/c511010034.lua b/unofficial/c511010034.lua index 3bfc44b465..157799b972 100644 --- a/unofficial/c511010034.lua +++ b/unofficial/c511010034.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511010039.lua b/unofficial/c511010039.lua index bf9f677d44..d34a2433f7 100644 --- a/unofficial/c511010039.lua +++ b/unofficial/c511010039.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(1,1,function(e,og) Duel.Overlay(e:GetHandler():GetBattleTarget(),og) end)) + e1:SetCost(Cost.DetachFromSelf(1,1,function(e,og) Duel.Overlay(e:GetHandler():GetBattleTarget(),og) end)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -56,4 +56,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010047.lua b/unofficial/c511010047.lua index 759a3e2074..a8939f9ee3 100644 --- a/unofficial/c511010047.lua +++ b/unofficial/c511010047.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.dacon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.datg) e2:SetOperation(s.daop) c:RegisterEffect(e2) diff --git a/unofficial/c511010053.lua b/unofficial/c511010053.lua index 6243155482..dbf47e9d08 100644 --- a/unofficial/c511010053.lua +++ b/unofficial/c511010053.lua @@ -57,7 +57,7 @@ function s.initial_effect(c) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) e6:SetCode(id+1) - e6:SetCost(Cost.Detach(1)) + e6:SetCost(Cost.DetachFromSelf(1)) e6:SetTarget(s.rectg) e6:SetOperation(s.recop) c:RegisterEffect(e6) @@ -71,7 +71,7 @@ function s.initial_effect(c) e7:SetRange(LOCATION_MZONE) e7:SetCountLimit(1) e7:SetCondition(s.bdcon) - e7:SetCost(Cost.Detach(1)) + e7:SetCost(Cost.DetachFromSelf(1)) e7:SetTarget(s.bdtg) e7:SetOperation(s.bdop) c:RegisterEffect(e7) @@ -206,4 +206,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end \ No newline at end of file +end diff --git a/unofficial/c511010056.lua b/unofficial/c511010056.lua index 0c68201383..1f8786f95a 100644 --- a/unofficial/c511010056.lua +++ b/unofficial/c511010056.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) diff --git a/unofficial/c511010064.lua b/unofficial/c511010064.lua index a0ab0ceccf..aa0220fae7 100644 --- a/unofficial/c511010064.lua +++ b/unofficial/c511010064.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/unofficial/c511010065.lua b/unofficial/c511010065.lua index e0d8a5a584..64e3ca6b06 100644 --- a/unofficial/c511010065.lua +++ b/unofficial/c511010065.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.negdamcon) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.negdamtg) e2:SetOperation(s.negdamop) c:RegisterEffect(e2) diff --git a/unofficial/c511010083.lua b/unofficial/c511010083.lua index c2c7e89aa4..662f7c92fd 100644 --- a/unofficial/c511010083.lua +++ b/unofficial/c511010083.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable diff --git a/unofficial/c511010096.lua b/unofficial/c511010096.lua index 75099b7a10..b158df34c2 100644 --- a/unofficial/c511010096.lua +++ b/unofficial/c511010096.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/unofficial/c511010103.lua b/unofficial/c511010103.lua index ceaf19e90e..ceefc52371 100644 --- a/unofficial/c511010103.lua +++ b/unofficial/c511010103.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(511001265) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/unofficial/c511010104.lua b/unofficial/c511010104.lua index e7218ef756..0fc9cecf6b 100644 --- a/unofficial/c511010104.lua +++ b/unofficial/c511010104.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511010105.lua b/unofficial/c511010105.lua index 8d2b0daa19..00637a3481 100644 --- a/unofficial/c511010105.lua +++ b/unofficial/c511010105.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_BATTLE_PHASE) e2:SetCondition(function() return Duel.IsBattlePhase() end) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/unofficial/c511010107.lua b/unofficial/c511010107.lua index 9fbe66fb59..574c5919fd 100644 --- a/unofficial/c511010107.lua +++ b/unofficial/c511010107.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCountLimit(1) e3:SetCondition(s.discon) - e3:SetCost(Cost.AND(Cost.Detach(1),s.discost)) + e3:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.discost)) c:RegisterEffect(e3) --Global effects to keep track of total effect resolutions and the last attacker aux.GlobalCheck(s,function() @@ -174,4 +174,4 @@ function s.endbpop(e,tp,eg,ep,ev,re,r,rp) e2:SetOperation(function(e) e:Reset() Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end) e2:SetReset(RESET_PHASE|PHASE_END|PHASE_BATTLE) Duel.RegisterEffect(e2,tp) -end \ No newline at end of file +end diff --git a/unofficial/c511010132.lua b/unofficial/c511010132.lua index 2db08485a4..6befbbaeb0 100644 --- a/unofficial/c511010132.lua +++ b/unofficial/c511010132.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.AND(Cost.Detach(1),s.cost)) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),s.cost)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -92,4 +92,4 @@ function s.descon(e) end function s.indes(e,c) return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file +end diff --git a/unofficial/c511010139.lua b/unofficial/c511010139.lua index 29d11ee374..f787e6ff60 100644 --- a/unofficial/c511010139.lua +++ b/unofficial/c511010139.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/unofficial/c511010165.lua b/unofficial/c511010165.lua index 50786c17b4..9508078e9a 100644 --- a/unofficial/c511010165.lua +++ b/unofficial/c511010165.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/unofficial/c511010173.lua b/unofficial/c511010173.lua index 3a633af75e..177b2c5f9e 100644 --- a/unofficial/c511010173.lua +++ b/unofficial/c511010173.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(Cost.AND(Cost.Detach(1),Cost.SoftOncePerBattle(id))) + e1:SetCost(Cost.AND(Cost.DetachFromSelf(1),Cost.SoftOncePerBattle(id))) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --battle indestructable @@ -40,4 +40,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(bc:GetAttack()) c:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/unofficial/c511010192.lua b/unofficial/c511010192.lua index b2b3b6f44e..7656a3068a 100644 --- a/unofficial/c511010192.lua +++ b/unofficial/c511010192.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) local e4=Effect.CreateEffect(c) diff --git a/unofficial/c511010196.lua b/unofficial/c511010196.lua index 4feea34ce9..373f891759 100644 --- a/unofficial/c511010196.lua +++ b/unofficial/c511010196.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) local e4=Effect.CreateEffect(c) diff --git a/unofficial/c511010205.lua b/unofficial/c511010205.lua index f1492b97e3..ccfaa2173d 100644 --- a/unofficial/c511010205.lua +++ b/unofficial/c511010205.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetCondition(s.atkcon) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) diff --git a/unofficial/c511010207.lua b/unofficial/c511010207.lua index 67866bd859..074827e62a 100644 --- a/unofficial/c511010207.lua +++ b/unofficial/c511010207.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetOperation(s.negop) c:RegisterEffect(e2) --Double Snare diff --git a/unofficial/c511010238.lua b/unofficial/c511010238.lua index f8b765bdc6..351c93285e 100644 --- a/unofficial/c511010238.lua +++ b/unofficial/c511010238.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) local e3=Effect.CreateEffect(c) diff --git a/unofficial/c511010239.lua b/unofficial/c511010239.lua index 11fdd0c334..84ec41d481 100644 --- a/unofficial/c511010239.lua +++ b/unofficial/c511010239.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetHintTiming(TIMING_DAMAGE_STEP) e3:SetCondition(s.atkcon) - e3:SetCost(Cost.Detach(1)) + e3:SetCost(Cost.DetachFromSelf(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) -- diff --git a/unofficial/c511010504.lua b/unofficial/c511010504.lua index 11db4a104f..7f144a118c 100644 --- a/unofficial/c511010504.lua +++ b/unofficial/c511010504.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511010515.lua b/unofficial/c511010515.lua index 6a00519286..190c36e046 100644 --- a/unofficial/c511010515.lua +++ b/unofficial/c511010515.lua @@ -55,7 +55,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,1)) e7:SetType(EFFECT_TYPE_IGNITION) e7:SetRange(LOCATION_MZONE) - e7:SetCost(Cost.Detach(1)) + e7:SetCost(Cost.DetachFromSelf(1)) e7:SetTarget(s.destg) e7:SetOperation(s.desop) c:RegisterEffect(e7) diff --git a/unofficial/c511015129.lua b/unofficial/c511015129.lua index 29154d6ccd..8dfac6bc7d 100644 --- a/unofficial/c511015129.lua +++ b/unofficial/c511015129.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/unofficial/c511020000.lua b/unofficial/c511020000.lua index 7d361899b5..3e984fbc67 100644 --- a/unofficial/c511020000.lua +++ b/unofficial/c511020000.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --atk/def diff --git a/unofficial/c511023000.lua b/unofficial/c511023000.lua index 028455862a..c1394da064 100644 --- a/unofficial/c511023000.lua +++ b/unofficial/c511023000.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.copytg) e1:SetOperation(s.copyop) c:RegisterEffect(e1) @@ -33,4 +33,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then c:CopyEffect(tc:GetCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) end -end \ No newline at end of file +end diff --git a/unofficial/c511027117.lua b/unofficial/c511027117.lua index d101afc7a4..d624a2784b 100644 --- a/unofficial/c511027117.lua +++ b/unofficial/c511027117.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.diszatg) e2:SetOperation(s.diszaop) c:RegisterEffect(e2) diff --git a/unofficial/c511050008.lua b/unofficial/c511050008.lua index 09efeda766..2adf878155 100644 --- a/unofficial/c511050008.lua +++ b/unofficial/c511050008.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_POSITION) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) @@ -26,4 +26,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if #tc>0 then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) end -end \ No newline at end of file +end diff --git a/unofficial/c511600284.lua b/unofficial/c511600284.lua index a153e0037d..4bd8fda190 100644 --- a/unofficial/c511600284.lua +++ b/unofficial/c511600284.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) - e1:SetCost(Cost.Detach(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) + e1:SetCost(Cost.DetachFromSelf(s.damcost,s.damcost,function(e,og) e:SetLabel(#og) end)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) local e2=Effect.CreateEffect(c) @@ -41,4 +41,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file +end diff --git a/unofficial/c511600298.lua b/unofficial/c511600298.lua index 548ca7c999..859b200b6c 100644 --- a/unofficial/c511600298.lua +++ b/unofficial/c511600298.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,alias) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c511600369.lua b/unofficial/c511600369.lua index 27b432662c..1b2a1758d2 100644 --- a/unofficial/c511600369.lua +++ b/unofficial/c511600369.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) diff --git a/unofficial/c511600384.lua b/unofficial/c511600384.lua index ee682a7231..fa40babe2a 100644 --- a/unofficial/c511600384.lua +++ b/unofficial/c511600384.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(2)) + e1:SetCost(Cost.DetachFromSelf(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/unofficial/c513000017.lua b/unofficial/c513000017.lua index 0879c49306..f02f3e5bb4 100644 --- a/unofficial/c513000017.lua +++ b/unofficial/c513000017.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -57,4 +57,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end \ No newline at end of file +end diff --git a/unofficial/c513000018.lua b/unofficial/c513000018.lua index 2fdd16292c..94cc1ecd22 100644 --- a/unofficial/c513000018.lua +++ b/unofficial/c513000018.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1) --battle indestructable diff --git a/unofficial/c513000059.lua b/unofficial/c513000059.lua index 01d8446a67..7236b35f3f 100644 --- a/unofficial/c513000059.lua +++ b/unofficial/c513000059.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetLabelObject(e4) - e4:SetCost(Cost.Detach(function(e,tp) return e:GetHandler():GetOverlayCount() end)) + e4:SetCost(Cost.DetachFromSelf(function(e,tp) return e:GetHandler():GetOverlayCount() end)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) local e5=Effect.CreateEffect(c) diff --git a/unofficial/c513000060.lua b/unofficial/c513000060.lua index b0df726ff8..f996df237d 100644 --- a/unofficial/c513000060.lua +++ b/unofficial/c513000060.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.spcon) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) local e5=Effect.CreateEffect(c) diff --git a/unofficial/c513000061.lua b/unofficial/c513000061.lua index dbb5ae98cb..f46648cee8 100644 --- a/unofficial/c513000061.lua +++ b/unofficial/c513000061.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetCondition(s.negcon) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) diff --git a/unofficial/c513000062.lua b/unofficial/c513000062.lua index 00d7133750..7863824054 100644 --- a/unofficial/c513000062.lua +++ b/unofficial/c513000062.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) diff --git a/unofficial/c513000063.lua b/unofficial/c513000063.lua index e3616e8f79..79c15d3cd6 100644 --- a/unofficial/c513000063.lua +++ b/unofficial/c513000063.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(Cost.Detach(1)) + e2:SetCost(Cost.DetachFromSelf(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) diff --git a/unofficial/c513000141.lua b/unofficial/c513000141.lua index 31ea566b1f..146a84298b 100644 --- a/unofficial/c513000141.lua +++ b/unofficial/c513000141.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCode(EVENT_ATTACK_ANNOUNCE) e4:SetCondition(s.descon) - e4:SetCost(Cost.Detach(1)) + e4:SetCost(Cost.DetachFromSelf(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) @@ -102,4 +102,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/unofficial/c700000026.lua b/unofficial/c700000026.lua index 178f9b61a0..a36acb00f5 100644 --- a/unofficial/c700000026.lua +++ b/unofficial/c700000026.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.spcon) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/unofficial/c700000027.lua b/unofficial/c700000027.lua index 4a8feadd2c..811b03bf25 100644 --- a/unofficial/c700000027.lua +++ b/unofficial/c700000027.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -52,4 +52,4 @@ function s.operation(e,tp,ep,eg,ev,re,r,rp) ct=g:GetNext() until rc<=0 or not Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil,e) or not Duel.SelectYesNo(tp,210) -end \ No newline at end of file +end diff --git a/unofficial/c810000081.lua b/unofficial/c810000081.lua index dd9af32558..3ffc57f68d 100644 --- a/unofficial/c810000081.lua +++ b/unofficial/c810000081.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_MZONE) - e1:SetCost(Cost.Detach(1)) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetCondition(s.discon) e1:SetTarget(s.distg) e1:SetOperation(s.disop) diff --git a/utility.lua b/utility.lua index d9066df765..3a1b7e98ec 100644 --- a/utility.lua +++ b/utility.lua @@ -1526,7 +1526,7 @@ function Cost.Discard(filter,other,count) end local detach_costs={} -function Cost.Detach(min,max,op) +function Cost.DetachFromSelf(min,max,op) max=max or min local min_type=type(min) From d1db12076ee184f393670d8b1432746856b6d2fc Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 13 Jul 2025 03:05:15 +0800 Subject: [PATCH 164/165] Update c511009560.lua --- unofficial/c511009560.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/unofficial/c511009560.lua b/unofficial/c511009560.lua index 55e7dda2aa..7abc130b33 100644 --- a/unofficial/c511009560.lua +++ b/unofficial/c511009560.lua @@ -72,15 +72,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.DetachFromSelf(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + c:RegisterEffect(e1) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then From eb6d0cddad708b57ce451d302e1163e6ef42af77 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 13 Jul 2025 03:07:00 +0800 Subject: [PATCH 165/165] Update c511001781.lua --- unofficial/c511001781.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial/c511001781.lua b/unofficial/c511001781.lua index d839f332b9..12670e0ec4 100644 --- a/unofficial/c511001781.lua +++ b/unofficial/c511001781.lua @@ -88,7 +88,7 @@ function s.initial_effect(c) c:RegisterEffect(e10) local e11=e7:Clone() e11:SetLabelObject(e5) - c:RegisterEffect(e11,false,EFFECT_MARKER_DETACH_XMAT) + c:RegisterEffect(e11) local e12=e7:Clone() e12:SetLabelObject(e6) c:RegisterEffect(e12)