From ccdb73a7e9e583dbff0d063add1f5ccd578f1c9d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 13 May 2025 00:52:48 +0300 Subject: [PATCH 001/128] Added new archetype constant SET_DOOM_KING = 0x1c8 --- archetype_setcode_constants.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index 5b99f8f527..c802bc600e 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -593,3 +593,4 @@ SET_K9 = 0x1c4 SET_TELEPORT = 0x1c5 SET_IMPRISONED_DEITY = 0x1c6 SET_ARTMEGIA = 0x1c7 +SET_DOOM_KING = 0x1c8 From 1a5fc635826733ddabddcd3e14620db0dc93dd35 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 13 May 2025 00:08:39 +0200 Subject: [PATCH 002/128] fixed Magical Warrior of Heritage --- rush/c160021030.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/rush/c160021030.lua b/rush/c160021030.lua index 83f5ea5793..72962239ff 100644 --- a/rush/c160021030.lua +++ b/rush/c160021030.lua @@ -38,7 +38,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(td) if Duel.SendtoDeck(td,nil,SEQ_DECKSHUFFLE,REASON_COST)<1 then return end --Effect - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) local g=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e:GetHandler():GetCode()) if #g>0 then From 53d1f97cf80ef38ceff65e516f7c9568c6e0a203 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 13 May 2025 17:07:59 +0800 Subject: [PATCH 003/128] fix "Resh Shaddoll Incarnation" was not retrieving the player's chosen effect in the operation --- official/c23912837.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/official/c23912837.lua b/official/c23912837.lua index d063d3d26f..5409b0d0c3 100644 --- a/official/c23912837.lua +++ b/official/c23912837.lua @@ -68,6 +68,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,0) end function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() if op==1 then --Change 1 face-down monster you control to face-up Defense Position Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) From 0aec77b55af462330fed232042e6efa5faaf20c7 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 13 May 2025 13:52:15 +0300 Subject: [PATCH 004/128] "D/D/D Super Doom King Bright Armageddon" fixes - Should be able to target a "D/D/D" Synchro Monster with 0 ATK (as long as the opponent controls a monster with 0 DEF). - Any Trap Monsters that are still Traps that have their effects negated by this card's effect shoul only have their monster effects negated, not their Trap effects as well (they should stay in the Monster Zone). --- official/c72402069.lua | 150 +++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 87 deletions(-) diff --git a/official/c72402069.lua b/official/c72402069.lua index 3194956628..4198188552 100644 --- a/official/c72402069.lua +++ b/official/c72402069.lua @@ -1,132 +1,108 @@ ---DDD超死偉王ホワイテスト・ヘル・アーマゲドン +--DDD超死偉王ホワイテスト・ヘル・アーマゲドン --D/D/D Super Doom King Bright Armageddon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Pendulum.AddProcedure(c,false) + --1 "D/D" Tuner + 1+ non-Tuner "D/D/D" monsters Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_DDD),1,99) - --destroy and damage + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Destroy as many monsters your opponent controls as possible with DEF less than or equal to the ATK of 1 "D/D/D" Synchro Monster you control, and if you do, inflict 1000 damage to your opponent for each monster destroyed 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:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) + e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_PZONE) - e1:SetCondition(s.descon) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - --cannot be target + --Your opponent cannot target monsters you control with card effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) + --Make your opponent choose 1 Pendulum Monster they control, and all other monsters they currently control have their effects negated + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_DISABLE) + e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetRange(LOCATION_MZONE) + e3a:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) end) + e3a:SetTarget(s.distg) + e3a:SetOperation(s.disop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) + --Place this card in your Pendulum Zone + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e4:SetOperation(s.penop) c:RegisterEffect(e4) - --pendulum - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(id,3)) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_DESTROYED) - e6:SetProperty(EFFECT_FLAG_DELAY) - e6:SetCondition(s.pencon) - e6:SetTarget(s.pentg) - e6:SetOperation(s.penop) - c:RegisterEffect(e6) end s.listed_series={SET_DDD,SET_DD} -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():GetControler()~=tp -end -function s.desfilter1(c,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(SET_DDD) and c:GetAttack()>0 - and Duel.IsExistingMatchingCard(s.desfilter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) -end -function s.desfilter2(c,atk) - return c:IsFaceup() and c:IsDefenseBelow(atk) +function s.tgfilter(c,tp) + return c:IsSetCard(SET_DDD) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsDefenseBelow,c:GetAttack()),tp,0,LOCATION_MZONE,1,nil) 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(tp) and s.desfilter1(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tc=Duel.SelectTarget(tp,s.desfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() - local g=Duel.GetMatchingGroup(s.desfilter2,tp,0,LOCATION_MZONE,nil,tc:GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsDefenseBelow,tc:GetAttack()),tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*1000) 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 tc:IsFaceup() then - local g=Duel.GetMatchingGroup(s.desfilter2,tp,0,LOCATION_MZONE,nil,tc:GetAttack()) + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsDefenseBelow,tc:GetAttack()),tp,0,LOCATION_MZONE,nil) if #g==0 then return end - local oc=Duel.Destroy(g,REASON_EFFECT) - if oc>0 then Duel.Damage(1-tp,oc*1000,REASON_EFFECT) end + local ct=Duel.Destroy(g,REASON_EFFECT) + if ct>0 then + Duel.Damage(1-tp,ct*1000,REASON_EFFECT) + end end end -function s.disfilter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) +function s.pendulumdisfilter(c,tp) + return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,c) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not eg:IsContains(e:GetHandler()) - and Duel.IsExistingMatchingCard(s.disfilter,tp,0,LOCATION_MZONE,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.pendulumdisfilter,tp,0,LOCATION_MZONE,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,2)) - local pc=Duel.SelectMatchingCard(1-tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst() - if not pc then return end - local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,pc) - local tc=g:GetFirst() - for tc in aux.Next(g) do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - 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) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e3) - end - end -end -function s.pencon(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,3)) + local sg=Duel.SelectMatchingCard(1-tp,s.pendulumdisfilter,tp,0,LOCATION_MZONE,1,1,nil,tp) + if #sg==0 then return end + Duel.HintSelection(sg) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() -end -function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end + local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,sg) + for dis_c in g:Iter() do + --Their effects are negated + dis_c:NegateEffects(c) + end end function s.penop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end \ No newline at end of file +end From e29c311b432b8fb9691ebe82c50d5f57e9201eb0 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 13 May 2025 13:41:11 +0200 Subject: [PATCH 005/128] added Magnet Speeder --- rush/c160021024.lua | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 rush/c160021024.lua diff --git a/rush/c160021024.lua b/rush/c160021024.lua new file mode 100644 index 0000000000..775d326455 --- /dev/null +++ b/rush/c160021024.lua @@ -0,0 +1,50 @@ +--マグネット・スピーダー +--Magnet Speeder +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + local params = {nil,s.matfilter} + --Add card to 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:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation(Fusion.SummonEffTG(table.unpack(params)),Fusion.SummonEffOP(table.unpack(params)))) + c:RegisterEffect(e1) +end +function s.matfilter(c) + return c:IsLocation(LOCATION_HAND|LOCATION_MZONE) and c:IsRace(RACE_ROCK) and c:IsAbleToGrave() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end +end +function s.thfilter(c) + return c:IsRace(RACE_ROCK) and (c:IsType(TYPE_NORMAL) or c:IsDefense(2100)) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.operation(fustg,fusop) + return function(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local td=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_COST)<1 then return end + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + if fustg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + fusop(e,tp,eg,ep,ev,re,r,rp) + end + end + end +end \ No newline at end of file From c83a286aec3095b63442919327ac448e2ba9701b Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 13 May 2025 21:32:45 +0300 Subject: [PATCH 006/128] Added new card scripts --- pre-release/c101302101.lua | 78 ++++++++++++ pre-release/c101302102.lua | 102 ++++++++++++++++ pre-release/c101302103.lua | 104 ++++++++++++++++ pre-release/c101302104.lua | 163 +++++++++++++++++++++++++ pre-release/c101302105.lua | 64 ++++++++++ pre-release/c101302106.lua | 85 +++++++++++++ pre-release/c101302107.lua | 240 +++++++++++++++++++++++++++++++++++++ pre-release/c101302108.lua | 81 +++++++++++++ pre-release/c101302109.lua | 95 +++++++++++++++ 9 files changed, 1012 insertions(+) create mode 100644 pre-release/c101302101.lua create mode 100644 pre-release/c101302102.lua create mode 100644 pre-release/c101302103.lua create mode 100644 pre-release/c101302104.lua create mode 100644 pre-release/c101302105.lua create mode 100644 pre-release/c101302106.lua create mode 100644 pre-release/c101302107.lua create mode 100644 pre-release/c101302108.lua create mode 100644 pre-release/c101302109.lua diff --git a/pre-release/c101302101.lua b/pre-release/c101302101.lua new file mode 100644 index 0000000000..aef09c86fb --- /dev/null +++ b/pre-release/c101302101.lua @@ -0,0 +1,78 @@ +--DDランス・ソルジャー +--D/D Lance Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.lvtg) + e1:SetOperation(s.lvop) + c:RegisterEffect(e1) + --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.lvfilter(c) + return c:IsSetCard(SET_DD) 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.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if ct==0 then return end + local lv=Duel.AnnounceLevel(tp,1,ct) + if lv then + tc:UpdateLevel(lv,nil,e:GetHandler()) + end +end +function s.desfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) 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) +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 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302102.lua b/pre-release/c101302102.lua new file mode 100644 index 0000000000..e331afd54a --- /dev/null +++ b/pre-release/c101302102.lua @@ -0,0 +1,102 @@ +--DDディフェンス・ソルジャー +--D/D Defense Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DDD} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.limcostfilter(c) + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) + local b2=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + elseif op==2 then + e:SetCategory(0) + e:SetProperty(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 "D/D" card in your Pendulum Zone + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step + local e1=Effect.CreateEffect(e:GetHandler()) + 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_ACTIVATE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,1) + e1:SetCondition(s.actcon) + e1:SetValue(1) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.actcon(e) + local tc=Duel.GetAttacker() + return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) +end +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) 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_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|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_EXTRA|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101302103.lua b/pre-release/c101302103.lua new file mode 100644 index 0000000000..98f9147c64 --- /dev/null +++ b/pre-release/c101302103.lua @@ -0,0 +1,104 @@ +--DDD零死王ゼロ・マキナ +--D/D/D Zero Demise King Zero Machinex +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Check if it was activated this turn + local e0=Effect.CreateEffect(c) + e0:SetDescription(1160) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetRange(LOCATION_HAND) + e0:SetCost(s.actreg) + c:RegisterEffect(e0) + --Place 1 "Dark Contract" Continuous Spell/Trap on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_EXTRA) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place this card in the Pendulum Zone if it's destroyed + 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) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e3:SetOperation(s.penop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT,SET_DDD} +s.listed_names={id} +function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.plfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.spconfilter(c,tp) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) + and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua new file mode 100644 index 0000000000..47f01a850c --- /dev/null +++ b/pre-release/c101302104.lua @@ -0,0 +1,163 @@ +--DDDD偉次元王アーク・クライシス +--D/D/D/D Great Dimension King Arc Crisis +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) + Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) + --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY + Fusion.AddContactProc(c,s.contactfil,s.contactop,false) + c:AddMustBeFusionSummoned() + --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn + 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(s.regop) + c:RegisterEffect(e0) + --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the effects of all face-up monsters your opponent currently controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Can attack all monsters your opponent controls once each + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_ATTACK_ALL) + e3:SetValue(1) + c:RegisterEffect(e3) + --Place this card in your Pendulum Zone + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e4:SetOperation(s.penop) + c:RegisterEffect(e4) +end +s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} +s.miracle_synchro_fusion=true +function s.matfilter(typ) + return function(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) + end +end +function s.contactfil(tp) + local loc=LOCATION_ONFIELD|LOCATION_GRAVE + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end + return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) +end +function s.contactop(g) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.desfilter(c,e,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) +end +function s.spfilter(c,e,tp,dc) + if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end + local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.rescon(mmz_ct,linkmz_ct) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct + and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if tg==0 then return end + local ct=Duel.Destroy(tg,REASON_EFFECT) + if ct==0 then return end + local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) + local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) + local ft=math.min(mmz_ct+emz_ct,ct) + if ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) + if #sg==0 then return end + local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) + for fup_c in fup:Iter() do + Duel.SpecialSummonStep(fup_c,0,tp,tp,false,false,POS_FACEUP) + end + local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) + for fdown_main_c in fdown_main:Iter() do + Duel.SpecialSummonStep(fdown_main_c,0,tp,tp,false,false,POS_FACEUP) + end + for fdown_ex_c in fdown_ex:Iter() do + Duel.SpecialSummonStep(fdown_ex_c,0,tp,tp,false,false,POS_FACEUP) + end + Duel.BreakEffect() + Duel.SpecialSummonComplete() +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,nil):Filter(Card.IsCanBeDisabledByEffect,nil,e) + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + --Negate their effects + tc:NegateEffects(c) + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302105.lua b/pre-release/c101302105.lua new file mode 100644 index 0000000000..927e055a1e --- /dev/null +++ b/pre-release/c101302105.lua @@ -0,0 +1,64 @@ +--DDD創始王クロヴィス +--D/D/D Founder King Clovis +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 of your banished "D/D" monsters, or if a "Dark Contract" card is on the field, from your GY instead + 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+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_REMOVE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local REMOVED_AND_OR_GRAVE=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and (LOCATION_GRAVE|LOCATION_REMOVED) or LOCATION_REMOVED + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(loc) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua new file mode 100644 index 0000000000..1e04dd7902 --- /dev/null +++ b/pre-release/c101302106.lua @@ -0,0 +1,85 @@ +--DDD智慧王ソロモン +--D/D/D Wisdom King Solomon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 "D/D" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) + --Add 1 "D/D" card from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --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)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_REMOVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD} +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.tgfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_EFFECT) and c:IsFaceup() +end +function s.efftg(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) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --Inflict damage to your opponent equal to the original ATK of a monster this card destroys a monster by battle + local e1=Effect.CreateEffect(tc) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(aux.bdcon) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() + if dam<0 then dam=0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c101302107.lua b/pre-release/c101302107.lua new file mode 100644 index 0000000000..2b67de5580 --- /dev/null +++ b/pre-release/c101302107.lua @@ -0,0 +1,240 @@ +--DDD天空王ゼウス・ラグナロク +--D/D/D Sky King Zeus Ragnarok +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ "D/D" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) + --Destroy 1 "D/D" or "Dark Contract" card you control, also, you can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Negate the activation of monster effect your opponent activates in the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and chkc:IsFaceup() end + if chk==0 then return not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + --You can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + local c=e:GetHandler() + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) + e1:SetCode(EVENT_ADJUST) + e1:SetOperation(s.checkop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + s.checkop(e,tp) +end +function s.checkop(e,tp) + local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) + if lpz~=nil and lpz:GetFlagEffect(id)<=0 then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_SPSUMMON_PROC_G) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.pencon1) + e1:SetOperation(s.penop1) + e1:SetValue(SUMMON_TYPE_PENDULUM) + e1:SetReset(RESET_PHASE|PHASE_END) + lpz:RegisterEffect(e1) + lpz:RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) + end + local olpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0) + local orpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + if olpz~=nil and orpz~=nil and olpz:GetFlagEffect(id)<=0 + and olpz:GetFlagEffectLabel(31531170)==orpz:GetFieldID() + and orpz:GetFlagEffectLabel(31531170)==olpz:GetFieldID() then + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_SPSUMMON_PROC_G) + e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE) + e2:SetRange(LOCATION_PZONE) + e2:SetCondition(s.pencon2) + e2:SetOperation(s.penop2) + e2:SetValue(SUMMON_TYPE_PENDULUM) + e2:SetReset(RESETS_STANDARD_PHASE_END) + olpz:RegisterEffect(e2) + olpz:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + end +end +function s.penfilter(c,e,tp,lscale,rscale) + return c:IsSetCard(SET_DD) and Pendulum.Filter(c,e,tp,lscale,rscale) +end +function s.pencon1(e,c,og) + if c==nil then return true end + local tp=c:GetControler() + local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) + if rpz==nil or c==rpz or Duel.GetFlagEffect(tp,29432356)>0 then return false end + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local loc=0 + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_HAND end + if Duel.GetLocationCountFromEx(tp)>0 then loc=loc|LOCATION_EXTRA end + if loc==0 then return false end + local g=nil + if og then + g=og:Filter(Card.IsLocation,nil,loc) + else + g=Duel.GetFieldGroup(tp,loc,0) + end + return g:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) +end +function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) + local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) + local ft2=Duel.GetLocationCountFromEx(tp) + local ft=Duel.GetUsableMZoneCount(tp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + if ft1>0 then ft1=1 end + if ft2>0 then ft2=1 end + ft=1 + end + local loc=0 + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end + local tg=nil + if og then + tg=og:Filter(Card.IsLocation,nil,loc):Filter(s.penfilter,nil,e,tp,lscale,rscale) + else + tg=Duel.GetMatchingGroup(s.penfilter,tp,loc,0,nil,e,tp,lscale,rscale) + end + ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND)) + ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)) + ft2=math.min(ft2,aux.CheckSummonGate(tp) or ft2) + while true do + local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND) + local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) + local ct=ft + if ct1>ft1 then ct=math.min(ct,ft1) end + if ct2>ft2 then ct=math.min(ct,ft2) end + local loc=0 + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end + local g=tg:Filter(Card.IsLocation,sg,loc) + if #g==0 or ft==0 then break end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Group.SelectUnselect(g,sg,tp,#sg>0,Duel.IsSummonCancelable()) + if not tc then break end + if sg:IsContains(tc) then + sg:RemoveCard(tc) + if tc:IsLocation(LOCATION_HAND) then + ft1=ft1+1 + else + ft2=ft2+1 + end + ft=ft+1 + else + sg:AddCard(tc) + if tc:IsLocation(LOCATION_HAND) then + ft1=ft1-1 + else + ft2=ft2-1 + end + ft=ft-1 + end + end + if #sg>0 then + Duel.Hint(HINT_CARD,0,id) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) + Duel.HintSelection(Group.FromCards(c)) + Duel.HintSelection(Group.FromCards(rpz)) + end +end +function s.pencon2(e,c,inchain,re,rp) + if c==nil then return true end + local tp=e:GetOwnerPlayer() + if inchain and tp~=rp then return false end + local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) or Duel.GetFlagEffect(tp,29432356)>0 then return false end + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft=Duel.GetLocationCountFromEx(tp) + if ft<=0 then return false end + if og then + return og:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) + else + return Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale) + end +end +function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) + local tp=e:GetOwnerPlayer() + local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft=Duel.GetLocationCountFromEx(tp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + ft=math.min(ft,aux.CheckSummonGate(tp) or ft) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.penfilter,tp,LOCATION_EXTRA,0,inchain and 1 or 0,ft,nil,e,tp,lscale,rscale) + if g then + sg:Merge(g) + end + if #sg>0 then + Duel.Hint(HINT_CARD,0,31531170) + Duel.Hint(HINT_CARD,0,id) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) + Duel.HintSelection(Group.FromCards(c)) + Duel.HintSelection(Group.FromCards(rpz)) + end +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc==LOCATION_HAND + and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) +end +function s.costfilter(c) + return (c:IsSetCard(SET_DARK_CONTRACT) or (c:IsSetCard(SET_DD) and c:IsMonster())) and c:IsAbleToRemoveAsCost() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_DARK_CONTRACT) and sg:IsExists(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,1,nil) +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_GRAVE,0,nil) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) + Duel.Remove(rg,POS_FACEUP,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,tp,0) +end \ No newline at end of file diff --git a/pre-release/c101302108.lua b/pre-release/c101302108.lua new file mode 100644 index 0000000000..f860d7103f --- /dev/null +++ b/pre-release/c101302108.lua @@ -0,0 +1,81 @@ +--零王の契約書 +--Dark Contract with the Zero King +--Scripted by Hatter +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 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Take 1000 damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_DD} +function s.desfilter(c,tp) + return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + 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 Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) 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,nil,1,tp,LOCATION_DECK) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except "D/D" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c101302109.lua b/pre-release/c101302109.lua new file mode 100644 index 0000000000..a30b3256ec --- /dev/null +++ b/pre-release/c101302109.lua @@ -0,0 +1,95 @@ +--異次元の契約書 +--Dark Contract with the Different Dimension +--Scripted by Hatter +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) + --Take 1000 damage + 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,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Banish 1 card in your opponent's field or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCost(s.rmcost) + e2:SetTarget(s.rmtg) + e2:SetOperation(s.rmop) + c:RegisterEffect(e2) + --Gain 500 LP + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_RECOVER) + 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.lptg) + e3:SetOperation(s.lpop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT} +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +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 +function s.rmcostfilter(c) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() +end +function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end +function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then + Duel.BreakEffect() + Duel.Recover(p,500,REASON_EFFECT) + end +end \ No newline at end of file From df7b8c5e4621a0b64f7720ec2404504dbbba26e6 Mon Sep 17 00:00:00 2001 From: Naim Date: Tue, 13 May 2025 16:30:52 -0300 Subject: [PATCH 007/128] "D/D/D Oblivion King Abyss Ragnarok" update Fixed a bug where a "D/D/D Oracle King d'Arc" special summoned by its effect could change the damage to LP recover, when its effect should not apply in that situation --- official/c74069667.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/official/c74069667.lua b/official/c74069667.lua index 06599555bf..f0230ad384 100644 --- a/official/c74069667.lua +++ b/official/c74069667.lua @@ -72,9 +72,10 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local label=e:GetLabel() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and label==1 then + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and label==1 then Duel.Damage(tp,1000,REASON_EFFECT) end + Duel.SpecialSummonComplete() if label==2 then return end --Any battle damage your opponent takes becomes halved for the rest of this turn local e1=Effect.CreateEffect(e:GetHandler()) From 011a4bce36ed2245ed026f1ad2e914df76ca1744 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Tue, 13 May 2025 18:22:03 -0700 Subject: [PATCH 008/128] Update c101302104.lua Indentation fix. --- pre-release/c101302104.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua index 47f01a850c..eeaa1aab04 100644 --- a/pre-release/c101302104.lua +++ b/pre-release/c101302104.lua @@ -42,11 +42,11 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) --Can attack all monsters your opponent controls once each - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetValue(1) - c:RegisterEffect(e3) + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_ATTACK_ALL) + e3:SetValue(1) + c:RegisterEffect(e3) --Place this card in your Pendulum Zone local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) @@ -160,4 +160,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 From 538241361a2ac9566e37e30e0c631b53e9ab7ea9 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Tue, 13 May 2025 18:23:45 -0700 Subject: [PATCH 009/128] Update"Chef de Nouvelles" Effect to place in Pendulum Zone should not be OPT. --- pre-release/c101301023.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pre-release/c101301023.lua b/pre-release/c101301023.lua index 5ae481b184..415e72a4a5 100644 --- a/pre-release/c101301023.lua +++ b/pre-release/c101301023.lua @@ -42,7 +42,6 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_RELEASE) - e3:SetCountLimit(1,{id,2}) e3:SetTarget(s.pltg) e3:SetOperation(s.plop) c:RegisterEffect(e3) @@ -177,4 +176,4 @@ function s.applyop(e,tp,eg,ep,ev,re,r,rp) te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) end -end \ No newline at end of file +end From ad9aa4753efbb4d9aefcf6ce61ba94d5098fb4e0 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Tue, 13 May 2025 18:25:15 -0700 Subject: [PATCH 010/128] Update c101302104.lua --- pre-release/c101302104.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua index eeaa1aab04..61deec5523 100644 --- a/pre-release/c101302104.lua +++ b/pre-release/c101302104.lua @@ -42,11 +42,11 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) --Can attack all monsters your opponent controls once each - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetValue(1) - c:RegisterEffect(e3) + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_ATTACK_ALL) + e3:SetValue(1) + c:RegisterEffect(e3) --Place this card in your Pendulum Zone local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) From 7c69721c1b98229fd0bba07693dab15475c36fbd Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Wed, 14 May 2025 18:24:29 -0700 Subject: [PATCH 011/128] Update "Puzzlomino, the Drop-n-Deleter" Prevent script error --- official/c84271823.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/official/c84271823.lua b/official/c84271823.lua index bf879a138e..67b3cf0c6a 100644 --- a/official/c84271823.lua +++ b/official/c84271823.lua @@ -55,7 +55,7 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) e:SetLabel(Duel.AnnounceLevel(tp,1,8,lv)) e:SetLabelObject(g) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#dg,0,e:GetLabel()) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,0,e:GetLabel()) end function s.opfilter(c,e) return c:IsFaceup() and c:IsRelateToEffect(e) @@ -93,4 +93,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end \ No newline at end of file +end From 891553ea33a40ffd0309cf713ef7d6532c1996c7 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Wed, 14 May 2025 21:41:03 -0700 Subject: [PATCH 012/128] Update "Number 39: Utopia (Anime) --- unofficial/c511002599.lua | 43 ++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/unofficial/c511002599.lua b/unofficial/c511002599.lua index 9d1dc30ed9..f56e66b96a 100644 --- a/unofficial/c511002599.lua +++ b/unofficial/c511002599.lua @@ -3,35 +3,26 @@ Duel.LoadCardScript("c84013237.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,4,2) c:EnableReviveLimit() - --disable attack + --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(id,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --battle indestructable + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) + c:RegisterEffect(e1) + --Negate the attack of 1 monster on the field local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) - c:RegisterEffect(e2) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_QUICK_O) + 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:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end) + c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) + end s.listed_series={SET_NUMBER} s.xyz_number=39 -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker() and not e:GetHandler():IsStatus(STATUS_CHAINING) -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) - Duel.NegateAttack() -end \ No newline at end of file From 19423df283f1619840dbde002e6ab2e4337cad36 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 15 May 2025 17:52:43 +0800 Subject: [PATCH 013/128] update "Artmegia the Academy City of Divine Arts" Moved `announce_filter` to the `s` table so that "Engraver of the Mark" could access it. --- pre-release/c101301054.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pre-release/c101301054.lua b/pre-release/c101301054.lua index 47d878f9e0..03b2320a0f 100644 --- a/pre-release/c101301054.lua +++ b/pre-release/c101301054.lua @@ -49,18 +49,18 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local fcs=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_MZONE,0,nil):GetClass(Card.GetCode) local g=Duel.GetMatchingGroup(s.declfilter,tp,LOCATION_DECK,0,nil,fcs,s.declared_names[tp]) if chk==0 then return #g>0 end - local announce_filter={} + s.announce_filter={} for _,code in ipairs(g:GetClass(Card.GetCode)) do - if #announce_filter==0 then - table.insert(announce_filter,code) - table.insert(announce_filter,OPCODE_ISCODE) + if #s.announce_filter==0 then + table.insert(s.announce_filter,code) + table.insert(s.announce_filter,OPCODE_ISCODE) else - table.insert(announce_filter,code) - table.insert(announce_filter,OPCODE_ISCODE) - table.insert(announce_filter,OPCODE_OR) + table.insert(s.announce_filter,code) + table.insert(s.announce_filter,OPCODE_ISCODE) + table.insert(s.announce_filter,OPCODE_OR) end end - local ac=Duel.AnnounceCard(tp,table.unpack(announce_filter)) + local ac=Duel.AnnounceCard(tp,table.unpack(s.announce_filter)) table.insert(s.declared_names[tp],ac) Duel.SetTargetParam(ac) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -end \ No newline at end of file +end From da10c3c7833fcf0a3a90a03b91547769b899a842 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Thu, 15 May 2025 13:10:33 +0200 Subject: [PATCH 014/128] added Wicked Dragon Knight of Darkness --- rush/c160021035.lua | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 rush/c160021035.lua diff --git a/rush/c160021035.lua b/rush/c160021035.lua new file mode 100644 index 0000000000..2781b0b67f --- /dev/null +++ b/rush/c160021035.lua @@ -0,0 +1,63 @@ +--暗黒の邪竜騎士 +--Wicked Dragon Knight of Darkness +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --fusion material + c:EnableReviveLimit() + Fusion.AddProcMix(c,true,true,160302004,160214042) + --Gain 400 ATK for each Normal monster in your Graveyard + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) + e1:SetRange(LOCATION_MZONE) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) + --Gain 600 ATK while this card is face-up on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(s.cost) + e2:SetOperation(s.operation2) + c:RegisterEffect(e2) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckLPCost(tp,500) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_NORMAL) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + Duel.PayLPCost(tp,500) + --Effect + local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_NORMAL) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + e1:SetValue(ct*400) + c:RegisterEffect(e1) +end +function s.operation2(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + Duel.PayLPCost(tp,500) + --Effect + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + e1:SetValue(600) + c:RegisterEffect(e1) +end \ No newline at end of file From a3ac82ceb41b7d2a4cd39c28328a012300cd3cfa Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 15 May 2025 22:09:07 +0300 Subject: [PATCH 015/128] "D/D/D/D Great Dimension King Arc Crisis" fix Fixed some edge cases with the Pendulum effect where the player could Special Summon from the face-up Extra Deck and deliberately block the only Main Monster Zone that could've been used to Special Summon from the Main Deck. --- pre-release/c101302104.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua index 61deec5523..73710e3b3b 100644 --- a/pre-release/c101302104.lua +++ b/pre-release/c101302104.lua @@ -128,12 +128,20 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) if #sg==0 then return end local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) - for fup_c in fup:Iter() do - Duel.SpecialSummonStep(fup_c,0,tp,tp,false,false,POS_FACEUP) - end local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) - for fdown_main_c in fdown_main:Iter() do - Duel.SpecialSummonStep(fdown_main_c,0,tp,tp,false,false,POS_FACEUP) + local priority_0,priority_1 + if linkmz_ct Date: Thu, 15 May 2025 19:31:06 -0300 Subject: [PATCH 016/128] "Dark Magician of Destruction" fix Fixed a bug where it could be summoned using Spellcaster monsters that could not be banished --- pre-release/c100445001.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pre-release/c100445001.lua b/pre-release/c100445001.lua index 37a75a257b..b011e672b6 100644 --- a/pre-release/c100445001.lua +++ b/pre-release/c100445001.lua @@ -66,7 +66,8 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e1,tp) end function s.selfspcostfilter(c,tp,sc) - return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 + return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) + and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 end function s.selfspcon(e,c) if not c then return true end From 80e30952b7915d74daa03bda40ae96f34504482a Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Fri, 16 May 2025 13:02:05 +0200 Subject: [PATCH 017/128] added Triggered Lightning --- rush/c160021060.lua | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 rush/c160021060.lua diff --git a/rush/c160021060.lua b/rush/c160021060.lua new file mode 100644 index 0000000000..e2023d03d5 --- /dev/null +++ b/rush/c160021060.lua @@ -0,0 +1,57 @@ +--トリガード・ライトニング +--Triggered Lightning +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Increase ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={160008031} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end +end +function s.filter(c) + return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsNotMaximumModeSide() +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) end +end +function s.spfilter(c,e,tp) + return c:IsCode(160008031) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + if Duel.DiscardDeck(tp,2,REASON_COST)<1 then return end + --Effect + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + local tc=g:GetFirst() + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(300) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + --piercing + tc:AddPiercing(RESETS_STANDARD_PHASE_END,c) + local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp) + if #g2>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,LOCATION_HAND)==0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end \ No newline at end of file From bc7650f9ec4acb6b8c6f3a911329bc86c32b3a82 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 16 May 2025 10:22:37 -0300 Subject: [PATCH 018/128] Fix script errors with SetOperationInfo Fixed some cards that were not passing a group or passing an incorrect group in one of the arguments of this function, leading to script errors --- official/c11321089.lua | 2 +- official/c28126717.lua | 2 +- official/c30989084.lua | 2 +- official/c47710198.lua | 2 +- official/c61160289.lua | 5 +++-- official/c67797569.lua | 21 +++++++++------------ official/c75771170.lua | 4 ++-- official/c78348934.lua | 4 ++-- official/c98049934.lua | 4 ++-- 9 files changed, 22 insertions(+), 24 deletions(-) diff --git a/official/c11321089.lua b/official/c11321089.lua index da0e6428d1..386efce17f 100644 --- a/official/c11321089.lua +++ b/official/c11321089.lua @@ -72,7 +72,7 @@ function s.drdestg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return hc>0 and fc>0 and Duel.IsPlayerCanDraw(tp,hc) and #dg>=fc end Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,hc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,#dg,fc,1-tp,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,fc,1-tp,LOCATION_ONFIELD) end function s.drdesop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) diff --git a/official/c28126717.lua b/official/c28126717.lua index 60dec4d130..060d712549 100644 --- a/official/c28126717.lua +++ b/official/c28126717.lua @@ -42,7 +42,7 @@ function s.filter2(c,code) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,POS_FACEUP,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) diff --git a/official/c30989084.lua b/official/c30989084.lua index 41b06b6631..03bc10766b 100644 --- a/official/c30989084.lua +++ b/official/c30989084.lua @@ -100,7 +100,7 @@ function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local tc=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,tp,1,tp,1000) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,1000) end function s.rmvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() diff --git a/official/c47710198.lua b/official/c47710198.lua index 9b8c8d5e9e..8a64464e8f 100644 --- a/official/c47710198.lua +++ b/official/c47710198.lua @@ -115,7 +115,7 @@ function s.rmcon2(e,tp,eg,ep,ev,re,r,rp) end function s.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return re:GetHandler():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,re:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1200) end function s.rmop2(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c61160289.lua b/official/c61160289.lua index b657ca5e56..058fda5479 100644 --- a/official/c61160289.lua +++ b/official/c61160289.lua @@ -63,8 +63,9 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,e:GetHandler(),1-tp) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,1,tp,0,LOCATION_ONFIELD) + local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil) diff --git a/official/c67797569.lua b/official/c67797569.lua index 2ab8779f7e..981e1c8b6d 100644 --- a/official/c67797569.lua +++ b/official/c67797569.lua @@ -2,23 +2,22 @@ --Lavalval Salamander local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Synchro summon procedure + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner FIRE monsters Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_FIRE),1,99) - --If synchro summoned, draw 2 + --Draw 2 cards, then, if you have a FIRE monster in your hand, send 2 cards from your hand to the GY including a FIRE monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(s.drcon) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) - --Change opponent's monsters to face-down defense position + --Cchange face-up monsters your opponent controls, up to the number of "Laval" monsters you control, to face-down Defense Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_POSITION) @@ -31,9 +30,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_LAVAL} -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSynchroSummoned() -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) @@ -68,9 +64,10 @@ function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local sc=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_LAVAL),tp,LOCATION_MZONE,0,nil) - if chk==0 then return sc>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCanTurnSet),tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_POSITION,1,1,0,0) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_LAVAL),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCanTurnSet),tp,0,LOCATION_MZONE,nil) + if chk==0 then return ct>0 and #g>0 end + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_LAVAL),tp,LOCATION_MZONE,0,nil) diff --git a/official/c75771170.lua b/official/c75771170.lua index d30a20ea67..137ae017f3 100644 --- a/official/c75771170.lua +++ b/official/c75771170.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_names={16310544} --Mikanko Kagura +s.listed_names={16310544} --"Mikanko Kagura" s.listed_series={SET_MIKANKO} function s.eqcond(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,e:GetHandler(),SET_MIKANKO) @@ -50,7 +50,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) 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,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c78348934.lua b/official/c78348934.lua index 1d78a0fc23..f2ccfe51da 100644 --- a/official/c78348934.lua +++ b/official/c78348934.lua @@ -43,13 +43,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end local rg=aux.SelectUnselectGroup(g,e,tp,1,3,s.rescon,1,tp,HINTMSG_REMOVE) Duel.SetTargetCard(rg) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,0,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) if ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) local tc=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() if tc then local e1=Effect.CreateEffect(e:GetHandler()) diff --git a/official/c98049934.lua b/official/c98049934.lua index 19fec5647e..40461f5abf 100644 --- a/official/c98049934.lua +++ b/official/c98049934.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetOperation(s.qpovop) c:RegisterEffect(e3) end -s.listed_names={29599813} --Purrely Pretty Memory +s.listed_names={29599813} --"Purrely Pretty Memory" s.listed_series={SET_PURRELY} function s.negcon(e,tp,eg,ep,ev,re,r,rp) return e:IsHasType(EFFECT_TYPE_QUICK_O)==e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29599813) @@ -49,7 +49,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.negfilter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectTarget(tp,s.negfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() From 26adf05edd83d7c3450ec73305566ef5fcea2430 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 16 May 2025 11:32:58 -0300 Subject: [PATCH 019/128] "D/D/D Sky King Zeus Ragnarok" fix It was using an incorrect description for the additional Pendulum Summon --- pre-release/c101302107.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-release/c101302107.lua b/pre-release/c101302107.lua index 2b67de5580..b613a85209 100644 --- a/pre-release/c101302107.lua +++ b/pre-release/c101302107.lua @@ -60,7 +60,7 @@ function s.checkop(e,tp) local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) if lpz~=nil and lpz:GetFlagEffect(id)<=0 then local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) + e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC_G) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) @@ -78,7 +78,7 @@ function s.checkop(e,tp) and olpz:GetFlagEffectLabel(31531170)==orpz:GetFieldID() and orpz:GetFlagEffectLabel(31531170)==olpz:GetFieldID() then local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetDescription(aux.Stringid(id,2)) + e2:SetDescription(aux.Stringid(id,3)) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC_G) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE) From 394d2812778d0f2da9910ddc52bbe5fb04d531ee Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Fri, 16 May 2025 16:34:01 +0200 Subject: [PATCH 020/128] Filter out cards with level zero from being possible synchro materials --- proc_synchro.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proc_synchro.lua b/proc_synchro.lua index bb68de7d3b..ed7247121c 100644 --- a/proc_synchro.lua +++ b/proc_synchro.lua @@ -104,6 +104,7 @@ function Synchro.Condition(f1,min1,max1,f2,min2,max2,sub1,sub2,req1,req2,reqm) g=dg:Filter(Card.IsCanBeSynchroMaterial,nil,c) mgchk=false end + g:Remove(function(c,sc)return c:GetSynchroLevel(sc) < 1 end,nil,c) local pg=Auxiliary.GetMustBeMaterialGroup(tp,dg,tp,c,g,REASON_SYNCHRO) if not g:Includes(pg) or pg:IsExists(aux.NOT(Card.IsCanBeSynchroMaterial),1,nil,c) then return false end if smat then @@ -485,6 +486,7 @@ function Synchro.Target(f1,min1,max1,f2,min2,max2,sub1,sub2,req1,req2,reqm) dg=Duel.GetMatchingGroup(synchmatfilter,tp,LOCATION_MZONE|LOCATION_HAND,LOCATION_MZONE,c) g=dg:Filter(Card.IsCanBeSynchroMaterial,nil,c) end + g:Remove(function(c,sc)return c:GetSynchroLevel(sc) < 1 end,nil,c) local pg=Auxiliary.GetMustBeMaterialGroup(tp,dg,tp,c,g,REASON_SYNCHRO) if smat then pg:Merge(smat) @@ -889,6 +891,7 @@ function Synchro.MajesticCondition(f1,cbt1,f2,cbt2,f3,cbt3,...) dg=Duel.GetMatchingGroup(function(mc) return mc:IsFaceup() and (mc:IsControler(tp) or mc:IsCanBeSynchroMaterial(c)) end,tp,LOCATION_MZONE,LOCATION_MZONE,c) g=dg:Filter(Card.IsCanBeSynchroMaterial,nil,c) end + g:Remove(function(c,sc)return c:GetSynchroLevel(sc) < 1 end,nil,c) local pg=Auxiliary.GetMustBeMaterialGroup(tp,dg,tp,c,g,REASON_SYNCHRO) if not g:Includes(pg) or pg:IsExists(aux.NOT(Card.IsCanBeSynchroMaterial),1,nil,c) then return false end if smat then @@ -934,6 +937,7 @@ function Synchro.MajesticTarget(f1,cbt1,f2,cbt2,f3,cbt3,...) dg=Duel.GetMatchingGroup(function(mc) return mc:IsFaceup() and (mc:IsControler(tp) or mc:IsCanBeSynchroMaterial(c)) end,tp,LOCATION_MZONE,LOCATION_MZONE,c) g=dg:Filter(Card.IsCanBeSynchroMaterial,nil,c) end + g:Remove(function(c,sc)return c:GetSynchroLevel(sc) < 1 end,nil,c) local pg=Auxiliary.GetMustBeMaterialGroup(tp,dg,tp,c,g,REASON_SYNCHRO) if smat then pg:Merge(smat) From 5e26fa499e53a5955df05b99a7b1885b936f88f2 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 16 May 2025 13:15:13 -0300 Subject: [PATCH 021/128] "World Legacy Monstrosity" fix --- official/c14604710.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c14604710.lua b/official/c14604710.lua index e39344f3d8..405035d3e2 100644 --- a/official/c14604710.lua +++ b/official/c14604710.lua @@ -50,7 +50,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetProperty(0) e:SetOperation(s.spop1) s.sptg1(e,tp,eg,ep,ev,re,r,rp,1) - else + elseif op==2 e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetOperation(s.spop2) s.sptg2(e,tp,eg,ep,ev,re,r,rp,1) From e1cbc8219c627e13e849527eec84a65a62c9f417 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 16 May 2025 13:16:34 -0300 Subject: [PATCH 022/128] update c14604710.lua missing keyword in a previous change --- official/c14604710.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c14604710.lua b/official/c14604710.lua index 405035d3e2..39880ead96 100644 --- a/official/c14604710.lua +++ b/official/c14604710.lua @@ -50,7 +50,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetProperty(0) e:SetOperation(s.spop1) s.sptg1(e,tp,eg,ep,ev,re,r,rp,1) - elseif op==2 + elseif op==2 then e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetOperation(s.spop2) s.sptg2(e,tp,eg,ep,ev,re,r,rp,1) From b5da12a7c0b334311c1db3a75819fb49dac80003 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 16 May 2025 13:22:56 -0300 Subject: [PATCH 023/128] "Cybernetic Zone" fix Fixed an incorrect interaction of the effect to double the ATK of the monster returned to the field with other ATK/DEF modifiers --- official/c47295267.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/official/c47295267.lua b/official/c47295267.lua index debe6e7dee..48fecb434a 100644 --- a/official/c47295267.lua +++ b/official/c47295267.lua @@ -2,8 +2,9 @@ --Cybernetic Zone local s,id=GetID() function s.initial_effect(c) - --remove + --Banish 1 Machine Fusion Monster you control until the End Phase local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -20,7 +21,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -38,10 +39,11 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if Duel.ReturnToField(e:GetLabelObject()) then + --Its ATK is doubled local e1=Effect.CreateEffect(e:GetOwner()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetBaseAttack()*2) + e1:SetValue(tc:GetAttack()*2) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetOwner()) From 9b63f675589743217390327bf79f0b7cf40eb7f1 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Sat, 17 May 2025 12:56:21 +0200 Subject: [PATCH 024/128] added Mormolith --- proc_rush.lua | 2 +- rush/c160021027.lua | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 rush/c160021027.lua diff --git a/proc_rush.lua b/proc_rush.lua index d2422cc80a..fb27c47521 100644 --- a/proc_rush.lua +++ b/proc_rush.lua @@ -10,7 +10,7 @@ local LEGEND_LIST={160001000,160205001,160418001,160002000,160421015,160404001,1 160210058,160440010,160016033,160016034,160440011,160211080,160402039,160017033,160402040,160429003,160320014, 160320038,160018036,160212004,160212003,160402044,160212075,160212001,160402045,160019063,160019064,160019065, 160213078,160213082,160402047,160213084,160020059,160213076,160020001,160020040,160020000,160214052,160323029, -160214020,160021065} +160214020,160021065,160021027} -- Returns if a card is a Legend. Can be updated if a GetOT function is added to the core function Card.IsLegend(c) return c:IsHasEffect(EFFECT_IS_LEGEND) or c:IsOriginalCode(table.unpack(LEGEND_LIST)) diff --git a/rush/c160021027.lua b/rush/c160021027.lua new file mode 100644 index 0000000000..7cb0e4f68f --- /dev/null +++ b/rush/c160021027.lua @@ -0,0 +1,36 @@ +--モーム +--Mormolith +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Destroy 1 EARTH monster + 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) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.filter(c) + return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsMaximumModeSide() +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) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desfilter(c,atk) + return c:IsFaceup() and c:IsDefenseBelow(atk) and not c:IsMaximumMode() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + local g2=Duel.GetMatchingGroup(s.desfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil,g:GetFirst():GetAttack()) + g:Merge(g2) + Duel.Destroy(g,REASON_EFFECT) +end \ No newline at end of file From 84b3ba6084b0acafbcc3ec81f6a398643fb4590e Mon Sep 17 00:00:00 2001 From: Naim Date: Sat, 17 May 2025 12:25:07 -0300 Subject: [PATCH 025/128] Update c31786838.lua --- official/c31786838.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/official/c31786838.lua b/official/c31786838.lua index 67a3efbdf6..36928d7bd6 100644 --- a/official/c31786838.lua +++ b/official/c31786838.lua @@ -49,6 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local alt=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_REGENESIS),tp,LOCATION_MZONE,0,1,nil) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,alt):GetFirst() + if not sc then return end if sc:IsSetCard(SET_REGENESIS) then aux.ToHandOrElse(sc,tp) else @@ -72,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 From 064406c28cbedd72227026bbed2b6717e3cca9ea Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 18 May 2025 05:43:13 -0300 Subject: [PATCH 026/128] "Pendulum Call" update Updated the selection procedure to make so the player is allowed to unselect the first card and restart the process --- official/c53208660.lua | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/official/c53208660.lua b/official/c53208660.lua index 5bce883524..df5c9fb02e 100644 --- a/official/c53208660.lua +++ b/official/c53208660.lua @@ -2,8 +2,9 @@ --Pendulum Call local s,id=GetID() function s.initial_effect(c) - --Activate + --Add 2 "Magician" monsters with different names from your Deck to your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -19,7 +20,7 @@ s.listed_series={SET_MAGICIAN} function s.chainfilter(re,tp,cid) local rc=re:GetHandler() local loc=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION) - return not (re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and not re:IsHasType(EFFECT_TYPE_ACTIVATE) + return not (re:GetActiveType()==(TYPE_PENDULUM|TYPE_SPELL) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) and (loc&LOCATION_PZONE)==LOCATION_PZONE and rc:IsSetCard(SET_MAGICIAN)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -41,15 +42,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetClassCount(Card.GetCode)>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=g:Select(tp,1,1,nil) - g1:Merge(g2) - Duel.SendtoHand(g1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g1) + if #g>=2 then + local thg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_ATOHAND) + if #thg>0 then + Duel.SendtoHand(thg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,thg) + end end if e:IsHasType(EFFECT_TYPE_ACTIVATE) then local e1=Effect.CreateEffect(e:GetHandler()) From 10ebf647c8e030d4b6a8de886b64aaeac66463b2 Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 18 May 2025 05:52:22 -0300 Subject: [PATCH 027/128] "Ghostrick Shot" fix Fixed a bug where it would be possible to activate the GY effect even if "Ghostrick Shot" was the only "Ghostrick" card in the GY --- official/c69809989.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/official/c69809989.lua b/official/c69809989.lua index db76624363..fd0748317f 100644 --- a/official/c69809989.lua +++ b/official/c69809989.lua @@ -53,18 +53,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -function s.xyzfilter(c,tp) +function s.xyzfilter(c,tp,exc) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_GHOSTRICK) - and Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c) + and Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_GRAVE,0,1,exc,tp,c) end function s.attachfilter(c,tp,xyzc) return c:IsSetCard(SET_GHOSTRICK) and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp,c) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) end function s.matop(e,tp,eg,ep,ev,re,r,rp) From a8b2f9e1521f7fe6ca9f8385a0468df35febc407 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Mon, 19 May 2025 18:56:24 +0200 Subject: [PATCH 028/128] added new rush cards --- rush/c160021036.lua | 4 ++-- rush/c160455005.lua | 44 ++++++++++++++++++++++++++++++++++++++++++++ rush/c160455006.lua | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 rush/c160455005.lua create mode 100644 rush/c160455006.lua diff --git a/rush/c160021036.lua b/rush/c160021036.lua index 69d5e6b454..688be08c18 100644 --- a/rush/c160021036.lua +++ b/rush/c160021036.lua @@ -28,11 +28,11 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) --Effect Duel.DiscardDeck(tp,4,REASON_EFFECT) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,nil,e,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end \ No newline at end of file diff --git a/rush/c160455005.lua b/rush/c160455005.lua new file mode 100644 index 0000000000..713e8210a2 --- /dev/null +++ b/rush/c160455005.lua @@ -0,0 +1,44 @@ +--海影のモミュ +--Momyu the Sea Shadow Spirit +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Take control of an opponent's face-down monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + 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) +end +function s.ctrlfilter(c) + return c:IsFacedown() and c:IsControlerCanBeChanged() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,nil) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + local cg=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,2,nil) + if Duel.SendtoGrave(cg,REASON_COST)<1 then return end + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local dg=Duel.SelectMatchingCard(tp,s.ctrlfilter,tp,0,LOCATION_MZONE,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.GetControl(dg,tp) + end +end \ No newline at end of file diff --git a/rush/c160455006.lua b/rush/c160455006.lua new file mode 100644 index 0000000000..88163ef28a --- /dev/null +++ b/rush/c160455006.lua @@ -0,0 +1,45 @@ +--幻遭のキメラスネーク +--Mythical Chimera Snake +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + 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) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,1-tp,LOCATION_GRAVE) +end +function s.cfilter(c) + return c:IsLocation(LOCATION_GRAVE) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + if Duel.DiscardDeck(tp,2,REASON_COST)<0 then return end + local og=Duel.GetOperatedGroup() + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,2,nil) + Duel.HintSelection(g) + if #g==0 then return end + local ct=og:FilterCount(s.cfilter,nil) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and ct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.Damage(1-tp,400,REASON_EFFECT) + end +end \ No newline at end of file From 230c7f057e7c4f81037c386f7dad8d4a56bf1eae Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 20 May 2025 13:21:56 +0200 Subject: [PATCH 029/128] added Alpiris the Nurturer --- rush/c160021041.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 rush/c160021041.lua diff --git a/rush/c160021041.lua b/rush/c160021041.lua new file mode 100644 index 0000000000..096efd25c7 --- /dev/null +++ b/rush/c160021041.lua @@ -0,0 +1,36 @@ +--育みのアルピリス +--Alpiris the Nurturer +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon procedure + c:EnableReviveLimit() + Fusion.AddProcMix(c,true,true,160011019,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PLANT)) + --Gain LP + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_RECOVER) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.named_material={160011019} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(600) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + if Duel.DiscardDeck(tp,3,REASON_COST)<1 then return end + --Effect + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Recover(p,d,REASON_EFFECT) +end \ No newline at end of file From b87ea2526806991002831e5952e7d058ddedab0a Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 21 May 2025 11:36:17 +0200 Subject: [PATCH 030/128] added new double trib flag --- proc_rush.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/proc_rush.lua b/proc_rush.lua index fb27c47521..c63506ed4c 100644 --- a/proc_rush.lua +++ b/proc_rush.lua @@ -138,6 +138,7 @@ FLAG_DOUBLE_TRIB_LEGEND=160212047 -- Legend Scout FLAG_DOUBLE_TRIB_FAIRY=160019009 -- Dice Key Lilith FLAG_DOUBLE_TRIB_OBLIVION=160020004 -- Chaos Coolstars FLAG_DOUBLE_TRIB_REQUIEM=160020104 +FLAG_DOUBLE_TRIB_EARTH=160021008 --Mamabot function Card.AddDoubleTribute(c,id,otfilter,eftg,reset,...) for i,flag in ipairs{...} do c:RegisterFlagEffect(flag,reset,0,1) From 6e241443b4c0aae83dc828f93de18d0a5c67f7d7 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 21 May 2025 14:05:57 +0200 Subject: [PATCH 031/128] added new rush cards --- rush/c160021007.lua | 22 ++++++++++++++++ rush/c160021008.lua | 44 ++++++++++++++++++++++++++++++++ rush/c160021009.lua | 53 ++++++++++++++++++++++++++++++++++++++ rush/c160021010.lua | 52 +++++++++++++++++++++++++++++++++++++ rush/c160021011.lua | 51 +++++++++++++++++++++++++++++++++++++ rush/c160021038.lua | 40 +++++++++++++++++++++++++++++ rush/c160021039.lua | 62 +++++++++++++++++++++++++++++++++++++++++++++ rush/c160021051.lua | 49 +++++++++++++++++++++++++++++++++++ rush/c160021052.lua | 35 +++++++++++++++++++++++++ rush/c160021053.lua | 45 ++++++++++++++++++++++++++++++++ rush/c160021063.lua | 49 +++++++++++++++++++++++++++++++++++ 11 files changed, 502 insertions(+) create mode 100644 rush/c160021007.lua create mode 100644 rush/c160021008.lua create mode 100644 rush/c160021009.lua create mode 100644 rush/c160021010.lua create mode 100644 rush/c160021011.lua create mode 100644 rush/c160021038.lua create mode 100644 rush/c160021039.lua create mode 100644 rush/c160021051.lua create mode 100644 rush/c160021052.lua create mode 100644 rush/c160021053.lua create mode 100644 rush/c160021063.lua diff --git a/rush/c160021007.lua b/rush/c160021007.lua new file mode 100644 index 0000000000..6152ecb2c0 --- /dev/null +++ b/rush/c160021007.lua @@ -0,0 +1,22 @@ +--育みのアルピリス +--Mecha Tamabot +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Name becomes "Tamabot" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_GRAVE|LOCATION_MZONE) + e1:SetValue(CARD_TAMABOT) + c:RegisterEffect(e1) + --Can be treated as 2 materials + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(id) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(2) + c:RegisterEffect(e2) +end \ No newline at end of file diff --git a/rush/c160021008.lua b/rush/c160021008.lua new file mode 100644 index 0000000000..7b59ae80ba --- /dev/null +++ b/rush/c160021008.lua @@ -0,0 +1,44 @@ +--ママボット +--Mamabot +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Add to the hand 1 "Yellow Gadget" from the GY + 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:SetCountLimit(1) + e1:SetCondition(function(e)return e:GetHandler():IsStatus(STATUS_SUMMON_TURN)end) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_TAMABOT} +function s.thfilter(c) + return c:IsCode(CARD_TAMABOT) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + if c:CanBeDoubleTribute(FLAG_DOUBLE_TRIB_EARTH,FLAG_DOUBLE_TRIB_MACHINE) then + c:AddDoubleTribute(id,s.otfilter,s.eftg,RESETS_STANDARD_PHASE_END,FLAG_DOUBLE_TRIB_EARTH+FLAG_DOUBLE_TRIB_MACHINE) + end + end +end +function s.otfilter(c,tp) + return c:IsDoubleTribute(FLAG_DOUBLE_TRIB_EARTH+FLAG_DOUBLE_TRIB_MACHINE) and (c:IsControler(tp) or c:IsFaceup()) +end +function s.eftg(e,c) + return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelAbove(7) and c:IsSummonableCard() +end \ No newline at end of file diff --git a/rush/c160021009.lua b/rush/c160021009.lua new file mode 100644 index 0000000000..17205e31a8 --- /dev/null +++ b/rush/c160021009.lua @@ -0,0 +1,53 @@ +--ガマボット +--Gamabot +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Excavate the top 6 cards of your Deck and add cards to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_TAMABOT,160021053} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAttackPos() and c:IsCanChangePositionRush() end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=6 end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.filter(c) + return c:IsCode(CARD_TAMABOT,160021053) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + if Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,0,0,0)<1 then return end + --Effect + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<6 then return end + Duel.ConfirmDecktop(tp,6) + local g=Duel.GetDecktopGroup(tp,6) + Duel.DisableShuffleCheck() + if g:IsExists(s.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tg=g:FilterSelect(tp,s.filter,1,2,nil) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,tg) + Duel.ShuffleHand(tp) + g:RemoveCard(tg) + end + end + local ct=#g + if ct>0 then + Duel.MoveToDeckBottom(ct,tp) + Duel.SortDeckbottom(tp,tp,ct) + end +end diff --git a/rush/c160021010.lua b/rush/c160021010.lua new file mode 100644 index 0000000000..bfccf9295d --- /dev/null +++ b/rush/c160021010.lua @@ -0,0 +1,52 @@ +--オータマボット +--King Tamabot +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Name change + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_TAMABOT} +function s.cost(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 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsCode(CARD_TAMABOT) end +end +function s.thfilter(c) + return c:IsCode(CARD_TAMABOT) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoGrave(g,REASON_COST)==0 then return end + --Effect + local c=e:GetHandler() + --Name becomes "Tamabot" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_TAMABOT) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,2,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 diff --git a/rush/c160021011.lua b/rush/c160021011.lua new file mode 100644 index 0000000000..770bfb44ff --- /dev/null +++ b/rush/c160021011.lua @@ -0,0 +1,51 @@ +--タマタンクMk-II +--Tamatank Mk-II +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Destroy + 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) + e1:SetCondition(function(e)return e:GetHandler():IsStatus(STATUS_SUMMON_TURN)end) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_TAMABOT} +function s.cfilter(c) + return c:IsFaceup() and c:IsCode(CARD_TAMABOT) and c:IsAbleToGraveAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNotMaximumModeSide),tp,0,LOCATION_ONFIELD,1,nil) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + if Duel.SendtoGrave(g,REASON_COST)<1 then return end + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsNotMaximumModeSide),tp,0,LOCATION_ONFIELD,1,1,nil) + if #dg>0 then + local dg2=dg:AddMaximumCheck() + Duel.HintSelection(dg2) + local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil) + if Duel.Destroy(dg,REASON_EFFECT)>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sg=g2:Select(tp,1,1,nil) + Duel.HintSelection(sg) + if #sg>0 then + Duel.BreakEffect() + Duel.Destroy(sg,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/rush/c160021038.lua b/rush/c160021038.lua new file mode 100644 index 0000000000..75c434dc36 --- /dev/null +++ b/rush/c160021038.lua @@ -0,0 +1,40 @@ +--タマーボット・ブーストドラゴン +--Tamabot Boost Dragon +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Fusion Materials + c:EnableReviveLimit() + Fusion.AddProcMix(c,true,true,CARD_REDBOOT_B_DRAGON,CARD_TAMABOT) + --Increase ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_REDBOOT_B_DRAGON,CARD_TAMABOT} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end + --Effect + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1000) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,CARD_TAMABOT) + if ct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.Damage(1-tp,ct*300,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/rush/c160021039.lua b/rush/c160021039.lua new file mode 100644 index 0000000000..32581f9ee2 --- /dev/null +++ b/rush/c160021039.lua @@ -0,0 +1,62 @@ +--T・K・G +--Tamabot King Golem +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Fusion Procedure + c:EnableReviveLimit() + local e0=Fusion.AddProcMixN(c,true,true,CARD_TAMABOT,3)[1] + e0:SetDescription(aux.Stringid(id,2)) + local e1=Fusion.AddProcMix(c,true,true,CARD_TAMABOT,s.ffilter)[1] + e1:SetDescription(aux.Stringid(id,3)) + --Make 1 monster lose 600 ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(s.cost) + e2:SetTarget(s.target) + e2:SetOperation(s.operation) + c:RegisterEffect(e2) +end +s.listed_names={CARD_TAMABOT} +function s.ffilter(c,fc,sumtype,tp) + return c:IsCode(CARD_TAMABOT) and c:IsHasEffect(160021007) +end +function s.tdfilter(c) + return c:IsMonster() and c:IsCode(CARD_TAMABOT) and c:IsAbleToDeckAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNotMaximumModeSide,tp,LOCATION_MZONE,0,1,nil) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local tg=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.HintSelection(tg) + if Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_COST)<1 then return end + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local g=Duel.SelectMatchingCard(tp,Card.IsNotMaximumModeSide,tp,LOCATION_MZONE,0,1,3,nil) + Duel.HintSelection(g) + for tc in g:Iter() do + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetDescription(3001) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_CLIENT_HINT|EFFECT_FLAG_SET_AVAILABLE) + e1:SetRange(LOCATION_MZONE) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + e1:SetValue(1) + tc:RegisterEffect(e1) + end + if c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_FUSION) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Recover(tp,2000,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/rush/c160021051.lua b/rush/c160021051.lua new file mode 100644 index 0000000000..6a23b888f3 --- /dev/null +++ b/rush/c160021051.lua @@ -0,0 +1,49 @@ +--ストライク・タマーボーリング +--Strike Tamabowling +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Gain ATK and piercing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_TAMABOT} +function s.filter1(c) + return c:IsFaceup() and c:IsCode(CARD_TAMABOT) +end +function s.filter2(c) + return c:IsFaceup() and c:IsAttackAbove(100) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FilterMaximumSideFunctionEx(s.filter1),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FilterMaximumSideFunctionEx(s.filter2),tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g1=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(s.filter1),tp,LOCATION_MZONE,0,1,1,nil) + if #g1==0 then return end + Duel.HintSelection(g1) + local tc=g1:GetFirst() + local g2=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(s.filter2),tp,0,LOCATION_MZONE,1,1,nil) + if #g2==0 then return end + Duel.HintSelection(g2) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetValue(g2:GetFirst():GetAttack()) + e1:SetRange(LOCATION_MZONE) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + tc:AddPiercing(RESETS_STANDARD_PHASE_END,c) +end \ No newline at end of file diff --git a/rush/c160021052.lua b/rush/c160021052.lua new file mode 100644 index 0000000000..e9ba8033ed --- /dev/null +++ b/rush/c160021052.lua @@ -0,0 +1,35 @@ +--タマランチャー +--Tamalauncher +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Draw + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.cfilter(c) + return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end +end +function s.target(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) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + if Duel.SendtoGrave(tc,REASON_COST)==1 and Duel.Draw(tp,1,REASON_EFFECT)>0 + and tc:IsLocation(LOCATION_GRAVE) and tc:IsLevel(1) and tc:IsAttack(200) and tc:IsDefense(0) + and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end +end diff --git a/rush/c160021053.lua b/rush/c160021053.lua new file mode 100644 index 0000000000..d7f33df8e0 --- /dev/null +++ b/rush/c160021053.lua @@ -0,0 +1,45 @@ +--タマー・ボンド +--Tama Bond +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Treat Level 7 Earth Machines as different names + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetCode(EFFECT_ADD_CODE) + e0:SetRange(LOCATION_HAND|LOCATION_SZONE) + e0:SetTargetRange(LOCATION_MZONE,0) + e0:SetTarget(function(_,c)return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevel(7) end) + e0:SetValue(CARD_BLUETOOTH_B_DRAGON) + e0:SetOperation(s.chngcon) + c:RegisterEffect(e0) + local e1=e0:Clone() + e1:SetValue(CARD_REDBOOT_B_DRAGON) + c:RegisterEffect(e1) + --Activate + local e2=Fusion.RegisterSummonEff(c,aux.FilterBoolFunction(s.fusfilter),Fusion.OnFieldMat(Card.IsFaceup),nil,nil,nil,s.stage2) + e2:SetCondition(s.condition) + c:RegisterEffect(e2) +end +s.listed_names={CARD_BLUETOOTH_B_DRAGON,CARD_REDBOOT_B_DRAGON} +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.fusfilter(c) + return c:IsRace(RACE_DRAGON|RACE_MACHINE) +end +function s.stage2(e,tc,tp,sg,chk) + if chk~=1 then return end + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(200) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) +end +function s.cfilter(c) + return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) +end \ No newline at end of file diff --git a/rush/c160021063.lua b/rush/c160021063.lua new file mode 100644 index 0000000000..15504b1b1e --- /dev/null +++ b/rush/c160021063.lua @@ -0,0 +1,49 @@ +--タマタマバンボーン +--Tamatamabangborn +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Send the top card to the GY and Special Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_DESTROYED) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_TAMABOT} +function s.cfilter(c,tp) + return c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) + and c:IsPreviousLocation(LOCATION_MZONE) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.cfilter,1,nil,tp) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end + Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsCode(CARD_TAMABOT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + Duel.DiscardDeck(tp,1,REASON_EFFECT) + if #Duel.GetOperatedGroup()~=1 then return end + local ft=Duel.GetMZoneCount(tp) + if ft<=0 then return end + if ft>=3 then ft=3 end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + if #sg>0 and ft>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local ssg=sg:Select(tp,1,ft,nil) + if #ssg>0 then + Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file From 2b8e2f787f2561e75ed46a86ee6c742e5a138058 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 21 May 2025 21:14:34 +0300 Subject: [PATCH 032/128] Added new card scripts --- pre-release/c100201001.lua | 35 ++++++++++++++++++++++++ pre-release/c100201002.lua | 31 +++++++++++++++++++++ pre-release/c100201003.lua | 56 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 pre-release/c100201001.lua create mode 100644 pre-release/c100201002.lua create mode 100644 pre-release/c100201003.lua diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua new file mode 100644 index 0000000000..f1982fbbae --- /dev/null +++ b/pre-release/c100201001.lua @@ -0,0 +1,35 @@ +--契約を結びし竜の戦士 +--Dragonic Warrior +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Discard(function(c,e,tp) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) end)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) 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)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua new file mode 100644 index 0000000000..9b0c446078 --- /dev/null +++ b/pre-release/c100201002.lua @@ -0,0 +1,31 @@ +--アイン・ロイド +--Einroid +local s,id=GetID() +function s.initial_effect(c) + --Send 2 Level 4 or lower Machine monsters from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) +end +function s.tgfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,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,2,2,nil) + if #g==2 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua new file mode 100644 index 0000000000..35f72f4627 --- /dev/null +++ b/pre-release/c100201003.lua @@ -0,0 +1,56 @@ +--妖魔ヌリカベ +--Nurikabe +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCondition(aux.exccon) + e1:SetCost(Cost.PayLP(1000)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + for sc in Group.FromCards(c,tc):Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(c) + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + sc:RegisterEffect(e1,true) + end + end + end + Duel.SpecialSummonComplete() +end \ No newline at end of file From 0c1ea6203beb9da595a00d0aee150bc1ecffb2ed Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 21 May 2025 21:24:04 +0300 Subject: [PATCH 033/128] Update c100201001.lua --- pre-release/c100201001.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua index f1982fbbae..8ee5fa9d59 100644 --- a/pre-release/c100201001.lua +++ b/pre-release/c100201001.lua @@ -9,15 +9,22 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(Cost.Discard(function(c,e,tp) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) end)) + e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={id} +function s.spcostfilter(c,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) +end function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) +end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end @@ -32,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sc:NegateEffects(e:GetHandler()) end Duel.SpecialSummonComplete() -end \ No newline at end of file +end From 6db66a4622c50a3572b514edb183ee158b2689e9 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 21 May 2025 22:58:20 +0200 Subject: [PATCH 034/128] fixed Tama Bond --- rush/c160021053.lua | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/rush/c160021053.lua b/rush/c160021053.lua index d7f33df8e0..2792b5c561 100644 --- a/rush/c160021053.lua +++ b/rush/c160021053.lua @@ -4,18 +4,19 @@ local s,id=GetID() function s.initial_effect(c) --Treat Level 7 Earth Machines as different names - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetCode(EFFECT_ADD_CODE) - e0:SetRange(LOCATION_HAND|LOCATION_SZONE) - e0:SetTargetRange(LOCATION_MZONE,0) - e0:SetTarget(function(_,c)return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevel(7) end) - e0:SetValue(CARD_BLUETOOTH_B_DRAGON) - e0:SetOperation(s.chngcon) - c:RegisterEffect(e0) - local e1=e0:Clone() - e1:SetValue(CARD_REDBOOT_B_DRAGON) - c:RegisterEffect(e1) + aux.GlobalCheck(s,function() + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetCode(EFFECT_ADD_CODE) + e0:SetTargetRange(LOCATION_MZONE,0) + e0:SetTarget(function(_,c)return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevel(7) end) + e0:SetValue(CARD_BLUETOOTH_B_DRAGON) + e0:SetOperation(s.chngcon) + Duel.RegisterEffect(e0,0) + local e1=e0:Clone() + e1:SetValue(CARD_REDBOOT_B_DRAGON) + Duel.RegisterEffect(e1,0) + end) --Activate local e2=Fusion.RegisterSummonEff(c,aux.FilterBoolFunction(s.fusfilter),Fusion.OnFieldMat(Card.IsFaceup),nil,nil,nil,s.stage2) e2:SetCondition(s.condition) From b9df74274c6ac1066532be2ec2635b73675c3949 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Thu, 22 May 2025 06:38:42 +0200 Subject: [PATCH 035/128] fixed Tama Bond --- rush/c160021053.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rush/c160021053.lua b/rush/c160021053.lua index 2792b5c561..5587887c9c 100644 --- a/rush/c160021053.lua +++ b/rush/c160021053.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_FIELD) e0:SetCode(EFFECT_ADD_CODE) - e0:SetTargetRange(LOCATION_MZONE,0) + e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e0:SetTarget(function(_,c)return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevel(7) end) e0:SetValue(CARD_BLUETOOTH_B_DRAGON) e0:SetOperation(s.chngcon) From 158cf37845a6bce84c872b6ffcec6cd3f2e431ff Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 22 May 2025 18:36:50 +0800 Subject: [PATCH 036/128] fix "Night Dragolich" - should not affect monsters Special Summoned from locations other than the Main or Extra Deck - modernization updates --- official/c88724332.lua | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/official/c88724332.lua b/official/c88724332.lua index cbb980200a..bc304bb16c 100644 --- a/official/c88724332.lua +++ b/official/c88724332.lua @@ -2,28 +2,18 @@ --Night Dragolich local s,id=GetID() function s.initial_effect(c) - --position change + --Change all non-Wyrm Attack Position monsters that were Special Summoned from the Main or Extra Deck to Defense Position local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SET_POSITION) e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.target) + e1:SetTarget(function(e,c) return c:IsFaceup() and not c:IsRace(RACE_WYRM) and c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) end) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetValue(POS_FACEUP_DEFENSE) c:RegisterEffect(e1) - --defense decrease - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) + --All non-Wyrm monsters that were Special Summoned from the Main or Extra Deck lose DEF equal to their original DEF + local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(s.target) - e2:SetValue(s.defval) + e2:SetValue(function(e,c) return -c:GetBaseDefense() end) c:RegisterEffect(e2) end -function s.target(e,c) - return c:IsFaceup() and not c:IsRace(RACE_WYRM) and c:IsSpecialSummoned() and (c:GetSummonLocation()&LOCATION_DECK|LOCATION_EXTRA)~=0 -end -function s.defval(e,c) - return -c:GetBaseDefense() -end \ No newline at end of file From 34b92d0b6093981103e536ce8cc75dbc282f8f17 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Fri, 23 May 2025 14:47:46 +0200 Subject: [PATCH 037/128] added new rush cards --- rush/c160021043.lua | 51 +++++++++++++++++++++++++++++ rush/c160021044.lua | 80 +++++++++++++++++++++++++++++++++++++++++++++ rush/c160021049.lua | 57 ++++++++++++++++++++++++++++++++ rush/c160021059.lua | 23 +++++++++++++ 4 files changed, 211 insertions(+) create mode 100644 rush/c160021043.lua create mode 100644 rush/c160021044.lua create mode 100644 rush/c160021049.lua create mode 100644 rush/c160021059.lua diff --git a/rush/c160021043.lua b/rush/c160021043.lua new file mode 100644 index 0000000000..74f6543d2e --- /dev/null +++ b/rush/c160021043.lua @@ -0,0 +1,51 @@ +--サイバー・サベイランス・ドラゴン +--Cyber Surveillance Dragon +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon procedure + c:EnableReviveLimit() + Fusion.AddProcMix(c,true,true,160402022,CARD_CYBER_DRAGON) + --Fusion Summon + local params = {s.filter,s.mfilter,s.fextra,Fusion.ShuffleMaterial,nil,s.stage2,nil,nil,nil,nil,nil,nil,nil,3} + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(Fusion.SummonEffTG(table.unpack(params))) + e1:SetOperation(s.operation(Fusion.SummonEffOP(table.unpack(params)))) + c:RegisterEffect(e1) +end +function s.filter(c) + return c:IsLevel(10) and c:IsRace(RACE_MACHINE) +end +function s.mfilter(c) + return c:IsLocation(LOCATION_GRAVE|LOCATION_MZONE) and c:IsCode(CARD_CYBER_DRAGON) and c:IsAbleToDeck() +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil) +end +function s.stage2(e,tc,tp,sg,chk) + if chk~=1 then return end + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(600) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END) + tc:RegisterEffect(e1,true) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAttackPos() and c:IsCanChangePositionRush() end +end +function s.operation(fusop) + return function(e,tp,eg,ep,ev,re,r,rp) + --Requirement + if Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,0,0,0)<1 then return end + --Effect + fusop(e,tp,eg,ep,ev,re,r,rp) + end +end \ No newline at end of file diff --git a/rush/c160021044.lua b/rush/c160021044.lua new file mode 100644 index 0000000000..8c28325a70 --- /dev/null +++ b/rush/c160021044.lua @@ -0,0 +1,80 @@ +--ハーピィ・レディ3・1 +--Harpie Lady 3 & 1 +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Fusion Procedure + c:EnableReviveLimit() + Fusion.AddProcMixN(c,true,true,54415063,1,s.ffilter,1) + Fusion.AddContactProc(c,s.contactfil,s.contactop,nil,nil,SUMMON_TYPE_FUSION,nil,false) + c:GetMetatable().material={160208006} + --Name change + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_HARPIE_LADY,54415063} +s.named_material={54415063} +function s.ffilter(c,fc,sumtype,tp) + return c:IsRace(RACE_WINGEDBEAST,fc,sumtype,tp) and c:IsLevelBelow(4) +end +function s.contactfil(tp) + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToDeckOrExtraAsCost),tp,LOCATION_ONFIELD,0,nil) +end +function s.contactop(g,tp) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsCode(CARD_HARPIE_LADY) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + -- Requirement + if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end + --Effect + local c=e:GetHandler() + --Name becomes "Harpie Lady" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_HARPIE_LADY) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + --can only attack twice + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) + e2:SetTargetRange(0,LOCATION_MZONE) + e2:SetCondition(s.atkcon) + e2:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e2,tp) + local e3=Effect.CreateEffect(e:GetHandler()) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetOperation(s.checkop) + e3:SetReset(RESET_PHASE|PHASE_END,2) + e3:SetLabelObject(e2) + Duel.RegisterEffect(e3,tp) +end +function s.atkcon(e) + return e:GetLabel()==2 +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsTurnPlayer(1-e:GetHandlerPlayer()) then + e:GetLabelObject():SetLabel(e:GetLabelObject():GetLabel()+1) + end +end \ No newline at end of file diff --git a/rush/c160021049.lua b/rush/c160021049.lua new file mode 100644 index 0000000000..acccc6657a --- /dev/null +++ b/rush/c160021049.lua @@ -0,0 +1,57 @@ +--レジェンド・リネージ・セイバー +--Legend Lineage Saber +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Ritual + c:EnableReviveLimit() + --Treated as a Legend Card in the GY + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_IS_LEGEND) + e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e0:SetRange(LOCATION_GRAVE) + c:RegisterEffect(e0) + --Gain ATK + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={10080320,23424603} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end +end +function s.filter(c) + return c:IsLevel(7) and c:IsDefense(300) +end +function s.spfilter(c,e,tp) + return s.filter(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end + --atk change + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(500) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + if Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_GRAVE,0,nil)>=3 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/rush/c160021059.lua b/rush/c160021059.lua new file mode 100644 index 0000000000..faf5a7ba8e --- /dev/null +++ b/rush/c160021059.lua @@ -0,0 +1,23 @@ +--英雄の降臨 +--Legend Advent +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Treated as a Legend Card in the GY + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_IS_LEGEND) + e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e0:SetRange(LOCATION_GRAVE) + c:RegisterEffect(e0) + --Ritual Summon + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=s.ritualfil,matfilter=s.forcedgroup}) + c:RegisterEffect(e1) +end +s.listed_names={160021049} +function s.ritualfil(c) + return c:IsCode(160021049) +end +function s.forcedgroup(c,e,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() +end \ No newline at end of file From 6beb2a1b7e0087c3c711000aed2fa0930bdd640f Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Fri, 23 May 2025 20:20:41 -0700 Subject: [PATCH 038/128] Update "Cyberdark Scheme" - Prevent script error from incorrect location constant - Notations for effect clarity --- skill/c300308011.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/skill/c300308011.lua b/skill/c300308011.lua index 86138585ce..5ca46561c4 100644 --- a/skill/c300308011.lua +++ b/skill/c300308011.lua @@ -20,7 +20,7 @@ end function s.flipcon(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_STZONE) local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil) - local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_STZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0 + local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0 return aux.CanActivateSkill(tp) and (b1 or b2) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) @@ -29,15 +29,16 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ft=Duel.GetLocationCount(tp,LOCATION_STZONE) local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil) - local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_STZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0 + local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0 local op=Duel.SelectEffect(tp,{b1,aux.Stringid(id,0)},{b2,aux.Stringid(id,1)}) if op==1 then + --Return 1 "Cyberdark" monster you control to your hand to Normal Summon 1 "Cyberdark" monster from your hand Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end - if tc and Duel.SendtoHand(tc,tp,REASON_COST)>0 and tc:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + if tc and Duel.SendtoHand(tc,tp,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() @@ -46,12 +47,14 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp) end end elseif op==2 then + --OPD register Duel.RegisterFlagEffect(tp,id,0,0,0) + --Equip 1 monster your opponent controls to a "Cyberdark" Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local gc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_STZONE,0,1,1,nil):GetFirst() + local gc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_SZONE,0,1,1,nil):GetFirst() if Duel.SendtoGrave(gc,REASON_COST)>0 then local ec=gc:GetPreviousEquipTarget() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local sc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() if sc and sc:IsAbleToChangeControler() then Duel.HintSelection(sc) @@ -75,10 +78,7 @@ function s.eqop(c,e,tp,tc,atk) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(s.eqlimit) + e2:SetValue(function(e,c) return c:GetControler()==e:GetHandlerPlayer() end) e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -function s.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() -end \ No newline at end of file From 109af1e13e9296ef9382bdc034ee6462448a4488 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Sat, 24 May 2025 21:02:43 +0200 Subject: [PATCH 039/128] added Rurigra the Eternal --- rush/c160021028.lua | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 rush/c160021028.lua diff --git a/rush/c160021028.lua b/rush/c160021028.lua new file mode 100644 index 0000000000..c292b5f831 --- /dev/null +++ b/rush/c160021028.lua @@ -0,0 +1,52 @@ +--永遠のルリグラ +--Rurigra the Eternal +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Place 1 card from opponent's GY on the bottom of the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK|CATEGORY_TOHAND|CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e)return e:GetHandler():IsStatus(STATUS_SUMMON_TURN)end) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=4 end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.filter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevel(9) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,1,nil) + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return end + Duel.ConfirmDecktop(tp,4) + local g=Duel.GetDecktopGroup(tp,4) + Duel.DisableShuffleCheck() + if g:IsExists(s.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tg=g:FilterSelect(tp,s.filter,1,1,nil) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,tg) + Duel.ShuffleHand(tp) + g:RemoveCard(tg) + end + end + local ct=#g + if ct>0 then + Duel.MoveToDeckBottom(ct,tp) + Duel.SortDeckbottom(tp,tp,ct) + end +end \ No newline at end of file From 87dfd7679acd383731548b54552747d90892eb62 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Sun, 25 May 2025 07:22:13 +0200 Subject: [PATCH 040/128] fixed Legend Advent --- rush/c160021059.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rush/c160021059.lua b/rush/c160021059.lua index faf5a7ba8e..eb7de6ae27 100644 --- a/rush/c160021059.lua +++ b/rush/c160021059.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_IS_LEGEND) e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e0:SetRange(LOCATION_GRAVE) + e0:SetRange(LOCATION_HAND|LOCATION_GRAVE) c:RegisterEffect(e0) --Ritual Summon local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=s.ritualfil,matfilter=s.forcedgroup}) From 61a7368c747b5a4597c6e7436f3eeeb0d2599b59 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 25 May 2025 19:12:29 +0300 Subject: [PATCH 041/128] "Duelist's Advance" + "Alliance Insight-EN" + "Saiba the Fighting Swordsmith" official release script updates --- card_counter_constants.lua | 2 +- .../c101301057.lua => official/c1122030.lua | 4 ++-- .../c101301050.lua => official/c12067160.lua | 2 +- .../c101208095.lua => official/c12210097.lua | 0 .../c101208081.lua => official/c12500059.lua | 0 .../c101208084.lua => official/c12888461.lua | 0 .../c101301047.lua => official/c13289758.lua | 2 +- .../c101208092.lua => official/c13332685.lua | 0 .../c101301044.lua => official/c14301396.lua | 0 .../c101208089.lua => official/c14554127.lua | 0 .../c101301041.lua => official/c15123983.lua | 0 .../c101301038.lua => official/c16246535.lua | 0 .../c101208087.lua => official/c1665819.lua | 0 .../c101301078.lua => official/c22377092.lua | 0 .../c101301053.lua => official/c2344618.lua | 0 .../c101301075.lua => official/c23599634.lua | 0 .../c101301072.lua => official/c23611122.lua | 0 .../c101301012.lua => official/c23829452.lua | 5 ++--- .../c101301035.lua => official/c26462013.lua | 0 .../c101301032.lua => official/c27184601.lua | 0 .../c101301029.lua => official/c28306253.lua | 0 .../c101301023.lua => official/c29251488.lua | 0 .../c101301026.lua => official/c29439831.lua | 0 .../c101301020.lua => official/c30373970.lua | 0 .../c101301017.lua => official/c31596518.lua | 0 .../c101301069.lua => official/c34433770.lua | 0 .../c101301009.lua => official/c34541940.lua | 0 .../c101301066.lua => official/c35550352.lua | 0 .../c101301006.lua => official/c35763582.lua | 0 .../c101301003.lua => official/c35886170.lua | 0 .../c101301014.lua => official/c36218106.lua | 0 .../c101301060.lua => official/c36494597.lua | 0 .../c100295101.lua => official/c36608728.lua | 0 .../c101301063.lua => official/c36672909.lua | 0 .../c101301056.lua => official/c37517035.lua | 0 .../c101208090.lua => official/c40543231.lua | 0 .../c101301048.lua => official/c40673853.lua | 0 .../c101301045.lua => official/c40706444.lua | 0 .../c101301042.lua => official/c41522092.lua | 4 ++-- .../c101208088.lua => official/c47060528.lua | 0 .../c101301059.lua => official/c483.lua | 0 .../c101301055.lua => official/c48739627.lua | 0 .../c101208085.lua => official/c48882106.lua | 0 .../c101301051.lua => official/c49451215.lua | 0 .../c101208096.lua => official/c49604192.lua | 6 +++--- .../c101208093.lua => official/c49721684.lua | 4 ++-- .../c101208082.lua => official/c49904658.lua | 0 .../c101301039.lua => official/c52644170.lua | 0 .../c101301036.lua => official/c53466722.lua | 0 .../c101301033.lua => official/c53589300.lua | 0 .../c101301030.lua => official/c54701958.lua | 2 +- .../c101301027.lua => official/c55423549.lua | 0 .../c101301079.lua => official/c58761791.lua | 0 .../c101301076.lua => official/c59983249.lua | 20 +++++++++---------- .../c101301073.lua => official/c60600821.lua | 0 .../c101301010.lua => official/c60946049.lua | 0 .../c101301007.lua => official/c61168637.lua | 0 .../c101301070.lua => official/c61822419.lua | 0 .../c101301067.lua => official/c61944066.lua | 10 +++++----- .../c101301001.lua => official/c62006866.lua | 0 .../c101301015.lua => official/c62606805.lua | 0 .../c101301064.lua => official/c62767644.lua | 0 .../c101301004.lua => official/c62880279.lua | 0 .../c101301061.lua => official/c63899196.lua | 0 .../c101301024.lua => official/c66646087.lua | 0 .../c101301018.lua => official/c67584223.lua | 0 .../c101301021.lua => official/c67768675.lua | 0 .../c101301058.lua => official/c74011784.lua | 10 +++++----- .../c101208086.lua => official/c74271714.lua | 0 .../c101301054.lua => official/c74733322.lua | 0 .../c101208083.lua => official/c75493362.lua | 0 .../c101301052.lua => official/c75956913.lua | 0 .../c101301049.lua => official/c76072561.lua | 0 .../c101208094.lua => official/c76725398.lua | 0 .../c101208091.lua => official/c76948970.lua | 0 .../c101301046.lua => official/c77894049.lua | 8 ++++---- .../c101301034.lua => official/c80073414.lua | 0 .../c101301031.lua => official/c81196066.lua | 0 .../c101301005.lua => official/c8379983.lua | 0 .../c101301080.lua => official/c85150300.lua | 0 .../c101301040.lua => official/c88139289.lua | 0 .../c101301043.lua => official/c88917691.lua | 0 .../c101301037.lua => official/c89851827.lua | 0 .../c101301028.lua => official/c91818544.lua | 0 .../c101301025.lua => official/c92034192.lua | 0 .../c101301013.lua => official/c9213491.lua | 0 .../c101301062.lua => official/c9283801.lua | 0 .../c101301022.lua => official/c93156774.lua | 0 .../c101301002.lua => official/c9491461.lua | 0 .../c101301019.lua => official/c94979322.lua | 0 .../c101301016.lua => official/c95091919.lua | 0 .../c101301077.lua => official/c95382988.lua | 0 .../c101301074.lua => official/c96004535.lua | 0 .../c101301071.lua => official/c97227123.lua | 0 .../c101301011.lua => official/c97434754.lua | 0 .../c101301008.lua => official/c97556336.lua | 0 .../c101301068.lua => official/c98349765.lua | 12 +++++------ .../c101301065.lua => official/c99161253.lua | 0 98 files changed, 45 insertions(+), 46 deletions(-) rename pre-release/c101301057.lua => official/c1122030.lua (94%) rename pre-release/c101301050.lua => official/c12067160.lua (99%) rename pre-release/c101208095.lua => official/c12210097.lua (100%) rename pre-release/c101208081.lua => official/c12500059.lua (100%) rename pre-release/c101208084.lua => official/c12888461.lua (100%) rename pre-release/c101301047.lua => official/c13289758.lua (99%) rename pre-release/c101208092.lua => official/c13332685.lua (100%) rename pre-release/c101301044.lua => official/c14301396.lua (100%) rename pre-release/c101208089.lua => official/c14554127.lua (100%) rename pre-release/c101301041.lua => official/c15123983.lua (100%) rename pre-release/c101301038.lua => official/c16246535.lua (100%) rename pre-release/c101208087.lua => official/c1665819.lua (100%) rename pre-release/c101301078.lua => official/c22377092.lua (100%) rename pre-release/c101301053.lua => official/c2344618.lua (100%) rename pre-release/c101301075.lua => official/c23599634.lua (100%) rename pre-release/c101301072.lua => official/c23611122.lua (100%) rename pre-release/c101301012.lua => official/c23829452.lua (95%) rename pre-release/c101301035.lua => official/c26462013.lua (100%) rename pre-release/c101301032.lua => official/c27184601.lua (100%) rename pre-release/c101301029.lua => official/c28306253.lua (100%) rename pre-release/c101301023.lua => official/c29251488.lua (100%) rename pre-release/c101301026.lua => official/c29439831.lua (100%) rename pre-release/c101301020.lua => official/c30373970.lua (100%) rename pre-release/c101301017.lua => official/c31596518.lua (100%) rename pre-release/c101301069.lua => official/c34433770.lua (100%) rename pre-release/c101301009.lua => official/c34541940.lua (100%) rename pre-release/c101301066.lua => official/c35550352.lua (100%) rename pre-release/c101301006.lua => official/c35763582.lua (100%) rename pre-release/c101301003.lua => official/c35886170.lua (100%) rename pre-release/c101301014.lua => official/c36218106.lua (100%) rename pre-release/c101301060.lua => official/c36494597.lua (100%) rename pre-release/c100295101.lua => official/c36608728.lua (100%) rename pre-release/c101301063.lua => official/c36672909.lua (100%) rename pre-release/c101301056.lua => official/c37517035.lua (100%) rename pre-release/c101208090.lua => official/c40543231.lua (100%) rename pre-release/c101301048.lua => official/c40673853.lua (100%) rename pre-release/c101301045.lua => official/c40706444.lua (100%) rename pre-release/c101301042.lua => official/c41522092.lua (97%) rename pre-release/c101208088.lua => official/c47060528.lua (100%) rename pre-release/c101301059.lua => official/c483.lua (100%) rename pre-release/c101301055.lua => official/c48739627.lua (100%) rename pre-release/c101208085.lua => official/c48882106.lua (100%) rename pre-release/c101301051.lua => official/c49451215.lua (100%) rename pre-release/c101208096.lua => official/c49604192.lua (90%) rename pre-release/c101208093.lua => official/c49721684.lua (89%) rename pre-release/c101208082.lua => official/c49904658.lua (100%) rename pre-release/c101301039.lua => official/c52644170.lua (100%) rename pre-release/c101301036.lua => official/c53466722.lua (100%) rename pre-release/c101301033.lua => official/c53589300.lua (100%) rename pre-release/c101301030.lua => official/c54701958.lua (99%) rename pre-release/c101301027.lua => official/c55423549.lua (100%) rename pre-release/c101301079.lua => official/c58761791.lua (100%) rename pre-release/c101301076.lua => official/c59983249.lua (88%) rename pre-release/c101301073.lua => official/c60600821.lua (100%) rename pre-release/c101301010.lua => official/c60946049.lua (100%) rename pre-release/c101301007.lua => official/c61168637.lua (100%) rename pre-release/c101301070.lua => official/c61822419.lua (100%) rename pre-release/c101301067.lua => official/c61944066.lua (94%) rename pre-release/c101301001.lua => official/c62006866.lua (100%) rename pre-release/c101301015.lua => official/c62606805.lua (100%) rename pre-release/c101301064.lua => official/c62767644.lua (100%) rename pre-release/c101301004.lua => official/c62880279.lua (100%) rename pre-release/c101301061.lua => official/c63899196.lua (100%) rename pre-release/c101301024.lua => official/c66646087.lua (100%) rename pre-release/c101301018.lua => official/c67584223.lua (100%) rename pre-release/c101301021.lua => official/c67768675.lua (100%) rename pre-release/c101301058.lua => official/c74011784.lua (88%) rename pre-release/c101208086.lua => official/c74271714.lua (100%) rename pre-release/c101301054.lua => official/c74733322.lua (100%) rename pre-release/c101208083.lua => official/c75493362.lua (100%) rename pre-release/c101301052.lua => official/c75956913.lua (100%) rename pre-release/c101301049.lua => official/c76072561.lua (100%) rename pre-release/c101208094.lua => official/c76725398.lua (100%) rename pre-release/c101208091.lua => official/c76948970.lua (100%) rename pre-release/c101301046.lua => official/c77894049.lua (94%) rename pre-release/c101301034.lua => official/c80073414.lua (100%) rename pre-release/c101301031.lua => official/c81196066.lua (100%) rename pre-release/c101301005.lua => official/c8379983.lua (100%) rename pre-release/c101301080.lua => official/c85150300.lua (100%) rename pre-release/c101301040.lua => official/c88139289.lua (100%) rename pre-release/c101301043.lua => official/c88917691.lua (100%) rename pre-release/c101301037.lua => official/c89851827.lua (100%) rename pre-release/c101301028.lua => official/c91818544.lua (100%) rename pre-release/c101301025.lua => official/c92034192.lua (100%) rename pre-release/c101301013.lua => official/c9213491.lua (100%) rename pre-release/c101301062.lua => official/c9283801.lua (100%) rename pre-release/c101301022.lua => official/c93156774.lua (100%) rename pre-release/c101301002.lua => official/c9491461.lua (100%) rename pre-release/c101301019.lua => official/c94979322.lua (100%) rename pre-release/c101301016.lua => official/c95091919.lua (100%) rename pre-release/c101301077.lua => official/c95382988.lua (100%) rename pre-release/c101301074.lua => official/c96004535.lua (100%) rename pre-release/c101301071.lua => official/c97227123.lua (100%) rename pre-release/c101301011.lua => official/c97434754.lua (100%) rename pre-release/c101301008.lua => official/c97556336.lua (100%) rename pre-release/c101301068.lua => official/c98349765.lua (91%) rename pre-release/c101301065.lua => official/c99161253.lua (100%) diff --git a/card_counter_constants.lua b/card_counter_constants.lua index fb0709ba11..65be965fec 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -53,7 +53,7 @@ CARD_LABRYNTH_LABYRINTH = 33407125 CARD_LIGHT_BARRIER = 73206827 CARD_MAGICAL_MIDBREAKER = 71650854 CARD_MAX_METALMORPH = 89812483 -CARD_MEDIUS_THE_INNOCENT = 101301008 +CARD_MEDIUS_THE_INNOCENT = 97556336 CARD_MEMENTOAL_TECUHTLICA = 23288411 CARD_MILLENNIUM_CROSS = 37613663 CARD_MONSTER_REBORN = 83764718 diff --git a/pre-release/c101301057.lua b/official/c1122030.lua similarity index 94% rename from pre-release/c101301057.lua rename to official/c1122030.lua index 65c8dbaaa4..116b03221c 100644 --- a/pre-release/c101301057.lua +++ b/official/c1122030.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetOperation(function(e) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end) c:RegisterEffect(e3) end -s.listed_names={CARD_MEDIUS_THE_INNOCENT,101301054} --"Artmegia the Academy City of Divine Arts" +s.listed_names={CARD_MEDIUS_THE_INNOCENT,74733322} --"Artmegia the Academy City of Divine Arts" s.listed_series={SET_ARTMEGIA} function s.thfilter(c) return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsAbleToHand() @@ -69,7 +69,7 @@ function s.fusmatop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsCode(101301054) and c:IsFaceup() and c:IsControler(tp) and c:IsOnField() + return c:IsCode(74733322) and c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/pre-release/c101301050.lua b/official/c12067160.lua similarity index 99% rename from pre-release/c101301050.lua rename to official/c12067160.lua index 876ebc6f46..70c240b355 100644 --- a/pre-release/c101301050.lua +++ b/official/c12067160.lua @@ -56,4 +56,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() return re:IsMonsterEffect() and rc:IsRelateToEffect(re) and c:GetLinkedGroup():IsContains(rc) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end +end \ No newline at end of file diff --git a/pre-release/c101208095.lua b/official/c12210097.lua similarity index 100% rename from pre-release/c101208095.lua rename to official/c12210097.lua diff --git a/pre-release/c101208081.lua b/official/c12500059.lua similarity index 100% rename from pre-release/c101208081.lua rename to official/c12500059.lua diff --git a/pre-release/c101208084.lua b/official/c12888461.lua similarity index 100% rename from pre-release/c101208084.lua rename to official/c12888461.lua diff --git a/pre-release/c101301047.lua b/official/c13289758.lua similarity index 99% rename from pre-release/c101301047.lua rename to official/c13289758.lua index c9088c6131..6caa0667df 100644 --- a/pre-release/c101301047.lua +++ b/official/c13289758.lua @@ -57,4 +57,4 @@ function s.detachop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:GetOverlayCount()>0 then c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/pre-release/c101208092.lua b/official/c13332685.lua similarity index 100% rename from pre-release/c101208092.lua rename to official/c13332685.lua diff --git a/pre-release/c101301044.lua b/official/c14301396.lua similarity index 100% rename from pre-release/c101301044.lua rename to official/c14301396.lua diff --git a/pre-release/c101208089.lua b/official/c14554127.lua similarity index 100% rename from pre-release/c101208089.lua rename to official/c14554127.lua diff --git a/pre-release/c101301041.lua b/official/c15123983.lua similarity index 100% rename from pre-release/c101301041.lua rename to official/c15123983.lua diff --git a/pre-release/c101301038.lua b/official/c16246535.lua similarity index 100% rename from pre-release/c101301038.lua rename to official/c16246535.lua diff --git a/pre-release/c101208087.lua b/official/c1665819.lua similarity index 100% rename from pre-release/c101208087.lua rename to official/c1665819.lua diff --git a/pre-release/c101301078.lua b/official/c22377092.lua similarity index 100% rename from pre-release/c101301078.lua rename to official/c22377092.lua diff --git a/pre-release/c101301053.lua b/official/c2344618.lua similarity index 100% rename from pre-release/c101301053.lua rename to official/c2344618.lua diff --git a/pre-release/c101301075.lua b/official/c23599634.lua similarity index 100% rename from pre-release/c101301075.lua rename to official/c23599634.lua diff --git a/pre-release/c101301072.lua b/official/c23611122.lua similarity index 100% rename from pre-release/c101301072.lua rename to official/c23611122.lua diff --git a/pre-release/c101301012.lua b/official/c23829452.lua similarity index 95% rename from pre-release/c101301012.lua rename to official/c23829452.lua index e03567ba74..9a23093f39 100644 --- a/pre-release/c101301012.lua +++ b/official/c23829452.lua @@ -1,7 +1,6 @@ --アルトメギアの獄神獣 --Imprisoned Deity Beast of Artmegia --scripted by Naim -local CARD_NERVA=101301033 local s,id=GetID() function s.initial_effect(c) --You cannot Special Summon from the Extra Deck, except Fusion Monsters @@ -41,9 +40,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_ARTMEGIA} -s.listed_names={CARD_NERVA} +s.listed_names={53589300} --"Nerva the Imprisoned Deity of Creation" function s.fusionfilter(c) - return c:IsSetCard(SET_ARTMEGIA) or c:IsCode(CARD_NERVA) + return c:IsSetCard(SET_ARTMEGIA) or c:IsCode(53589300) end function s.thfilter(c,tp) return c:IsSetCard(SET_ARTMEGIA) and c:IsSpellTrap() and c:IsAbleToHand() diff --git a/pre-release/c101301035.lua b/official/c26462013.lua similarity index 100% rename from pre-release/c101301035.lua rename to official/c26462013.lua diff --git a/pre-release/c101301032.lua b/official/c27184601.lua similarity index 100% rename from pre-release/c101301032.lua rename to official/c27184601.lua diff --git a/pre-release/c101301029.lua b/official/c28306253.lua similarity index 100% rename from pre-release/c101301029.lua rename to official/c28306253.lua diff --git a/pre-release/c101301023.lua b/official/c29251488.lua similarity index 100% rename from pre-release/c101301023.lua rename to official/c29251488.lua diff --git a/pre-release/c101301026.lua b/official/c29439831.lua similarity index 100% rename from pre-release/c101301026.lua rename to official/c29439831.lua diff --git a/pre-release/c101301020.lua b/official/c30373970.lua similarity index 100% rename from pre-release/c101301020.lua rename to official/c30373970.lua diff --git a/pre-release/c101301017.lua b/official/c31596518.lua similarity index 100% rename from pre-release/c101301017.lua rename to official/c31596518.lua diff --git a/pre-release/c101301069.lua b/official/c34433770.lua similarity index 100% rename from pre-release/c101301069.lua rename to official/c34433770.lua diff --git a/pre-release/c101301009.lua b/official/c34541940.lua similarity index 100% rename from pre-release/c101301009.lua rename to official/c34541940.lua diff --git a/pre-release/c101301066.lua b/official/c35550352.lua similarity index 100% rename from pre-release/c101301066.lua rename to official/c35550352.lua diff --git a/pre-release/c101301006.lua b/official/c35763582.lua similarity index 100% rename from pre-release/c101301006.lua rename to official/c35763582.lua diff --git a/pre-release/c101301003.lua b/official/c35886170.lua similarity index 100% rename from pre-release/c101301003.lua rename to official/c35886170.lua diff --git a/pre-release/c101301014.lua b/official/c36218106.lua similarity index 100% rename from pre-release/c101301014.lua rename to official/c36218106.lua diff --git a/pre-release/c101301060.lua b/official/c36494597.lua similarity index 100% rename from pre-release/c101301060.lua rename to official/c36494597.lua diff --git a/pre-release/c100295101.lua b/official/c36608728.lua similarity index 100% rename from pre-release/c100295101.lua rename to official/c36608728.lua diff --git a/pre-release/c101301063.lua b/official/c36672909.lua similarity index 100% rename from pre-release/c101301063.lua rename to official/c36672909.lua diff --git a/pre-release/c101301056.lua b/official/c37517035.lua similarity index 100% rename from pre-release/c101301056.lua rename to official/c37517035.lua diff --git a/pre-release/c101208090.lua b/official/c40543231.lua similarity index 100% rename from pre-release/c101208090.lua rename to official/c40543231.lua diff --git a/pre-release/c101301048.lua b/official/c40673853.lua similarity index 100% rename from pre-release/c101301048.lua rename to official/c40673853.lua diff --git a/pre-release/c101301045.lua b/official/c40706444.lua similarity index 100% rename from pre-release/c101301045.lua rename to official/c40706444.lua diff --git a/pre-release/c101301042.lua b/official/c41522092.lua similarity index 97% rename from pre-release/c101301042.lua rename to official/c41522092.lua index bf35039bb8..266cb5dd20 100644 --- a/pre-release/c101301042.lua +++ b/official/c41522092.lua @@ -50,7 +50,7 @@ function s.initial_effect(c) end s.xyz_number=0 function s.xyzcheck(g,tp,xyz) - local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) + 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.ctcon(e,tp,eg,ep,ev,re,r,rp) @@ -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 +end \ No newline at end of file diff --git a/pre-release/c101208088.lua b/official/c47060528.lua similarity index 100% rename from pre-release/c101208088.lua rename to official/c47060528.lua diff --git a/pre-release/c101301059.lua b/official/c483.lua similarity index 100% rename from pre-release/c101301059.lua rename to official/c483.lua diff --git a/pre-release/c101301055.lua b/official/c48739627.lua similarity index 100% rename from pre-release/c101301055.lua rename to official/c48739627.lua diff --git a/pre-release/c101208085.lua b/official/c48882106.lua similarity index 100% rename from pre-release/c101208085.lua rename to official/c48882106.lua diff --git a/pre-release/c101301051.lua b/official/c49451215.lua similarity index 100% rename from pre-release/c101301051.lua rename to official/c49451215.lua diff --git a/pre-release/c101208096.lua b/official/c49604192.lua similarity index 90% rename from pre-release/c101208096.lua rename to official/c49604192.lua index 72630e939c..583fc46fcf 100644 --- a/pre-release/c101208096.lua +++ b/official/c49604192.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.rmop) c:RegisterEffect(e1) end -s.listed_names={19899073,55397172,101208092} +s.listed_names={19899073,55397172,13332685} --"Ame no Murakumo no Mitsurugi", "Futsu no Mitama no Mitsurugi", "Ame no Habakiri no Mitsurugi" s.listed_series={SET_MITSURUGI} function s.rmconfilter(c) @@ -26,8 +26,8 @@ function s.rmcostrescon(sg) return sg:GetClassCount(Card.GetOriginalCodeRule)==3 end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,false,s.rmcostrescon,nil,19899073,55397172,101208092) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,3,false,s.rmcostrescon,nil,19899073,55397172,101208092) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,false,s.rmcostrescon,nil,19899073,55397172,13332685) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,3,false,s.rmcostrescon,nil,19899073,55397172,13332685) Duel.Release(g,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/pre-release/c101208093.lua b/official/c49721684.lua similarity index 89% rename from pre-release/c101208093.lua rename to official/c49721684.lua index 560d150f15..a441101396 100644 --- a/pre-release/c101208093.lua +++ b/official/c49721684.lua @@ -21,10 +21,10 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_names={19899073,55397172,101208092} +s.listed_names={19899073,55397172,13332685} --"Ame no Murakumo no Mitsurugi", "Futsu no Mitama no Mitsurugi", "Ame no Habakiri no Mitsurugi" function s.tdconfilter(c,tp) - return c:IsPreviousCodeOnField(19899073,55397172,101208092) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) + return c:IsPreviousCodeOnField(19899073,55397172,13332685) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/pre-release/c101208082.lua b/official/c49904658.lua similarity index 100% rename from pre-release/c101208082.lua rename to official/c49904658.lua diff --git a/pre-release/c101301039.lua b/official/c52644170.lua similarity index 100% rename from pre-release/c101301039.lua rename to official/c52644170.lua diff --git a/pre-release/c101301036.lua b/official/c53466722.lua similarity index 100% rename from pre-release/c101301036.lua rename to official/c53466722.lua diff --git a/pre-release/c101301033.lua b/official/c53589300.lua similarity index 100% rename from pre-release/c101301033.lua rename to official/c53589300.lua diff --git a/pre-release/c101301030.lua b/official/c54701958.lua similarity index 99% rename from pre-release/c101301030.lua rename to official/c54701958.lua index 72a73eb799..91b6525030 100644 --- a/pre-release/c101301030.lua +++ b/official/c54701958.lua @@ -56,4 +56,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/pre-release/c101301027.lua b/official/c55423549.lua similarity index 100% rename from pre-release/c101301027.lua rename to official/c55423549.lua diff --git a/pre-release/c101301079.lua b/official/c58761791.lua similarity index 100% rename from pre-release/c101301079.lua rename to official/c58761791.lua diff --git a/pre-release/c101301076.lua b/official/c59983249.lua similarity index 88% rename from pre-release/c101301076.lua rename to official/c59983249.lua index ca280da32c..33b7421772 100644 --- a/pre-release/c101301076.lua +++ b/official/c59983249.lua @@ -39,19 +39,19 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) --Destroy up to 2 Spells/Traps on the field - local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) + local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+1)) and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) --Discard 1 random card from your opponent's hand - local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) + local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+2)) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT) --Destroy 1 face-down card on the field - local b4=(cost_skip or not Duel.HasFlagEffect(tp,id+300)) + local b4=(cost_skip or not Duel.HasFlagEffect(tp,id+3)) and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) --Place 1 card on the field on top of the Deck - local b5=(cost_skip or not Duel.HasFlagEffect(tp,id+400)) + local b5=(cost_skip or not Duel.HasFlagEffect(tp,id+4)) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) --Banish 1 card on the field - local b6=(cost_skip or not Duel.HasFlagEffect(tp,id+500)) + local b6=(cost_skip or not Duel.HasFlagEffect(tp,id+5)) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) if chk==0 then e:SetLabel(0) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) and (b1 or b2 or b3 or b4 or b5 or b6) end @@ -72,29 +72,29 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) elseif op==2 then --Destroy up to 2 Spells/Traps on the field e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end + if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) elseif op==3 then --Discard 1 random card from your opponent's hand e:SetCategory(CATEGORY_HANDES) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end + if not cost_skip then Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) elseif op==4 then --Destroy 1 face-down card on the field e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+300,RESET_PHASE|PHASE_END,0,1) end + if not cost_skip then Duel.RegisterFlagEffect(tp,id+3,RESET_PHASE|PHASE_END,0,1) end local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) elseif op==5 then --Place 1 card on the field on top of the Deck e:SetCategory(CATEGORY_TODECK) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+400,RESET_PHASE|PHASE_END,0,1) end + if not cost_skip then Duel.RegisterFlagEffect(tp,id+4,RESET_PHASE|PHASE_END,0,1) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD) elseif op==6 then --Banish 1 card on the field e:SetCategory(CATEGORY_REMOVE) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+500,RESET_PHASE|PHASE_END,0,1) end + if not cost_skip then Duel.RegisterFlagEffect(tp,id+5,RESET_PHASE|PHASE_END,0,1) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD) end end diff --git a/pre-release/c101301073.lua b/official/c60600821.lua similarity index 100% rename from pre-release/c101301073.lua rename to official/c60600821.lua diff --git a/pre-release/c101301010.lua b/official/c60946049.lua similarity index 100% rename from pre-release/c101301010.lua rename to official/c60946049.lua diff --git a/pre-release/c101301007.lua b/official/c61168637.lua similarity index 100% rename from pre-release/c101301007.lua rename to official/c61168637.lua diff --git a/pre-release/c101301070.lua b/official/c61822419.lua similarity index 100% rename from pre-release/c101301070.lua rename to official/c61822419.lua diff --git a/pre-release/c101301067.lua b/official/c61944066.lua similarity index 94% rename from pre-release/c101301067.lua rename to official/c61944066.lua index 1d825591b1..e170655ffd 100644 --- a/pre-release/c101301067.lua +++ b/official/c61944066.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE) e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3a:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_CUSTOM+id+1) + e3a:SetCode(EVENT_CUSTOM+id) e3a:SetRange(LOCATION_SZONE) e3a:SetCountLimit(1) e3a:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) @@ -42,7 +42,7 @@ function s.initial_effect(c) local g=Group.CreateGroup() g:KeepAlive() e3a:SetLabelObject(g) - --Register your Special Summoned Ritual monsters + --Register your Special Summoned Ritual Monsters local e3b=Effect.CreateEffect(c) e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) @@ -113,13 +113,13 @@ function s.regsumop(e,tp,eg,ep,ev,re,r,rp) local tg=eg:Filter(s.lvfilter,nil,e,tp) if #tg>0 then for tc in tg:Iter() do - tc:RegisterFlagEffect(id+1,RESET_CHAIN,0,1) + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) end local g=e:GetLabelObject():GetLabelObject() if Duel.GetCurrentChain()==0 then g:Clear() end g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id+1)==0 end,nil) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id+1,e,0,tp,tp,0) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) end end \ No newline at end of file diff --git a/pre-release/c101301001.lua b/official/c62006866.lua similarity index 100% rename from pre-release/c101301001.lua rename to official/c62006866.lua diff --git a/pre-release/c101301015.lua b/official/c62606805.lua similarity index 100% rename from pre-release/c101301015.lua rename to official/c62606805.lua diff --git a/pre-release/c101301064.lua b/official/c62767644.lua similarity index 100% rename from pre-release/c101301064.lua rename to official/c62767644.lua diff --git a/pre-release/c101301004.lua b/official/c62880279.lua similarity index 100% rename from pre-release/c101301004.lua rename to official/c62880279.lua diff --git a/pre-release/c101301061.lua b/official/c63899196.lua similarity index 100% rename from pre-release/c101301061.lua rename to official/c63899196.lua diff --git a/pre-release/c101301024.lua b/official/c66646087.lua similarity index 100% rename from pre-release/c101301024.lua rename to official/c66646087.lua diff --git a/pre-release/c101301018.lua b/official/c67584223.lua similarity index 100% rename from pre-release/c101301018.lua rename to official/c67584223.lua diff --git a/pre-release/c101301021.lua b/official/c67768675.lua similarity index 100% rename from pre-release/c101301021.lua rename to official/c67768675.lua diff --git a/pre-release/c101301058.lua b/official/c74011784.lua similarity index 88% rename from pre-release/c101301058.lua rename to official/c74011784.lua index ec94753398..cce5fb2177 100644 --- a/pre-release/c101301058.lua +++ b/official/c74011784.lua @@ -27,25 +27,25 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_names={CARD_MEDIUS_THE_INNOCENT,101301054,id} --"Artmegia the Academy City of Divine Arts" +s.listed_names={CARD_MEDIUS_THE_INNOCENT,74733322,id} --"Artmegia the Academy City of Divine Arts" s.listed_series={SET_ARTMEGIA} function s.plthfilter(c,tohand_chk) - return (c:IsCode(101301054) and not c:IsForbidden()) or (tohand_chk and c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToHand() and c:IsLocation(LOCATION_DECK) and not c:IsCode(id)) + return (c:IsCode(74733322) and not c:IsForbidden()) or (tohand_chk and c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToHand() and c:IsLocation(LOCATION_DECK) and not c:IsCode(id)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,101301054),tp,LOCATION_ONFIELD,0,1,nil) + local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,74733322),tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(s.plthfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tohand_chk) end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,101301054),tp,LOCATION_ONFIELD,0,1,nil) + local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,74733322),tp,LOCATION_ONFIELD,0,1,nil) local hint_desc=tohand_chk and aux.Stringid(id,2) or HINTMSG_TOFIELD Duel.Hint(HINT_SELECTMSG,tp,hint_desc) local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plthfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tohand_chk):GetFirst() if not sc then return end - if sc:IsCode(101301054) then + if sc:IsCode(74733322) then if not tohand_chk then Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) else diff --git a/pre-release/c101208086.lua b/official/c74271714.lua similarity index 100% rename from pre-release/c101208086.lua rename to official/c74271714.lua diff --git a/pre-release/c101301054.lua b/official/c74733322.lua similarity index 100% rename from pre-release/c101301054.lua rename to official/c74733322.lua diff --git a/pre-release/c101208083.lua b/official/c75493362.lua similarity index 100% rename from pre-release/c101208083.lua rename to official/c75493362.lua diff --git a/pre-release/c101301052.lua b/official/c75956913.lua similarity index 100% rename from pre-release/c101301052.lua rename to official/c75956913.lua diff --git a/pre-release/c101301049.lua b/official/c76072561.lua similarity index 100% rename from pre-release/c101301049.lua rename to official/c76072561.lua diff --git a/pre-release/c101208094.lua b/official/c76725398.lua similarity index 100% rename from pre-release/c101208094.lua rename to official/c76725398.lua diff --git a/pre-release/c101208091.lua b/official/c76948970.lua similarity index 100% rename from pre-release/c101208091.lua rename to official/c76948970.lua diff --git a/pre-release/c101301046.lua b/official/c77894049.lua similarity index 94% rename from pre-release/c101301046.lua rename to official/c77894049.lua index d67eceb3a6..714abbcf78 100644 --- a/pre-release/c101301046.lua +++ b/official/c77894049.lua @@ -45,19 +45,19 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_names={28168628} -- "Rock of the Vanquisher" +s.listed_names={28168628} --"Rock of the Vanquisher" s.listed_series={SET_VANQUISH_SOUL} function s.regop(e,tp,eg,ep,ev,re,r,rp) local a,b=Duel.GetBattleMonster(0) if (a and a:IsSetCard(SET_VANQUISH_SOUL)) or (b and b:IsSetCard(SET_VANQUISH_SOUL)) then - Duel.RegisterFlagEffect(0,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.RegisterFlagEffect(0,id+1,RESET_PHASE|PHASE_END,0,1) end end function s.ovfilter(c,tp,lc) return (c:IsSetCard(SET_VANQUISH_SOUL,lc,SUMMON_TYPE_XYZ,tp) or c:IsCode(28168628)) and c:IsFaceup() end function s.xyzop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.HasFlagEffect(0,id+100) end + if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.HasFlagEffect(0,id+1) end return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.attrcon(attr) @@ -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 +end \ No newline at end of file diff --git a/pre-release/c101301034.lua b/official/c80073414.lua similarity index 100% rename from pre-release/c101301034.lua rename to official/c80073414.lua diff --git a/pre-release/c101301031.lua b/official/c81196066.lua similarity index 100% rename from pre-release/c101301031.lua rename to official/c81196066.lua diff --git a/pre-release/c101301005.lua b/official/c8379983.lua similarity index 100% rename from pre-release/c101301005.lua rename to official/c8379983.lua diff --git a/pre-release/c101301080.lua b/official/c85150300.lua similarity index 100% rename from pre-release/c101301080.lua rename to official/c85150300.lua diff --git a/pre-release/c101301040.lua b/official/c88139289.lua similarity index 100% rename from pre-release/c101301040.lua rename to official/c88139289.lua diff --git a/pre-release/c101301043.lua b/official/c88917691.lua similarity index 100% rename from pre-release/c101301043.lua rename to official/c88917691.lua diff --git a/pre-release/c101301037.lua b/official/c89851827.lua similarity index 100% rename from pre-release/c101301037.lua rename to official/c89851827.lua diff --git a/pre-release/c101301028.lua b/official/c91818544.lua similarity index 100% rename from pre-release/c101301028.lua rename to official/c91818544.lua diff --git a/pre-release/c101301025.lua b/official/c92034192.lua similarity index 100% rename from pre-release/c101301025.lua rename to official/c92034192.lua diff --git a/pre-release/c101301013.lua b/official/c9213491.lua similarity index 100% rename from pre-release/c101301013.lua rename to official/c9213491.lua diff --git a/pre-release/c101301062.lua b/official/c9283801.lua similarity index 100% rename from pre-release/c101301062.lua rename to official/c9283801.lua diff --git a/pre-release/c101301022.lua b/official/c93156774.lua similarity index 100% rename from pre-release/c101301022.lua rename to official/c93156774.lua diff --git a/pre-release/c101301002.lua b/official/c9491461.lua similarity index 100% rename from pre-release/c101301002.lua rename to official/c9491461.lua diff --git a/pre-release/c101301019.lua b/official/c94979322.lua similarity index 100% rename from pre-release/c101301019.lua rename to official/c94979322.lua diff --git a/pre-release/c101301016.lua b/official/c95091919.lua similarity index 100% rename from pre-release/c101301016.lua rename to official/c95091919.lua diff --git a/pre-release/c101301077.lua b/official/c95382988.lua similarity index 100% rename from pre-release/c101301077.lua rename to official/c95382988.lua diff --git a/pre-release/c101301074.lua b/official/c96004535.lua similarity index 100% rename from pre-release/c101301074.lua rename to official/c96004535.lua diff --git a/pre-release/c101301071.lua b/official/c97227123.lua similarity index 100% rename from pre-release/c101301071.lua rename to official/c97227123.lua diff --git a/pre-release/c101301011.lua b/official/c97434754.lua similarity index 100% rename from pre-release/c101301011.lua rename to official/c97434754.lua diff --git a/pre-release/c101301008.lua b/official/c97556336.lua similarity index 100% rename from pre-release/c101301008.lua rename to official/c97556336.lua diff --git a/pre-release/c101301068.lua b/official/c98349765.lua similarity index 91% rename from pre-release/c101301068.lua rename to official/c98349765.lua index ad046860b4..ec23534ec6 100644 --- a/pre-release/c101301068.lua +++ b/official/c98349765.lua @@ -26,10 +26,10 @@ function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(-100) local b1=not Duel.HasFlagEffect(tp,id) and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local b2=not Duel.HasFlagEffect(tp,id+1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - local b3=not Duel.HasFlagEffect(tp,id+200) + local b3=not Duel.HasFlagEffect(tp,id+2) and (e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return b1 or b2 or b3 end @@ -39,11 +39,11 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local cost_skip=e:GetLabel()~=-100 local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=(cost_skip or (not Duel.HasFlagEffect(tp,id+100) + local b2=(cost_skip or (not Duel.HasFlagEffect(tp,id+1) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil))) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) + local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+2)) and (not e:IsHasType(EFFECT_TYPE_ACTIVATE) or e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then e:SetLabel(0) return b1 or b2 or b3 end @@ -62,12 +62,12 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) elseif op==2 then e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end + if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) elseif op==3 then e:SetCategory(0) e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end + if not cost_skip then Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) end end end function s.effop(e,tp,eg,ep,ev,re,r,rp) diff --git a/pre-release/c101301065.lua b/official/c99161253.lua similarity index 100% rename from pre-release/c101301065.lua rename to official/c99161253.lua From 8e16c4f4773149b2c8550e88878d2d9c7ad7bafa Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 25 May 2025 20:07:51 +0300 Subject: [PATCH 042/128] Update archetype_setcode_constants.lua --- archetype_setcode_constants.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index c802bc600e..ff84b24e68 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -588,9 +588,9 @@ SET_REGENESIS = 0x1be SET_DRAGONTAIL = 0x1c0 SET_YUMMY = 0x1c1 SET_K9 = 0x1c4 ---Released but the official English name is unconfirmed ---Pre-release archetypes SET_TELEPORT = 0x1c5 +--Released but the official English name is unconfirmed SET_IMPRISONED_DEITY = 0x1c6 SET_ARTMEGIA = 0x1c7 +--Pre-release archetypes SET_DOOM_KING = 0x1c8 From f546cb30a5ac3ecabd951705f77ee6a9761c5e73 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Mon, 26 May 2025 13:06:42 +0200 Subject: [PATCH 043/128] added Botanical Lion --- proc_rush.lua | 2 +- rush/c160402052.lua | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 rush/c160402052.lua diff --git a/proc_rush.lua b/proc_rush.lua index c63506ed4c..6eda6ca0dd 100644 --- a/proc_rush.lua +++ b/proc_rush.lua @@ -10,7 +10,7 @@ local LEGEND_LIST={160001000,160205001,160418001,160002000,160421015,160404001,1 160210058,160440010,160016033,160016034,160440011,160211080,160402039,160017033,160402040,160429003,160320014, 160320038,160018036,160212004,160212003,160402044,160212075,160212001,160402045,160019063,160019064,160019065, 160213078,160213082,160402047,160213084,160020059,160213076,160020001,160020040,160020000,160214052,160323029, -160214020,160021065,160021027} +160214020,160021065,160021027,160402052} -- Returns if a card is a Legend. Can be updated if a GetOT function is added to the core function Card.IsLegend(c) return c:IsHasEffect(EFFECT_IS_LEGEND) or c:IsOriginalCode(table.unpack(LEGEND_LIST)) diff --git a/rush/c160402052.lua b/rush/c160402052.lua new file mode 100644 index 0000000000..9ba3948561 --- /dev/null +++ b/rush/c160402052.lua @@ -0,0 +1,27 @@ +--ボタニカル・ライオ +--Botanical Lion +local s,id=GetID() +function s.initial_effect(c) + --atk + 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.val) + c:RegisterEffect(e1) + --control + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetRange(LOCATION_MZONE) + e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) + e2:SetCondition(s.condition) + c:RegisterEffect(e2) +end +function s.val(e,c) + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),c:GetControler(),LOCATION_MZONE,0,nil)*300 +end +function s.condition(e) + return Duel.GetCurrentPhase()==PHASE_MAIN1 +end \ No newline at end of file From 4d8339ec66eac25ec8bbd9889912727a0aa0090f Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 26 May 2025 09:30:01 -0300 Subject: [PATCH 044/128] "Coach King Giantrainer" fix Fixed a bug where the part of the effect to inflict damage was considered to happen at the same time as drawing/revealing the card --- official/c30741334.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/official/c30741334.lua b/official/c30741334.lua index 9e0f7d8b0a..8c79975680 100644 --- a/official/c30741334.lua +++ b/official/c30741334.lua @@ -2,13 +2,13 @@ --Coach King Giantrainer local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,8,3) c:EnableReviveLimit() - --draw + --Xyz Summon procedure: 3 Level 8 monsters + Xyz.AddProcedure(c,nil,8,3) + --Draw 1 card and reveal it, then if it was a monster, inflict 800 damage to your opponent local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(3,id) @@ -18,9 +18,11 @@ function s.initial_effect(c) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.IsPhase(PHASE_MAIN1) - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end + c:RemoveOverlayCard(tp,1,1,REASON_COST) + --You cannot conduct your Battle Phase the turn you activate this effect local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) @@ -28,11 +30,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) + 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) 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) local ct=Duel.Draw(tp,1,REASON_EFFECT) @@ -40,6 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local dc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,dc) if dc:IsMonster() then + Duel.BreakEffect() Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) From 5238f5fc11d1bb5e656d99b24712928660ab264b Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 27 May 2025 22:38:53 +0300 Subject: [PATCH 045/128] Various script fixes - Amazoness Princess: Simplify the zone checking for the cost. - Hieratic Dragon of Gebeb: Shouldn't set the ATK/DEF to 0 with its 2nd effect. - Hieratic Seal From the Ashes: The 2nd effect should target and select the card on activation. The 3rd effect should activate even if there's no valid target since it's mandatory. - Mysterion the Dragon Crown: Should do nothing if the target is face-down on resolution. - Numeron Creation: Don't apply the effect if it's somehow already been applied by the time the card resolves. - Penguin Cleric: Should trigger even if the "Penguin" monster was face-down in the Monster Zone. - Phantom Fortress Enterblathnir: Should be able to chain the effect of "Ghost Belle & Haunted Mansion" if its GY banishing effect is used + removed "Spirit Elimination" handling. - The Agent of Mystery - Earth: Simplify the logic for searching "Master Hyperion". - The Despair Uranus: Simplify the logic for choosing what to Set. --- official/c13735899.lua | 59 +++++++++++----------- official/c32588805.lua | 52 +++++++------------ official/c42378577.lua | 55 ++++++++++----------- official/c46382143.lua | 21 ++++---- official/c53670497.lua | 110 +++++++++++++++++++---------------------- official/c73640163.lua | 67 +++++++++++-------------- official/c78033100.lua | 75 +++++++++++++--------------- official/c81846636.lua | 29 +++++------ official/c84539520.lua | 75 +++++++++++++--------------- official/c91188343.lua | 35 +++++-------- official/c95113856.lua | 49 +++++++++--------- 11 files changed, 281 insertions(+), 346 deletions(-) diff --git a/official/c13735899.lua b/official/c13735899.lua index 98c37ab1cd..4107ee87eb 100644 --- a/official/c13735899.lua +++ b/official/c13735899.lua @@ -3,8 +3,8 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --Fusion Summon c:EnableReviveLimit() + --Fusion Materials: 1 Spellcaster monster + 1 Dragon monster Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON)) --Cannot be used as Fusion Material local e0=Effect.CreateEffect(c) @@ -13,37 +13,38 @@ function s.initial_effect(c) e0:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e0:SetValue(1) c:RegisterEffect(e0) - --Decreak ATK by 100 per banished card + --This card loses 100 ATK for each of your banished cards local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(function(e,cc) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_REMOVED,0)*-100 end) c:RegisterEffect(e1) - --Banish monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.rmtg) - e2:SetOperation(s.rmop) - c:RegisterEffect(e2) - local g=Group.CreateGroup() - g:KeepAlive() - e2:SetLabelObject(g) - --Register summons + --Banish 1 Special Summoned monster, also banish all monsters from the field with its same original Type local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2a:SetCode(EVENT_SPSUMMON_SUCCESS) - e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_CUSTOM+id) e2a:SetRange(LOCATION_MZONE) - e2a:SetLabelObject(e2) - e2a:SetOperation(s.regop) + e2a:SetCountLimit(1,id) + e2a:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) + e2a:SetTarget(s.rmtg) + e2a:SetOperation(s.rmop) c:RegisterEffect(e2a) + local g=Group.CreateGroup() + g:KeepAlive() + e2a:SetLabelObject(g) + --Register summons + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2b:SetRange(LOCATION_MZONE) + e2b:SetLabelObject(e2a) + e2b:SetOperation(s.regop) + c:RegisterEffect(e2b) end function s.tgfilter(c,rc,e) return c:IsLocation(LOCATION_MZONE) and (rc==c or (c:IsFaceup() and rc:IsOriginalRace(c:GetOriginalRace()))) @@ -57,7 +58,6 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=e:GetLabelObject():Filter(s.tgfilter2,nil,e) if chkc then return g:IsContains(chkc) and s.tgfilter(chkc,nil) end if chk==0 then return #g>0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local tc=nil if #g==1 then tc=g:GetFirst() @@ -67,21 +67,18 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) tc=g:Select(tp,1,1,nil) Duel.SetTargetCard(tc) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local g=Group.FromCards(tc) - if tc:IsFaceup() then - g=g+Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsOriginalRace,tc:GetOriginalRace()),tp,LOCATION_MZONE,LOCATION_MZONE,tc) - end + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsOriginalRace,tc:GetOriginalRace()),tp,LOCATION_MZONE,LOCATION_MZONE,tc)+tc Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if Duel.HasFlagEffect(tp,id) or eg:IsContains(c) then return end + if eg:IsContains(c) then return end local rc=re:GetHandler() if not (re and re:IsActivated() and re:IsMonsterEffect() and rc) then return end local tg=eg:Filter(s.tgfilter,nil,rc) diff --git a/official/c32588805.lua b/official/c32588805.lua index 257471495e..45e2ac342e 100644 --- a/official/c32588805.lua +++ b/official/c32588805.lua @@ -1,66 +1,50 @@ ---The despair URANUS +--The despair URANUS --The Despair Uranus local s,id=GetID() function s.initial_effect(c) - --set + --Your opponent declares either Continuous Spell or Continuous Trap, then you Set 1 card of that type from your Deck 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:SetCondition(s.setcon) + e1:SetCondition(function(e,tp) return e:GetHandler():IsTributeSummoned() and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,nil) end) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1) - --atkup + --This card gains 300 ATK for each face-up Spell/Trap you control 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:SetValue(function(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpellTrap),e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*300 end) c:RegisterEffect(e2) - --indes + --Face-up cards in your Spell & Trap Zone cannot be destroyed by card effects local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,0) - e3:SetTarget(s.indtg) + e3:SetTargetRange(LOCATION_STZONE,0) + e3:SetTarget(function(e,c) return c:IsFaceup() end) e3:SetValue(1) c:RegisterEffect(e3) end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsTributeSummoned() - and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,nil) -end -function s.setfilter1(c) - return c:IsType(TYPE_CONTINUOUS) and c:IsSSetable() +function s.setfilter(c) + return c:IsContinuousSpellTrap() 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.setfilter1,tp,LOCATION_DECK,0,1,nil) end -end -function s.setfilter2(c,typ) - return c:GetType()==typ and c:IsSSetable() + and 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,1-tp,HINTMSG_OPTION) - local op=Duel.SelectOption(1-tp,71,72) + local op=Duel.SelectOption(1-tp,aux.Stringid(id,1),aux.Stringid(id,2)) + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then return end + local filter=op==0 and Card.IsContinuousSpell or Card.IsContinuousTrap Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=nil - if op==0 then g=Duel.SelectMatchingCard(tp,s.setfilter2,tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL+TYPE_CONTINUOUS) - else g=Duel.SelectMatchingCard(tp,s.setfilter2,tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP+TYPE_CONTINUOUS) end - if #g>0 then - Duel.SSet(tp,g:GetFirst()) + local sg=g:FilterSelect(tp,filter,1,1,nil) + if #sg>0 then + Duel.SSet(tp,sg) end -end -function s.atkfilter(c) - return c:IsSpellTrap() and c:IsFaceup() -end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(s.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*300 -end -function s.indtg(e,c) - return c:GetSequence()<5 and c:IsFaceup() end \ No newline at end of file diff --git a/official/c42378577.lua b/official/c42378577.lua index f29dec44b6..699cb610d4 100644 --- a/official/c42378577.lua +++ b/official/c42378577.lua @@ -3,36 +3,35 @@ 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) + --Special Summon 1 card from your Pendulum Zone local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) + e1:SetRange(LOCATION_SZONE) + 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) - --special summon + --Place 1 Pendulum Monster from your Monster Zone in your Pendulum Zone local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_SZONE) - e2:SetHintTiming(0,TIMING_END_PHASE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) + e2:SetTarget(s.pentg) + e2:SetOperation(s.penop) c:RegisterEffect(e2) - --place in pendulum zone - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetHintTiming(0,TIMING_END_PHASE) - e3:SetCountLimit(1,id) - e3:SetTarget(s.pentg) - e3:SetOperation(s.penop) - c:RegisterEffect(e3) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -43,7 +42,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) + 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() @@ -51,20 +50,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) -end function s.pentg(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) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsType(TYPE_PENDULUM) and chkc:IsFaceup() end if chk==0 then return Duel.CheckPendulumZones(tp) - and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_MZONE,0,1,1,nil) end function s.penop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.CheckPendulumZones(tp) then return end local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end \ No newline at end of file diff --git a/official/c46382143.lua b/official/c46382143.lua index 60f1b46bac..6a88555f45 100644 --- a/official/c46382143.lua +++ b/official/c46382143.lua @@ -3,8 +3,9 @@ --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 "Number" Dragon Xyz Monster from your Extra Deck, then attach this card on the field to it as material 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) @@ -14,28 +15,30 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_series={SET_GALAXY_EYES,SET_NUMBER} -function s.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetBaseAttack()>=3000 +function s.confilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:GetBaseAttack()>=3000 and c:IsFaceup() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)>=3 + return Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil) end function s.spfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return c:IsSetCard(SET_NUMBER) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end + if chk==0 then return not Duel.HasFlagEffect(tp,id) + and 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.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,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) then + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then Duel.BreakEffect() c:CancelToGrave() - Duel.Overlay(tc,c) + Duel.Overlay(sc,c) end end \ No newline at end of file diff --git a/official/c53670497.lua b/official/c53670497.lua index 2f57ab9c54..596f2da132 100644 --- a/official/c53670497.lua +++ b/official/c53670497.lua @@ -3,29 +3,40 @@ 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) + --Send 1 "Hieratic" monster from your Deck to the GY local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(s.target1) - e1:SetOperation(s.activate) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) c:RegisterEffect(e1) - --instant + --Return 1 of your banished "Hieratic" monsters to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetLabel(1) - e2:SetTarget(s.target2) - e2:SetOperation(s.activate) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.rtgtg) + e2:SetOperation(s.rtgop) c:RegisterEffect(e2) - --spsummmon + --Special Summon 1 "Hieratic" monster from your GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_TO_GRAVE) e3:SetCondition(s.spcon) @@ -34,71 +45,54 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_HIERATIC} -function s.filter1(c) +function s.tgfilter(c) return c:IsSetCard(SET_HIERATIC) and c:IsMonster() and c:IsAbleToGrave() end -function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(SET_HIERATIC) and c:IsMonster() +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.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local turnp=Duel.GetTurnPlayer() - if ((turnp~=tp and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil)) - or (turnp==tp and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_REMOVED,0,1,nil))) - and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then - if turnp==tp then - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED) - else - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - end - e:SetLabel(1) - e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) end end -function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) - local turnp=Duel.GetTurnPlayer() - if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 - and ((turnp~=tp and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil)) - or (turnp==tp and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_REMOVED,0,1,nil))) end - if turnp==tp then - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED) - else - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - end - e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) +function s.rtgfilter(c) + return c:IsSetCard(SET_HIERATIC) and c:IsMonster() and c:IsFaceup() end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()~=1 or not c:IsRelateToEffect(e) then return end - local turnp=Duel.GetTurnPlayer() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - if turnp~=tp then - local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) - else - local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) +function s.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return end + if chk==0 then return Duel.IsExistingTarget(s.rtgfilter,tp,LOCATION_REMOVED,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOGRAVE) + Duel.SelectTarget(tp,s.rtgfilter,tp,LOCATION_REMOVED,0,1,1,nil) +end +function s.rtgop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoGrave(tc,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) end -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsSetCard(SET_HIERATIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(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 + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return true 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) + if #g>0 then + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + end end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then + 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 diff --git a/official/c73640163.lua b/official/c73640163.lua index 644f860788..bb4775a6bc 100644 --- a/official/c73640163.lua +++ b/official/c73640163.lua @@ -1,81 +1,72 @@ --ペンギン僧侶 --Penguin Cleric --Logical Nonsense ---Substitute ID local s,id=GetID() function s.initial_effect(c) - --Special summon 1 of your "Penguin" monsters that was sent to GY + --Special Summon 1 of your "Penguin" monsters that was sent from your Monster Zone to your GY by an opponent's card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_TO_GRAVE) + e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetTarget(s.sstg) - e1:SetOperation(s.ssop) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Targeted "Penguin" monster gains 600 ATK, gain 600 LP + --Make 1 "Penguin" monster you control gain 600 ATK, and you gain 600 LP local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end - --Lists "Penguin" archetype s.listed_series={SET_PENGUIN} - --Check for a "Penguin" monster that was sent to GY by opponent's card -function s.cfilter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsPreviousSetCard(SET_PENGUIN) - and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) and c:IsCanBeEffectTarget(e) and c:IsPreviousPosition(POS_FACEUP) + and c:IsSetCard(SET_PENGUIN) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) and c:IsCanBeEffectTarget(e) end - --Activation legality -function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return s.cfilter(chkc,e,tp) end - if chk==0 then return eg:IsExists(s.cfilter,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(s.spfilter,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:Filter(s.cfilter,nil,e,tp) - local c=nil + local g=eg:Filter(s.spfilter,nil,e,tp) + local tc=nil if #g>1 then - c=g:Select(tp,1,1,nil):GetFirst() + tc=g:Select(tp,1,1,nil):GetFirst() else - c=g:GetFirst() + tc=g:GetFirst() end - Duel.SetTargetCard(c) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_GRAVE) + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,t,1,tp,0) end - --Special summon 1 of your "Penguin" monsters that was sent to GY -function s.ssop(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT|REASON_DISCARD)==1 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) + if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT|REASON_DISCARD)>0 and tc:IsRelateToEffect(e) + and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then + Duel.ConfirmCards(1-tp,tc) end end - --Check for a "Penguin" monster -function s.filter(c) - return c:IsFaceup() and c:IsSetCard(SET_PENGUIN) -end - --Activation legality 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.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsSetCard(SET_PENGUIN) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_PENGUIN),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_PENGUIN),tp,LOCATION_MZONE,0,1,1,nil) Duel.SetTargetPlayer(tp) Duel.SetTargetParam(600) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600) end - --Targeted "Penguin" monster gains 600 ATK, gain 600 LP 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 + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --It gains 600 ATK until the end of the turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) diff --git a/official/c78033100.lua b/official/c78033100.lua index ca0a582316..ffd0c71ea8 100644 --- a/official/c78033100.lua +++ b/official/c78033100.lua @@ -2,65 +2,56 @@ --Hieratic Dragon of Gebeb local s,id=GetID() function s.initial_effect(c) - --spsummon + --Special Summon 1 Dragon Normal Monster from your hand, Deck, or GY, and make its ATK/DEF 0 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(s.spcon) + e1:SetCondition(aux.bdogcon) e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetLabel(0) + e1:SetOperation(s.spop(s.normalspfilter)) + e1:SetLabel(1) c:RegisterEffect(e1) - -- + --Special Summon 1 "Hieratic" Normal Monster from your hand, Deck, or GY local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_RELEASE) e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetLabel(1) + e2:SetOperation(s.spop(s.hieraticspfilter)) c:RegisterEffect(e2) end s.listed_series={SET_HIERATIC} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and c:IsFaceup() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function s.spfilter1(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +function s.normalspfilter(c,e,tp) + return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.spfilter2(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsSetCard(SET_HIERATIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +function s.hieraticspfilter(c,e,tp) + return c:IsSetCard(SET_HIERATIC) and c:IsType(TYPE_NORMAL) 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 true end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=nil - if e:GetLabel()==0 then - g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) - else - g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) - end - local tc=g:GetFirst() - if not tc then return end - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENSE) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() +function s.spop(spfilter) + return function(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) and e:GetLabel()==1 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) + sc:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_SET_DEFENSE) + sc:RegisterEffect(e2) + end + Duel.SpecialSummonComplete() + end end \ No newline at end of file diff --git a/official/c81846636.lua b/official/c81846636.lua index eec986e9d7..f3f9d15a1c 100644 --- a/official/c81846636.lua +++ b/official/c81846636.lua @@ -2,34 +2,31 @@ --Gem-Knight Lazuli local s,id=GetID() function s.initial_effect(c) - --salvage + --Add 1 Normal Monster from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_RETURN)==0 and (r&REASON_EFFECT)~=0 -end -function s.filter(c) +function s.thfilter(c) return c:IsType(TYPE_NORMAL) 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 + 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.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_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 tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c84539520.lua b/official/c84539520.lua index 42aea6e600..3820c27b2b 100644 --- a/official/c84539520.lua +++ b/official/c84539520.lua @@ -2,7 +2,7 @@ --Amazoness Princess local s,id=GetID() function s.initial_effect(c) - --code + --This card's name becomes "Amazoness Queen" while on the field or in the GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -10,70 +10,63 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(15951532) c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) + --Add 1 "Amazoness" Spell/Trap from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Special Summon 1 "Amazoness" monster from your Deck in Defense Position, except "Amazoness Princess" + 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:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetCost(s.spcost) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetCost(s.spcost) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) end +s.listed_names={15951532,id} --"Amazoness Queen" s.listed_series={SET_AMAZONESS} -s.listed_names={id} -function s.filter(c) +function s.thfilter(c) return c:IsSetCard(SET_AMAZONESS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end + 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.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) end end -function s.costfilter(c,ft) - return c:IsAbleToGraveAsCost() and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) +function s.spcostfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c,ft) end - local g=nil + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - if ft<=0 then - g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE,0,1,1,c,ft) - else - g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c,ft) - end + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(SET_AMAZONESS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_AMAZONESS) 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) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c91188343.lua b/official/c91188343.lua index 02702a596f..d03f54d899 100644 --- a/official/c91188343.lua +++ b/official/c91188343.lua @@ -2,41 +2,32 @@ --The Agent of Mystery - Earth local s,id=GetID() function s.initial_effect(c) - --search + --Add 1 "The Agent" monster from your Deck to your hand, except "The Agent of Mystery - Earth", or if "The Sanctuary in the Sky" is on the field, you can add 1 "Master Hyperion" instead 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) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) c:RegisterEffect(e1) end s.listed_series={SET_THE_AGENT} -s.listed_names={55794644,CARD_SANCTUARY_SKY} -function s.filter1(c) - return c:IsSetCard(SET_THE_AGENT) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() +s.listed_names={id,CARD_SANCTUARY_SKY,55794644} --"Master Hyperion" +function s.thilter(c,sanct_chk) + return ((c:IsSetCard(SET_THE_AGENT) and c:IsMonster() and not c:IsCode(id)) or (sanct_chk and c:IsCode(55794644))) and c:IsAbleToHand() end -function s.filter2(c) - return ((c:IsSetCard(SET_THE_AGENT) and c:GetCode()~=id and c:IsMonster()) or c:IsCode(55794644)) and c:IsAbleToHand() -end -function s.envfilter(c) - return c:IsFaceup() and c:IsCode(CARD_SANCTUARY_SKY) -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) if chk==0 then - if not (Duel.IsExistingMatchingCard(s.envfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) or Duel.IsEnvironment(CARD_SANCTUARY_SKY)) then - return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil) end - return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil) + local sanct_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) or Duel.IsEnvironment(CARD_SANCTUARY_SKY) + return Duel.IsExistingMatchingCard(s.thilter,tp,LOCATION_DECK,0,1,nil,sanct_chk) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local g=nil +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local sanct_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) or Duel.IsEnvironment(CARD_SANCTUARY_SKY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - if not (Duel.IsExistingMatchingCard(s.envfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) or Duel.IsEnvironment(CARD_SANCTUARY_SKY)) then - g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil) - else g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_DECK,0,1,1,nil) end + local g=Duel.SelectMatchingCard(tp,s.thilter,tp,LOCATION_DECK,0,1,1,nil,sanct_chk) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) diff --git a/official/c95113856.lua b/official/c95113856.lua index 2484ab7a90..1d383868e7 100644 --- a/official/c95113856.lua +++ b/official/c95113856.lua @@ -2,43 +2,43 @@ --Phantom Fortress Enterblathnir local s,id=GetID() function s.initial_effect(c) - --Xyz Summon - Xyz.AddProcedure(c,nil,9,2) c:EnableReviveLimit() - --Banish from your opp Field, Hand, GY or Decktop + --Xyz Summon procedure: 2 Level 9 monsters + Xyz.AddProcedure(c,nil,9,2) + --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(Cost.Detach(1,1,nil)) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.rmfilter(c) - return c:IsAbleToRemove() and (not c:IsLocation(LOCATION_GRAVE) or aux.SpElimFilter(c)) -end -function s.bansc(tp,loc) --Banish check shortcut - return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,loc,1,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,1,nil) end - local b1=s.bansc(tp,LOCATION_ONFIELD) - local b2=s.bansc(tp,LOCATION_HAND) - local b3=(Duel.IsPlayerAffectedByEffect(1-tp,CARD_SPIRIT_ELIMINATION) and s.bansc(tp,LOCATION_MZONE)) or s.bansc(tp,LOCATION_GRAVE) - local b4=s.bansc(tp,LOCATION_DECK) +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 + local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) + local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) + local b3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) + local b4=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) local op=Duel.SelectEffect(tp, {b1,aux.Stringid(id,1)}, {b2,aux.Stringid(id,2)}, {b3,aux.Stringid(id,3)}, {b4,aux.Stringid(id,4)}) e:SetLabel(op) + local loc=(op==1 and LOCATION_ONFIELD) + or (op==2 and LOCATION_HAND) + or (op==3 and LOCATION_GRAVE) + or (op==4 and LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,loc) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.effop(e,tp,eg,ep,ev,re,r,rp) local op=e:GetLabel() if op==1 then + --Banish 1 card your opponent controls Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) if #g>0 then @@ -46,23 +46,22 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end elseif op==2 then + --Banish 1 random card from your opponent's hand local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) if #g>0 then local sg=g:RandomSelect(tp,1) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) end elseif op==3 then + --Banish 1 card from your opponent's GY Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g - if Duel.IsPlayerAffectedByEffect(1-tp,CARD_SPIRIT_ELIMINATION) then - g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - else - g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - end + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) if #g>0 then + Duel.HintSelection(g) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end elseif op==4 then + --Banish the top card of your opponent's Deck, face-up local g=Duel.GetDecktopGroup(1-tp,1) if #g>0 then Duel.DisableShuffleCheck() From 89e3bd46c026f3e7f8ff9ea2be0b93c714a65a4d Mon Sep 17 00:00:00 2001 From: Naim Date: Tue, 27 May 2025 17:52:40 -0300 Subject: [PATCH 046/128] Update cards names Added official english name to cards that were recently updated --- official/c18861006.lua | 2 +- official/c19715246.lua | 2 +- official/c22669793.lua | 2 +- official/c22812963.lua | 2 +- official/c22938501.lua | 2 +- official/c23151193.lua | 2 +- official/c30350202.lua | 2 +- official/c30964246.lua | 2 +- official/c31809476.lua | 2 +- official/c3743515.lua | 2 +- official/c38625110.lua | 2 +- official/c39138610.lua | 2 +- official/c39848658.lua | 2 +- official/c42021064.lua | 2 +- official/c43143567.lua | 2 +- official/c4398189.lua | 2 +- official/c4575541.lua | 2 +- official/c4965193.lua | 2 +- official/c5414777.lua | 2 +- official/c5800323.lua | 2 +- official/c58053438.lua | 2 +- official/c58201062.lua | 2 +- official/c58931850.lua | 2 +- official/c59323650.lua | 2 +- official/c65114115.lua | 2 +- official/c66102515.lua | 2 +- official/c66236707.lua | 2 +- official/c67171933.lua | 2 +- official/c67359907.lua | 2 +- official/c70538272.lua | 2 +- official/c78293584.lua | 2 +- official/c78693036.lua | 2 +- official/c79015062.lua | 2 +- official/c79415624.lua | 2 +- official/c81476402.lua | 2 +- official/c83711531.lua | 2 +- official/c87640391.lua | 2 +- official/c90386276.lua | 2 +- official/c90664684.lua | 2 +- official/c91509824.lua | 2 +- official/c94655777.lua | 2 +- official/c95718355.lua | 2 +- official/c96540807.lua | 2 +- official/c98888032.lua | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/official/c18861006.lua b/official/c18861006.lua index 274003d8a2..6add982a60 100644 --- a/official/c18861006.lua +++ b/official/c18861006.lua @@ -1,5 +1,5 @@ --紅天馬ファイヤー・ウイング・ペガサス ---Firewing Pegasus, the Crimson Heavenly Horse +--Crimson Firewing Pegasus --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c19715246.lua b/official/c19715246.lua index 4af3f8b566..423057f0a2 100644 --- a/official/c19715246.lua +++ b/official/c19715246.lua @@ -1,5 +1,5 @@ --サイバー・ヨルムンガンド ---Cyber Jormungandr +--Cyber Jormungardr --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c22669793.lua b/official/c22669793.lua index d2fe200c4c..d2d51cd61b 100644 --- a/official/c22669793.lua +++ b/official/c22669793.lua @@ -1,5 +1,5 @@ --貴き黄金郷のエルドリクシル ---Eldlixir of the Exalted Golden Land +--Eldlixir of the Glorious Golden Land --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) diff --git a/official/c22812963.lua b/official/c22812963.lua index 2169aed4b4..484e043c9e 100644 --- a/official/c22812963.lua +++ b/official/c22812963.lua @@ -1,5 +1,5 @@ --創世の神 デウテロノミオン ---Regenesis God Deuteronomion +--Regenesis Lord --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c22938501.lua b/official/c22938501.lua index 465352d3f0..f6c338cbff 100644 --- a/official/c22938501.lua +++ b/official/c22938501.lua @@ -1,5 +1,5 @@ --再世の導神 シェモース ---Regenesis Sage Shemot +--Regenesis Sage --Scripted by Satella local s,id=GetID() function s.initial_effect(c) diff --git a/official/c23151193.lua b/official/c23151193.lua index 5920d0e72a..9b75f12c6e 100644 --- a/official/c23151193.lua +++ b/official/c23151193.lua @@ -1,5 +1,5 @@ --断罪のディアベルスター ---Diabellstar the Sin Adjudicator +--Diabellstar Vengeance --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c30350202.lua b/official/c30350202.lua index 3728e3a175..0d1ac1cb7c 100644 --- a/official/c30350202.lua +++ b/official/c30350202.lua @@ -1,5 +1,5 @@ --凶征竜-エクレプシス ---Eclepsis, Dragon Ruler of Woes +--Eclipse, Dragon Ruler of Catastrophes --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c30964246.lua b/official/c30964246.lua index 273efd1a2f..400be42355 100644 --- a/official/c30964246.lua +++ b/official/c30964246.lua @@ -1,5 +1,5 @@ --ARG☆S-GiantKilling ---Argostars - Giant Hunting +--Argostars - Giantslaying --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c31809476.lua b/official/c31809476.lua index 730ff91a2d..712f32531f 100644 --- a/official/c31809476.lua +++ b/official/c31809476.lua @@ -1,5 +1,5 @@ --紋章の明滅 ---Heraldry Flash +--Flash of Heraldry --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c3743515.lua b/official/c3743515.lua index 60098d3f71..b02bf3cdff 100644 --- a/official/c3743515.lua +++ b/official/c3743515.lua @@ -1,5 +1,5 @@ --怒髪天衝セイバーザウルス ---Ferociously Angered Sabersaurus +--Steamed Sabersaurus --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c38625110.lua b/official/c38625110.lua index 6bb41c7e7f..8338128083 100644 --- a/official/c38625110.lua +++ b/official/c38625110.lua @@ -1,5 +1,5 @@ --夙めてはしろ 二人ではしろ ---Do it Early, Do it Together +--Let's Go Together --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) diff --git a/official/c39138610.lua b/official/c39138610.lua index 25eed615c5..e3cbd3b6cb 100644 --- a/official/c39138610.lua +++ b/official/c39138610.lua @@ -1,5 +1,5 @@ --アコード・トーカー@イグニスター ---Accode Talker @Ignister +--Allied Code Talker @Ignister --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) diff --git a/official/c39848658.lua b/official/c39848658.lua index 65cb1faf05..7b88872460 100644 --- a/official/c39848658.lua +++ b/official/c39848658.lua @@ -1,5 +1,5 @@ --ワイト・マスター ---Wight Master +--Wight Reanimator --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c42021064.lua b/official/c42021064.lua index 5d6b19e608..ddc8c7e556 100644 --- a/official/c42021064.lua +++ b/official/c42021064.lua @@ -1,5 +1,5 @@ --機動石器ドグラード ---Dogurado the Moving Stone Relic +--Dogurad, the Stonetrooper --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c43143567.lua b/official/c43143567.lua index 682fe24080..6be8e88139 100644 --- a/official/c43143567.lua +++ b/official/c43143567.lua @@ -1,5 +1,5 @@ --黄金郷のアンヘルカイド ---Angelcaido of the Golden Land +--Fallen Angel of the Golden Land --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) diff --git a/official/c4398189.lua b/official/c4398189.lua index 77cf4ffd77..d8797d816d 100644 --- a/official/c4398189.lua +++ b/official/c4398189.lua @@ -1,5 +1,5 @@ --白き森の魔女 ---Witches of the White Forest +--Witch of the White Forest --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c4575541.lua b/official/c4575541.lua index 6b82a87838..24cc0a258c 100644 --- a/official/c4575541.lua +++ b/official/c4575541.lua @@ -1,5 +1,5 @@ --超竜災禍 ---Dragocalamity +--Here There Be Dragons --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c4965193.lua b/official/c4965193.lua index 0794b847bd..2b38a9740e 100644 --- a/official/c4965193.lua +++ b/official/c4965193.lua @@ -1,5 +1,5 @@ --極征竜-シャスマティス ---Chasmatis, Dragon Ruler of Auroras +--Chasma, Dragon Ruler of Auroras --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c5414777.lua b/official/c5414777.lua index 353168b0d2..820113d738 100644 --- a/official/c5414777.lua +++ b/official/c5414777.lua @@ -1,5 +1,5 @@ --精霊の世界 ---The World of Spirits +--World of Spirits --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c5800323.lua b/official/c5800323.lua index 5ceec26bcc..4790d93819 100644 --- a/official/c5800323.lua +++ b/official/c5800323.lua @@ -1,5 +1,5 @@ --白き森の幻妖 ---Mystic Mystery of the White Forest +--Poplar of the White Forest --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c58053438.lua b/official/c58053438.lua index 94e73c9028..b8615a90fb 100644 --- a/official/c58053438.lua +++ b/official/c58053438.lua @@ -1,5 +1,5 @@ --列王詩篇 ---The Psalms of Kings +--Songs of the Dominators --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c58201062.lua b/official/c58201062.lua index 8719bdccde..e789fce69b 100644 --- a/official/c58201062.lua +++ b/official/c58201062.lua @@ -1,5 +1,5 @@ --光征竜-スペクトル ---Spector, Dragon Ruler of Rays +--Spectral, Dragon Ruler of Flickers --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c58931850.lua b/official/c58931850.lua index e2e4f2da4d..50b54590ad 100644 --- a/official/c58931850.lua +++ b/official/c58931850.lua @@ -1,5 +1,5 @@ --超究極魔導竜王 ---Dragon Master Lord +--Dragon Master Lords --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c59323650.lua b/official/c59323650.lua index 59308fc3c5..6c073b4fc2 100644 --- a/official/c59323650.lua +++ b/official/c59323650.lua @@ -1,5 +1,5 @@ --再世の龍神 ワイクラー ---Regenesis Dragon Vayikra +--Regenesis Dragon --Scripted by Satella local s,id=GetID() function s.initial_effect(c) diff --git a/official/c65114115.lua b/official/c65114115.lua index 580f45400e..baaf142bdb 100644 --- a/official/c65114115.lua +++ b/official/c65114115.lua @@ -1,5 +1,5 @@ --七星天流抜刀術-「破軍」 ---Seven Star Sky Style Battojutsu - "Hagun" +--Seven Stars Slash - Army Annihilator Hagun --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c66102515.lua b/official/c66102515.lua index a58037240a..8ce4475414 100644 --- a/official/c66102515.lua +++ b/official/c66102515.lua @@ -1,5 +1,5 @@ --クリクリンク@イグニスター ---Kurikulink @Ignister +--Kurikurinku @Ignister --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c66236707.lua b/official/c66236707.lua index 742cfe9bd6..8261cc8d68 100644 --- a/official/c66236707.lua +++ b/official/c66236707.lua @@ -1,5 +1,5 @@ --械刀婪魔皇断 ---Gordian Schneider +--Gordian Slicer --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c67171933.lua b/official/c67171933.lua index 01b6722975..bb350da666 100644 --- a/official/c67171933.lua +++ b/official/c67171933.lua @@ -1,5 +1,5 @@ --再世神 ---Torah Regenesis +--Regenesis Code --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c67359907.lua b/official/c67359907.lua index 7483670002..b7847dd700 100644 --- a/official/c67359907.lua +++ b/official/c67359907.lua @@ -1,5 +1,5 @@ --超征竜-ディザスター ---Disaster, Dragon Ruler of Paranormalities +--Disaster, Dragon Ruler of All Apocalypses --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) diff --git a/official/c70538272.lua b/official/c70538272.lua index b470ad57a7..98219b175e 100644 --- a/official/c70538272.lua +++ b/official/c70538272.lua @@ -1,5 +1,5 @@ --妖竜の禁姫 ---Philia Regis +--Filia Regis --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c78293584.lua b/official/c78293584.lua index 504902689a..9bf068ca92 100644 --- a/official/c78293584.lua +++ b/official/c78293584.lua @@ -1,5 +1,5 @@ --フィリアス・ディアベル ---Philias Diabell +--Filia Diabell --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c78693036.lua b/official/c78693036.lua index b5ae174749..5cdabb1852 100644 --- a/official/c78693036.lua +++ b/official/c78693036.lua @@ -1,5 +1,5 @@ --呪雷神ジュラ ---Jura the Curse-Thunder Deity +--Juraishin, the Cursed Thunder God --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c79015062.lua b/official/c79015062.lua index 5da10a08fb..dbc766a1e1 100644 --- a/official/c79015062.lua +++ b/official/c79015062.lua @@ -1,5 +1,5 @@ --繋がり-Ai- ---TA.I.es +--A.I. Connect --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c79415624.lua b/official/c79415624.lua index 726e545def..5127f0be6d 100644 --- a/official/c79415624.lua +++ b/official/c79415624.lua @@ -1,5 +1,5 @@ --蛇眼の断罪龍 ---Snake-Eyes Execute Dragon +--Snake-Eyes Vengeance Dragon --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c81476402.lua b/official/c81476402.lua index 6090919669..0570752d8d 100644 --- a/official/c81476402.lua +++ b/official/c81476402.lua @@ -1,5 +1,5 @@ --邪悪龍エビルナイト・ドラゴン ---Serpent Night Dragon, the Wicked Dragon +--Wicked Serpent Night Dragon --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c83711531.lua b/official/c83711531.lua index 568d11ea1a..23ad53a934 100644 --- a/official/c83711531.lua +++ b/official/c83711531.lua @@ -1,5 +1,5 @@ --真紅眼の鋼爪竜 ---Red-Eyes Metal Claw Dragon +--Red-Eyes Metal Claws Dragon --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c87640391.lua b/official/c87640391.lua index b789a6ebb5..932344f9fd 100644 --- a/official/c87640391.lua +++ b/official/c87640391.lua @@ -1,5 +1,5 @@ --リオート・ミグラトリー ---Zereort Migrator +--Migratory Zereort --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c90386276.lua b/official/c90386276.lua index c28f099bcd..50eaf07c86 100644 --- a/official/c90386276.lua +++ b/official/c90386276.lua @@ -1,5 +1,5 @@ --罪なき罪宝 ---Sinless Sinful Spoils +--Sinful Spoils Sanctification --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c90664684.lua b/official/c90664684.lua index 773e1debce..329d16d046 100644 --- a/official/c90664684.lua +++ b/official/c90664684.lua @@ -1,5 +1,5 @@ --竜華襲焉 ---Ryu-Ge Ruin +--Ryu-Ge End --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c91509824.lua b/official/c91509824.lua index 269d042b56..b94407261b 100644 --- a/official/c91509824.lua +++ b/official/c91509824.lua @@ -1,5 +1,5 @@ --Ai-ボウ ---PA.I.rtners +--SA.I.dekick --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c94655777.lua b/official/c94655777.lua index 231308924b..37c74763ba 100644 --- a/official/c94655777.lua +++ b/official/c94655777.lua @@ -1,5 +1,5 @@ --闇征竜-ネビュラス ---Nebulous, Dragon Ruler of Shadows +--Nebulus, Dragon Ruler of Mishaps --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c95718355.lua b/official/c95718355.lua index ce04f51073..9cd28016b5 100644 --- a/official/c95718355.lua +++ b/official/c95718355.lua @@ -1,5 +1,5 @@ --再世の魔神 ベミドバル ---Regenesis Archfiend Bemidbar +--Regenesis Archfiend --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c96540807.lua b/official/c96540807.lua index daf82bbc6a..a2ac1a595b 100644 --- a/official/c96540807.lua +++ b/official/c96540807.lua @@ -1,5 +1,5 @@ --再世の戦神 ベレシート ---Regenesis Warrior Beresheet +--Regenesis Warrior --Scripted by Satella local s,id=GetID() function s.initial_effect(c) diff --git a/official/c98888032.lua b/official/c98888032.lua index b369965575..64d974f518 100644 --- a/official/c98888032.lua +++ b/official/c98888032.lua @@ -1,5 +1,5 @@ --妖精胞スポーア ---Spore the Fairy Cell +--Spore the Fairy Seed --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) From 56d7a36b48c308c57f5bb76c221efb2f71d016bb Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 28 May 2025 07:11:30 +0200 Subject: [PATCH 047/128] fixed Shadow Flower Stance --- rush/c160005057.lua | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/rush/c160005057.lua b/rush/c160005057.lua index d7542afe3d..13b5ccf47c 100644 --- a/rush/c160005057.lua +++ b/rush/c160005057.lua @@ -1,10 +1,10 @@ --- 花牙踏み +--花牙踏み --Shadow Flower Stance - local s,id=GetID() function s.initial_effect(c) --change pos local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_POSITION) e1:SetCode(EVENT_ATTACK_ANNOUNCE) @@ -29,20 +29,21 @@ end function s.tdfilter(c) return c:IsMonster() and c:IsRace(RACE_PLANT) and c:IsAbleToDeckOrExtraAsCost() end +function s.posfilter(c) + return c:IsAttackPos() and c:IsCanChangePositionRush() +end function s.activate(e,tp,eg,ep,ev,re,r,rp) --Requirement local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,2,2,nil) Duel.HintSelection(td) - if Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_COST)~0 then - Duel.SortDeckbottom(tp,tp,2) - - local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENSE) - end - + Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_COST) + local g2=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK) + if #g2>1 then + Duel.SortDeckbottom(tp,tp,#g2) end -end -function s.posfilter(c) - return c:IsAttackPos() and c:IsCanChangePositionRush() -end + --Effect + local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.ChangePosition(g,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file From 8bc51e5572f326e701e17d6dbe6f061107c872d9 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 28 May 2025 13:07:23 -0300 Subject: [PATCH 048/128] Update card names in scripts --- official/c20584712.lua | 12 +++++++----- official/c21607304.lua | 23 +++++++++++++---------- official/c27642961.lua | 10 +++++----- official/c28340377.lua | 9 ++++----- official/c30979619.lua | 6 +++--- official/c37433748.lua | 2 +- official/c53989821.lua | 9 +++++---- official/c94096018.lua | 8 ++++---- official/c96334243.lua | 2 +- 9 files changed, 43 insertions(+), 38 deletions(-) diff --git a/official/c20584712.lua b/official/c20584712.lua index ac863a8a9b..2c182361d5 100644 --- a/official/c20584712.lua +++ b/official/c20584712.lua @@ -1,8 +1,8 @@ ---SPYRAL Tough +--SPYRAL-タフネス --SPYRAL Tough local s,id=GetID() function s.initial_effect(c) - --change name + --This card's name becomes "SPYRAL Super Agent" while it is on the field or in the GY. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(41091257) c:RegisterEffect(e1) - --destroy + --Reveal the top card of your opponent's Deck, and if you do, destroy a targeted card if the revealed card is the declared type local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) @@ -22,14 +22,16 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end +s.listed_names={41091257} --"SPYRAL Super Agent" function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - e:SetLabel(Duel.SelectOption(tp,70,71,72)) + e:SetLabel(Duel.SelectOption(tp,DECLTYPE_MONSTER,DECLTYPE_SPELL,DECLTYPE_TRAP)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + local tc=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end diff --git a/official/c21607304.lua b/official/c21607304.lua index 303dffe4a7..1a69e61c75 100644 --- a/official/c21607304.lua +++ b/official/c21607304.lua @@ -1,8 +1,8 @@ ---Subterror Behemoth Voltelluric +--サブテラーマリス・ボルティニア --Subterror Behemoth Voltelluric local s,id=GetID() function s.initial_effect(c) - --flip + --Take control of 1 Set monster your opponent controls until your next End Phase local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_CONTROL) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) - --special summon + --Special Summon this card from your hand in Defense Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - --turn set + --Change this card to face-down Defense Position local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_POSITION) @@ -41,15 +41,18 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.filter,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) local tc=Duel.GetFirstTarget() - local tct=1 - if Duel.IsTurnPlayer(1-tp) then tct=2 - elseif Duel.IsPhase(PHASE_END) then tct=3 end + local turn_count=1 + if Duel.IsTurnPlayer(1-tp) then + turn_count=2 + elseif Duel.IsPhase(PHASE_END) then + turn_count=3 + end if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.GetControl(tc,tp,PHASE_END,tct) + Duel.GetControl(tc,tp,PHASE_END,turn_count) end end function s.cfilter(c,tp) @@ -73,7 +76,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c27642961.lua b/official/c27642961.lua index a941ad8cf8..751926d29f 100644 --- a/official/c27642961.lua +++ b/official/c27642961.lua @@ -1,14 +1,14 @@ ---SPYRAL MISSION - Assault +--SPYRAL MISSION-強襲 --SPYRAL MISSION - Assault local s,id=GetID() function s.initial_effect(c) - --activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) c:RegisterEffect(e1) - --draw + --Draw 1 card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DRAW) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) - --spsummon + -- Special Summon 1 "SPYRAL" monster from your hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -36,7 +36,7 @@ s.listed_series={SET_SPYRAL} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() - --destroy + --Destroy this card during your 3rd End Phase after activation local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) diff --git a/official/c28340377.lua b/official/c28340377.lua index 53617c420a..f6669826d3 100644 --- a/official/c28340377.lua +++ b/official/c28340377.lua @@ -1,4 +1,4 @@ ---Court of Cards +--絵札の絆 --Court of Cards local s,id=GetID() function s.initial_effect(c) @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --Special Summon + --Special Summon 1 "Queen's Knight", "King's Knight", or "Jack's Knight" from your hand or GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - --Draw + --Draw cards equal to the number of cards you banish to activate this effect local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DRAW) @@ -59,8 +59,7 @@ function s.drcostfilter(c) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.rescon(sg,e,tp,mg) - return Duel.IsPlayerCanDraw(tp,#sg) - and sg:GetClassCount(Card.GetCode)==#sg + return Duel.IsPlayerCanDraw(tp,#sg) and sg:GetClassCount(Card.GetCode)==#sg end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) local cg=Duel.GetMatchingGroup(s.drcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,nil) diff --git a/official/c30979619.lua b/official/c30979619.lua index c9908b97b6..f074704b31 100644 --- a/official/c30979619.lua +++ b/official/c30979619.lua @@ -1,8 +1,8 @@ ---SPYRAL GEAR - Big Red +--SPYRAL GEAR-ビッグ・レッド --SPYRAL GEAR - Big Red local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 "SPYRAL" monster from the GY and equip it with this card local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) - --indes + --The monster equipped with this card cannot be destroyed by battle local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) diff --git a/official/c37433748.lua b/official/c37433748.lua index ac0aca67fb..02992ee851 100644 --- a/official/c37433748.lua +++ b/official/c37433748.lua @@ -1,4 +1,4 @@ ---SPYRAL GEAR - Last Resort +--SPYRAL GEAR-ラスト・リゾート --SPYRAL GEAR - Last Resort local s,id=GetID() function s.initial_effect(c) diff --git a/official/c53989821.lua b/official/c53989821.lua index c6f4aa072b..365ad5dd84 100644 --- a/official/c53989821.lua +++ b/official/c53989821.lua @@ -1,13 +1,14 @@ ---SPYRAL GEAR - Utility Wire +--SPYRAL GEAR-マルチワイヤー --SPYRAL GEAR - Utility Wire local s,id=GetID() function s.initial_effect(c) - --Activate + --Place 1 card your opponent controls on top of the Deck local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCondition(s.condition) @@ -15,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={41091257} +s.listed_names={41091257} --"SPYRAL Super Agent" function s.cfilter(c) return c:IsFaceup() and c:IsCode(41091257) end diff --git a/official/c94096018.lua b/official/c94096018.lua index c05f586e29..c6dc0280d2 100644 --- a/official/c94096018.lua +++ b/official/c94096018.lua @@ -1,8 +1,8 @@ ---SPYGAL Misty +--SPYGAL-ミスティ --SPYGAL Misty local s,id=GetID() function s.initial_effect(c) - --draw + --Reveal the top card of your opponent's Deck, and if you do, draw 1 card if it is a card of a declared type local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) @@ -15,7 +15,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - --to hand + --Return 1 "SPYRAL Super Agent" you control and 1 monster your opponent controls to the hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND) @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_names={41091257} +s.listed_names={41091257} --"SPYRAL Super Agent" function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end diff --git a/official/c96334243.lua b/official/c96334243.lua index 3af0d56bdd..878ec87c3b 100644 --- a/official/c96334243.lua +++ b/official/c96334243.lua @@ -1,4 +1,4 @@ ---Sea Monster of Theseus +--テセウスの魔棲物 --Sea Monster of Theseus local s,id=GetID() function s.initial_effect(c) From ba230de76745c4da6f120965e6b1b16fc637cb5e Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 28 May 2025 13:07:42 -0300 Subject: [PATCH 049/128] update c10515412.lua --- official/c10515412.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/official/c10515412.lua b/official/c10515412.lua index eff417cc1c..720e947905 100644 --- a/official/c10515412.lua +++ b/official/c10515412.lua @@ -80,8 +80,14 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_LEAVE_FIELD_P) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetReset(RESET_EVENT|RESETS_STANDARD) - e3:SetOperation(function(e) if e:GetLabelObject() then e:GetLabelObject():Reset() end end) + e3:SetOperation(s.reseteffect) e3:SetLabelObject(e2) tc:RegisterEffect(e3) end +end +function s.reseteffect(tp,eg,ep,ev,re,r,rp) + local on_act_eff=e:GetLabelObject() + if on_act_eff and not on_act_eff:IsDeleted() then + on_act_eff:Reset() + end end \ No newline at end of file From 8fcbebbca6c625077b4dc81b8afd4114f19985af Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 28 May 2025 15:29:51 -0300 Subject: [PATCH 050/128] Update c10515412.lua --- official/c10515412.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/official/c10515412.lua b/official/c10515412.lua index 720e947905..5820270bec 100644 --- a/official/c10515412.lua +++ b/official/c10515412.lua @@ -85,9 +85,9 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -function s.reseteffect(tp,eg,ep,ev,re,r,rp) +function s.reseteffect(e,tp,eg,ep,ev,re,r,rp) local on_act_eff=e:GetLabelObject() if on_act_eff and not on_act_eff:IsDeleted() then on_act_eff:Reset() end -end \ No newline at end of file +end From 250164a042c9ce9dbab55b49f325d9cfe10182e8 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Wed, 28 May 2025 20:25:09 -0700 Subject: [PATCH 051/128] Fix "Session Draw" - Nil param was causing issues with performing Xyz Summon after checking if both drawn cards were monsters with the same Level - Notation/script nomenclature update --- unofficial/c511001447.lua | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/unofficial/c511001447.lua b/unofficial/c511001447.lua index 905b725f05..1ad6ee1021 100644 --- a/unofficial/c511001447.lua +++ b/unofficial/c511001447.lua @@ -1,54 +1,52 @@ +--セッション・ドロー --Session Draw local s,id=GetID() function s.initial_effect(c) - --Activate + --Draw 1 extra card during your next Draw Phase, then Xyz Summon 1 Xyz Monster if both drawn cards are monsters with the same Level local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(s.activate) + e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() +function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DRAW) e1:SetCountLimit(1) - if Duel.IsTurnPlayer(tp) and ph==PHASE_DRAW then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) then e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(s.con) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) + e1:SetCondition(function(e) return Duel.GetTurnCount()~=e:GetLabel() end) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,1) end - e1:SetOperation(s.op) + e1:SetOperation(s.drawxyzop) Duel.RegisterEffect(e1,tp) end -function s.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() -end function s.xyzfilter(c,mg) return c:IsXyzSummonable(nil,mg,2,2) end -function s.op(e,tp,eg,ep,ev,re,r,rp) - if ep~=tp or Duel.GetCurrentPhase()~=PHASE_DRAW or Duel.GetTurnPlayer()~=tp +function s.drawxyzop(e,tp,eg,ep,ev,re,r,rp) + if ep~=tp or not Duel.IsPhase(PHASE_DRAW) or not Duel.IsTurnPlayer(tp) or (r&REASON_RULE)==0 then return end Duel.Hint(HINT_CARD,0,id) local tc1=eg:GetFirst() local tc2=Duel.GetDecktopGroup(tp,1):GetFirst() Duel.Draw(tp,1,REASON_EFFECT) if tc1 and tc2 then - local g=Group.FromCards(tc1,tc2) - Duel.ConfirmCards(1-tp,g) + local mg=Group.FromCards(tc1,tc2) + Duel.ConfirmCards(1-tp,mg) if tc1:IsMonster() and tc2:IsMonster() and tc1:GetLevel()==tc2:GetLevel() then - local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) + local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) if #xyzg>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() - Duel.XyzSummon(tp,xyz,g,nil,2,2) + Duel.XyzSummon(tp,xyz,mg,mg,2,2) end end end Duel.ShuffleHand(tp) -end \ No newline at end of file +end From b7cb50e7ba76bc6c2e069050fcc2cd743465b67b Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 29 May 2025 22:46:05 +0300 Subject: [PATCH 052/128] "Drawbread" + "Duel Academia Selection" official release script updates --- pre-release/c100444001.lua => official/c19222426.lua | 2 +- pre-release/c100444002.lua => official/c46221535.lua | 2 +- pre-release/c100444003.lua => official/c82616239.lua | 2 +- pre-release/c100200272.lua => official/c83838727.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename pre-release/c100444001.lua => official/c19222426.lua (99%) rename pre-release/c100444002.lua => official/c46221535.lua (99%) rename pre-release/c100444003.lua => official/c82616239.lua (99%) rename pre-release/c100200272.lua => official/c83838727.lua (99%) diff --git a/pre-release/c100444001.lua b/official/c19222426.lua similarity index 99% rename from pre-release/c100444001.lua rename to official/c19222426.lua index aa8e637ee6..337893954e 100644 --- a/pre-release/c100444001.lua +++ b/official/c19222426.lua @@ -83,4 +83,4 @@ function s.valcheck(e,c) if mg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_LEAVE),0,1) end -end \ No newline at end of file +end diff --git a/pre-release/c100444002.lua b/official/c46221535.lua similarity index 99% rename from pre-release/c100444002.lua rename to official/c46221535.lua index 98682443a1..a4a40fdfd6 100644 --- a/pre-release/c100444002.lua +++ b/official/c46221535.lua @@ -75,4 +75,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/pre-release/c100444003.lua b/official/c82616239.lua similarity index 99% rename from pre-release/c100444003.lua rename to official/c82616239.lua index a00ac365ad..f4bff8ccab 100644 --- a/pre-release/c100444003.lua +++ b/official/c82616239.lua @@ -51,4 +51,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_DINOSAUR|RACE_SEASERPENT) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end \ No newline at end of file +end diff --git a/pre-release/c100200272.lua b/official/c83838727.lua similarity index 99% rename from pre-release/c100200272.lua rename to official/c83838727.lua index 1a8e65ff88..bb62d81e76 100644 --- a/pre-release/c100200272.lua +++ b/official/c83838727.lua @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) --Discard 1 card Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end -end \ No newline at end of file +end From a2a7925d2b55d144b4f02602c64ecfb3cdefcd56 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 30 May 2025 11:12:09 -0300 Subject: [PATCH 053/128] "You're Finished" fix Updated the scritp to match the following rulings: - If you have no available Spell & Trap Zones when you would set it during the End Phase it should be be sent to the Graveyard instead of being Set. - If you cannot Set cards when you would set it during the End Phase this card should remain in the Monster Zone. --- official/c88346805.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/official/c88346805.lua b/official/c88346805.lua index 17af837b3d..28d6d380e2 100644 --- a/official/c88346805.lua +++ b/official/c88346805.lua @@ -48,8 +48,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.setop(ag,e,tp,eg,ep,ev,re,r,rp) local c=ag:GetFirst() - if c:IsLocation(LOCATION_MZONE) and c:IsSSetable(true) then + if not (c:IsLocation(LOCATION_MZONE) and Duel.CanPlayerSetSpellTrap(tp,c)) then return end + if c:IsSSetable() then Duel.SSet(tp,c,tp,false) + else + Duel.SendtoGrave(c,REASON_RULE) end end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,4 +67,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SSet(tp,c,tp,false) end -end \ No newline at end of file +end From 8a32e4f2053f0d23c8b989fcbd380e5712a69329 Mon Sep 17 00:00:00 2001 From: Naim Date: Sat, 31 May 2025 14:13:08 -0300 Subject: [PATCH 054/128] "Alien Shocktrooper M-Frame" update - place the counters automatically when there is only 1 valid monster - added a description to be shown when the player is prompted to select a monster to place counters on --- official/c74974229.lua | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/official/c74974229.lua b/official/c74974229.lua index a5aebe88f9..ca46e8aa62 100644 --- a/official/c74974229.lua +++ b/official/c74974229.lua @@ -1,12 +1,11 @@ --エーリアン・ソルジャー M/フレーム --Alien Shocktrooper M-Frame --scripted by Logical Nonsense ---Substitute ID local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_REPTILE),2,2) - --Discard to place A-counters, quick-play effect + --Place A-Counters equal to the original Level of a discarded monster on face-up monster(s) on the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_COUNTER) @@ -19,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) - --If destroyed, reptile Soul Charge, trigger effect + --Special Summon non-Link Reptile monsters with different names from your GY, up to the number of monsters your opponent controls with A-Counters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -33,11 +32,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.counter_place_list={COUNTER_A} - --Defining cost function s.costfilter(c) return c:IsMonster() and c:IsDiscardable() and c:GetOriginalLevel()>0 end - --Cost of discarding a monster card with a level function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) @@ -45,40 +42,38 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(g:GetFirst():GetOriginalLevel()) Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end - --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end end - --Performing the effect of placing counters function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if #g==0 then return end - for i=1,e:GetLabel() do - local sg=g:Select(tp,1,1,nil) - sg:GetFirst():AddCounter(COUNTER_A,1) + if #g==1 then + g:GetFirst():AddCounter(COUNTER_A,1) + else + for i=1,e:GetLabel() do + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) + local tc=g:Select(tp,1,1,nil):GetFirst() + tc:AddCounter(COUNTER_A,1) + end end end - --Check if this card was destroyed function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end - --Check for opponent's monsters with A-Counters function s.acfilter(c) return c:GetCounter(COUNTER_A)>0 end - --Check for non-link reptile monsters that can be special summoned function s.spfilter(c,e,tp) return c:IsRace(RACE_REPTILE) and not c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - --Activation legality 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.acfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end - --Special summon reptile monsters from the GY function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=Duel.GetMatchingGroupCount(s.acfilter,tp,0,LOCATION_MZONE,nil) From 410500a7edc43fc6ceeda21ac3f4667a4e0ddbf5 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Sat, 31 May 2025 12:06:56 -0700 Subject: [PATCH 055/128] Update "Black-Winged Dragon (Anime)" --- unofficial/c511027112.lua | 61 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/unofficial/c511027112.lua b/unofficial/c511027112.lua index 85e7ad46bc..273f403c41 100644 --- a/unofficial/c511027112.lua +++ b/unofficial/c511027112.lua @@ -3,57 +3,53 @@ --Scripted by Rundas local s,id=GetID() function s.initial_effect(c) - --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() - --damage negation battle + --Synchro Summon procedure: 1 Tuner + 1 or more non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --If you would take damage, except from a battle involving this card, you can make this card lose that much ATK instead. (Battle damage register) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.con1) - e1:SetTarget(s.tg1) - e1:SetOperation(s.op1) + e1:SetCondition(function(e) return Duel.GetBattleDamage(e:GetHandlerPlayer())>0 end) + e1:SetTarget(s.batdamtg) + e1:SetOperation(s.batdamop) c:RegisterEffect(e1) - --damage negation card effect + --If you would take damage, except from a battle involving this card, you can make this card lose that much ATK instead. (Effect damage register) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.con2) - e2:SetTarget(s.tg2) - e2:SetOperation(s.op2) + e2:SetCondition(s.effdamcon) + e2:SetTarget(s.effdamtg) + e2:SetOperation(s.effdamop) c:RegisterEffect(e2) - --attack down + --This card loses ATK equal to the damage you would have taken local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(s.flagval) c:RegisterEffect(e3) - --regain atk + atkdown + --Make the ATK lost from the above effect 0 and if you do, monsters your opponent controls lose ATK equal to the ATK gained local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetTarget(s.tg3) - e4:SetOperation(s.op3) + e4:SetTarget(s.atktg) + e4:SetOperation(s.atkop) c:RegisterEffect(e4) end ---damage negation battle -function s.con1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetBattleDamage(tp)>0 -end -function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk) +function s.batdamtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetAttack()>=Duel.GetBattleDamage(tp) and not c:IsRelateToBattle() end end -function s.op1(e,tp,eg,ep,ev,re,r,rp) +function s.batdamop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end local c=e:GetHandler() - if c:GetFlagEffect(id)==0 then c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,0) end + if c:GetFlagEffect(id)==0 then c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,0) end if Duel.SelectEffectYesNo(tp,c) then Duel.HintSelection(Group.FromCards(c)) Duel.Hint(HINT_CARD,1-tp,id) @@ -62,8 +58,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp) Duel.ChangeBattleDamage(tp,0) end end ---damage negation card effect -function s.con2(e,tp,eg,ep,ev,re,r,rp) +function s.effdamcon(e,tp,eg,ep,ev,re,r,rp) local e1=Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DAMAGE) local e2=Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_RECOVER) local rd=e1 and not e2 @@ -82,13 +77,13 @@ function s.con2(e,tp,eg,ep,ev,re,r,rp) return false end end -function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk) +function s.effdamtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttack()>=e:GetLabel() end end -function s.op2(e,tp,eg,ep,ev,re,r,rp) +function s.effdamop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end local c=e:GetHandler() - if c:GetFlagEffect(id)==0 then c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,0) end + if c:GetFlagEffect(id)==0 then c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,0) end if Duel.SelectEffectYesNo(tp,c) then Duel.HintSelection(Group.FromCards(c)) Duel.Hint(HINT_CARD,1-tp,id) @@ -113,23 +108,25 @@ function s.refcon(e,re,val,r,rp,rc) if cid==e:GetLabel() then return 0 else return val end end ---attack down +--Value registration for lowering this card's ATK function s.flagval(e,c) return e:GetHandler():GetFlagEffectLabel(id) and -e:GetHandler():GetFlagEffectLabel(id) or 0 end ---regain atk + atkdown -function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk) +--This card gains ATK equal to the ATK lost, then monsters your opponent controls lose ATK equal to the ATK gained +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffectLabel(id) and e:GetHandler():GetFlagEffectLabel(id)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end -function s.op3(e,tp,eg,ep,ev,re,r,rp) +function s.atk(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - for tc in aux.Next(Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)) do + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) + for tc in g:Iter() do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-c:GetFlagEffectLabel(id)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end c:SetFlagEffectLabel(id,0) -end \ No newline at end of file +end From bf633e6dc22ab3602af19d42aaf730362d7c216a Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Sat, 31 May 2025 12:07:48 -0700 Subject: [PATCH 056/128] Update "Black-Winged Dragon (Anime) --- unofficial/c511027112.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial/c511027112.lua b/unofficial/c511027112.lua index 273f403c41..a6814416de 100644 --- a/unofficial/c511027112.lua +++ b/unofficial/c511027112.lua @@ -116,7 +116,7 @@ end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffectLabel(id) and e:GetHandler():GetFlagEffectLabel(id)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end -function s.atk(e,tp,eg,ep,ev,re,r,rp) +function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) From 8917076bcbe17bd5da1444ceadb662878bd96068 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Mon, 2 Jun 2025 07:25:16 +0200 Subject: [PATCH 057/128] added scripts for new alt arts --- rush/c160021121.lua | 3 +++ rush/c160021122.lua | 3 +++ rush/c160021126.lua | 3 +++ rush/c160021128.lua | 3 +++ rush/c160021140.lua | 3 +++ 5 files changed, 15 insertions(+) create mode 100644 rush/c160021121.lua create mode 100644 rush/c160021122.lua create mode 100644 rush/c160021126.lua create mode 100644 rush/c160021128.lua create mode 100644 rush/c160021140.lua diff --git a/rush/c160021121.lua b/rush/c160021121.lua new file mode 100644 index 0000000000..324f827cb6 --- /dev/null +++ b/rush/c160021121.lua @@ -0,0 +1,3 @@ +--P・M レノアール +--Plasmatic Model Lenoir +Duel.LoadCardScriptAlias(160021021) diff --git a/rush/c160021122.lua b/rush/c160021122.lua new file mode 100644 index 0000000000..19736a5395 --- /dev/null +++ b/rush/c160021122.lua @@ -0,0 +1,3 @@ +--P・M リステラ +--Plasmatic Model Lystella +Duel.LoadCardScriptAlias(160021022) diff --git a/rush/c160021126.lua b/rush/c160021126.lua new file mode 100644 index 0000000000..d85947f751 --- /dev/null +++ b/rush/c160021126.lua @@ -0,0 +1,3 @@ +--洗礼のプロトリオン +--Dedicated Protorion +Duel.LoadCardScriptAlias(160021026) diff --git a/rush/c160021128.lua b/rush/c160021128.lua new file mode 100644 index 0000000000..a14d9c3fbd --- /dev/null +++ b/rush/c160021128.lua @@ -0,0 +1,3 @@ +--永遠のルリグラ +--Rurigra the Eternal +Duel.LoadCardScriptAlias(160021028) diff --git a/rush/c160021140.lua b/rush/c160021140.lua new file mode 100644 index 0000000000..83fa43c6ff --- /dev/null +++ b/rush/c160021140.lua @@ -0,0 +1,3 @@ +--花牙華艶メイカ・エトランゼ +--Meika Etraynze the Shadow Flower Fiery Flower Beauty +Duel.LoadCardScriptAlias(160021040) From 096fc9ca37edf6302d4f3ceb4a018814fd133c7d Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Mon, 2 Jun 2025 14:35:33 +0200 Subject: [PATCH 058/128] added new rush cards --- rush/c160215001.lua | 6 ++++ rush/c160215002.lua | 42 ++++++++++++++++++++++ rush/c160215005.lua | 35 ++++++++++++++++++ rush/c160215008.lua | 11 ++++++ rush/c160215009.lua | 23 ++++++++++++ rush/c160215012.lua | 37 +++++++++++++++++++ rush/c160215013.lua | 45 +++++++++++++++++++++++ rush/c160215014.lua | 61 +++++++++++++++++++++++++++++++ rush/c160215015.lua | 48 +++++++++++++++++++++++++ rush/c160215019.lua | 88 +++++++++++++++++++++++++++++++++++++++++++++ rush/c160215023.lua | 16 +++++++++ rush/c160215024.lua | 51 ++++++++++++++++++++++++++ rush/c160215071.lua | 57 +++++++++++++++++++++++++++++ 13 files changed, 520 insertions(+) create mode 100644 rush/c160215001.lua create mode 100644 rush/c160215002.lua create mode 100644 rush/c160215005.lua create mode 100644 rush/c160215008.lua create mode 100644 rush/c160215009.lua create mode 100644 rush/c160215012.lua create mode 100644 rush/c160215013.lua create mode 100644 rush/c160215014.lua create mode 100644 rush/c160215015.lua create mode 100644 rush/c160215019.lua create mode 100644 rush/c160215023.lua create mode 100644 rush/c160215024.lua create mode 100644 rush/c160215071.lua diff --git a/rush/c160215001.lua b/rush/c160215001.lua new file mode 100644 index 0000000000..cf4bdd6f9c --- /dev/null +++ b/rush/c160215001.lua @@ -0,0 +1,6 @@ +--ゼラ +--Zera the Mant +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() +end \ No newline at end of file diff --git a/rush/c160215002.lua b/rush/c160215002.lua new file mode 100644 index 0000000000..15cbc68c76 --- /dev/null +++ b/rush/c160215002.lua @@ -0,0 +1,42 @@ +--邪悪なる魔族ゼラ +--Zera the Wicked +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Ritual + c:EnableReviveLimit() + --Special Summon + 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:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.cfilter(c) + return c:IsMonster() and c:IsType(TYPE_NORMAL) and c:IsAttack(1600) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_RITUAL) + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_FIEND) and not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE) +end +function s.operation(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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) +end \ No newline at end of file diff --git a/rush/c160215005.lua b/rush/c160215005.lua new file mode 100644 index 0000000000..ce16dc66c5 --- /dev/null +++ b/rush/c160215005.lua @@ -0,0 +1,35 @@ +--ゼラの放浪者 +--Wanderer of Zera +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Summon with 1 tribute + local e0=aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.cfilter) + --Set 1 card + 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:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={81756897} +function s.cfilter(c) + return c:IsType(TYPE_NORMAL) and c:GetBaseAttack()==1600 +end +function s.setfilter(c) + return c:IsCode(81756897) and c:IsSSetable() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g==0 then return end + Duel.SSet(tp,g) +end \ No newline at end of file diff --git a/rush/c160215008.lua b/rush/c160215008.lua new file mode 100644 index 0000000000..395a0399a2 --- /dev/null +++ b/rush/c160215008.lua @@ -0,0 +1,11 @@ +--ゼラの儀式 +--Zera Ritual +local s,id=GetID() +function s.initial_effect(c) + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=s.ritualfil}) + c:RegisterEffect(e1) +end +s.listed_names={69123138} +function s.ritualfil(c) + return c:IsCode(69123138) +end \ No newline at end of file diff --git a/rush/c160215009.lua b/rush/c160215009.lua new file mode 100644 index 0000000000..587f66c5d0 --- /dev/null +++ b/rush/c160215009.lua @@ -0,0 +1,23 @@ +--ゼラの降臨 +--Zera Advent +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --name change + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_CHANGE_CODE) + e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e0:SetRange(LOCATION_GRAVE) + e0:SetValue(81756897) + c:RegisterEffect(e0) + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=s.ritualfil,matfilter=s.forcedgroup}) + c:RegisterEffect(e1) +end +s.listed_names={69123138,160215002} +function s.ritualfil(c) + return c:IsCode(69123138,160215002) +end +function s.forcedgroup(c,e,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() +end \ No newline at end of file diff --git a/rush/c160215012.lua b/rush/c160215012.lua new file mode 100644 index 0000000000..c11a636836 --- /dev/null +++ b/rush/c160215012.lua @@ -0,0 +1,37 @@ +--デビルズクロー +--Jagged Claw Attack +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={69123138} +function s.cfilter(c) + return c:IsFaceup() and c:IsCode(69123138) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMatchingGroupCount(Card.IsNotMaximumModeSide,tp,0,LOCATION_ONFIELD,nil)>0 end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + --Effect + local dg=Duel.GetMatchingGroup(Card.IsNotMaximumModeSide,tp,0,LOCATION_ONFIELD,nil) + if #dg>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sg=dg:Select(tp,1,1,nil) + local sg2=sg:AddMaximumCheck() + Duel.HintSelection(sg2) + Duel.Destroy(sg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/rush/c160215013.lua b/rush/c160215013.lua new file mode 100644 index 0000000000..6fa1460bd2 --- /dev/null +++ b/rush/c160215013.lua @@ -0,0 +1,45 @@ +--ゼラの魔炎弾 +--Wicked Fire Blast of Zera +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) +end +s.listed_names={69123138} +function s.cfilter(c) + return c:IsFaceup() and c:IsCode(69123138) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + if #eg~=1 then return false end + local tc=eg:GetFirst() + return tc:IsFaceup() and tc:IsSummonPlayer(1-tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsNotMaximumModeSide,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + --Effect + local g=Duel.GetMatchingGroup(Card.IsNotMaximumModeSide,tp,0,LOCATION_ONFIELD,nil) + if #g==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=g:Select(tp,1,1,nil) + local dg2=dg:AddMaximumCheck() + Duel.HintSelection(dg2) + if Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Duel.Damage(1-tp,1000,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/rush/c160215014.lua b/rush/c160215014.lua new file mode 100644 index 0000000000..bb4d114241 --- /dev/null +++ b/rush/c160215014.lua @@ -0,0 +1,61 @@ +--なほいとをかしまいひめ +--Ever-Grace Princess Mai +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Ritual + c:EnableReviveLimit() + --This card cannot be destroyed by card 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) + e1:SetCondition(function(e) return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={160004013} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end + --Effect + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetDescription(3001) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_CLIENT_HINT) + e1:SetRange(LOCATION_MZONE) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + e1:SetValue(1) + c:RegisterEffect(e1) + local sg=Duel.GetMatchingGroup(aux.FilterMaximumSideFunctionEx(Card.IsMonster),tp,0,LOCATION_MZONE,nil) + if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,160004013) and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local tg=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(Card.IsMonster),tp,0,LOCATION_MZONE,1,1,nil) + local tg2=tg:AddMaximumCheck() + Duel.HintSelection(tg2) + if Duel.Destroy(tg,REASON_EFFECT)>0 then + --Cannot attack directly + local e2=Effect.CreateEffect(c) + e2:SetDescription(3207) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e2:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e2) + end + end +end \ No newline at end of file diff --git a/rush/c160215015.lua b/rush/c160215015.lua new file mode 100644 index 0000000000..283ed4f137 --- /dev/null +++ b/rush/c160215015.lua @@ -0,0 +1,48 @@ +--なほいとをかしまりひめ +--Ever-Grace Princess Mari +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Ritual + c:EnableReviveLimit() + --Gain 700 ATK + 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:SetCondition(function(e) return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) + e1:SetCost(s.cost) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={160004013} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end + --Effect + local c=e:GetHandler() + --Increase ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(700) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,160004013) then + --Can make up to 2 attacks on monsters + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetRange(LOCATION_MZONE) + e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) + e2:SetValue(1) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/rush/c160215019.lua b/rush/c160215019.lua new file mode 100644 index 0000000000..dcc1db0626 --- /dev/null +++ b/rush/c160215019.lua @@ -0,0 +1,88 @@ +--いとをかしまりひめ +--Grace Princess Mari +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Special summon procedure + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetRange(LOCATION_HAND) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Gain ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(s.cost) + e2:SetTarget(s.target) + e2:SetOperation(s.operation) + c:RegisterEffect(e2) +end +s.listed_names={160004013,160215023} +function s.spcfilter(c) + return c:IsMonster() and c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) and c:IsDefense(1400) and not c:IsPublic() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_HAND,0,nil) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) + local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_HAND,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + g:DeleteGroup() +end +function s.cost(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 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,600) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:IsCode(160004013,160215023) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoGrave(g,REASON_COST)<1 then return end + --Effect + local c=e:GetHandler() + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(600) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:RegisterEffect(e1) + if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end \ No newline at end of file diff --git a/rush/c160215023.lua b/rush/c160215023.lua new file mode 100644 index 0000000000..08f893e853 --- /dev/null +++ b/rush/c160215023.lua @@ -0,0 +1,16 @@ +--いとをかしはかまき +--Grace Hakama Fitting Ceremony +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=s.ritualfil,matfilter=s.forcedgroup}) + c:RegisterEffect(e1) +end +s.listed_names={160215014,160215015} +function s.ritualfil(c) + return c:IsCode(160215014,160215015) +end +function s.forcedgroup(c,e,tp) + return c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_LIGHT) and (c:IsLocation(LOCATION_MZONE) or c:IsType(TYPE_NORMAL)) +end \ No newline at end of file diff --git a/rush/c160215024.lua b/rush/c160215024.lua new file mode 100644 index 0000000000..bd0165034d --- /dev/null +++ b/rush/c160215024.lua @@ -0,0 +1,51 @@ +--いとをかししあわせにっき +--Grace Happiness Diary +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + -- Add excavated monster to hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.cfilter(c) + return c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_LIGHT) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,3,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.filter(c) + return ((c:IsMonster() and c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_LIGHT)) or c:IsRitualSpell()) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end + Duel.ConfirmDecktop(tp,3) + local g=Duel.GetDecktopGroup(tp,3) + Duel.DisableShuffleCheck() + if g:IsExists(s.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tg=g:FilterSelect(tp,s.filter,1,1,nil) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,tg) + Duel.ShuffleHand(tp) + g:RemoveCard(tg) + end + end + local ct=#g + if ct>0 then + Duel.MoveToDeckBottom(ct,tp) + Duel.SortDeckbottom(tp,tp,ct) + end +end \ No newline at end of file diff --git a/rush/c160215071.lua b/rush/c160215071.lua new file mode 100644 index 0000000000..b5a0ad2ec2 --- /dev/null +++ b/rush/c160215071.lua @@ -0,0 +1,57 @@ +--ストラトハンマー・ミョルニル +--Stratohammer Mjolnir +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --summon without tribute + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_SUMMON_PROC) + e0:SetCondition(s.ntcon) + c:RegisterEffect(e0) + --Make 1 of your monsters gain 4 levels + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.ntcon(e,c,minc) + if c==nil then return true end + return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) + or Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Requirement + local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) + local b2=Duel.IsPlayerCanDiscardDeckAsCost(tp,2) + local op=Duel.SelectEffect(tp,{b1,aux.Stringid(id,1)},{b2,aux.Stringid(id,2)}) + if op==1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,c) + if Duel.SendtoGrave(g,REASON_COST)==0 then return end + elseif op==2 then + if Duel.DiscardDeck(tp,2,REASON_COST)<0 then return end + end + --Effect + local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + local tc=g:GetFirst() + tc:UpdateLevel(4,RESETS_STANDARD_PHASE_END,c) + end +end \ No newline at end of file From f8818f059edc1f7468ca7c9deeda1f941e5040d2 Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 2 Jun 2025 13:45:05 -0300 Subject: [PATCH 059/128] "Battle Royal Mode - Joining" fix Fixed a bug in which the player would still be prompted to Special Summon a monster even when they did not have a zone available --- official/c65433790.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/official/c65433790.lua b/official/c65433790.lua index a9e5e6fcdd..7cec4dfc29 100644 --- a/official/c65433790.lua +++ b/official/c65433790.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate by targeting 1 monster aux.AddPersistentProcedure(c,PLAYER_ALL,aux.FaceupFilter(Card.IsType,TYPE_EFFECT)) - --Cannot be destroyed by battle the first two times + --The first two times that monster would be destroyed by battle each turn, it is not destroyed local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) @@ -15,14 +15,14 @@ function s.initial_effect(c) e1:SetTarget(aux.PersistentTargetFilter) e1:SetValue(function(_,_,r) return r&REASON_BATTLE==REASON_BATTLE end) c:RegisterEffect(e1) - --Destroying player gains 2000 LP + --When it is destroyed by battle, the player that destroyed it gains 2000 LP local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetOperation(s.lpop) c:RegisterEffect(e2) - --Special Summon 1 Level 4 or lower monster + --Special Summon 1 Level 4 or lower monster from your hand or Deck, but lose 2000 LP local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -44,9 +44,10 @@ function s.spfilter(c,e,tp) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) - or not Duel.IsExistingMatchingCard(s.spfilter,ep,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,ep) - or not Duel.SelectYesNo(ep,aux.Stringid(id,1)) then return end + if not (c:IsRelateToEffect(e) + and Duel.GetLocationCount(ep,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,ep,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,ep) + and Duel.SelectYesNo(ep,aux.Stringid(id,1)) then return end Duel.Hint(HINT_SELECTMSG,ep,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(ep,s.spfilter,ep,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,ep) if #sg>0 and Duel.SpecialSummon(sg,0,ep,ep,false,false,POS_FACEUP)>0 then From 9ea3b72cc6e6892863d3cde73804161f11751778 Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 2 Jun 2025 13:47:51 -0300 Subject: [PATCH 060/128] missing parentheses --- official/c65433790.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c65433790.lua b/official/c65433790.lua index 7cec4dfc29..bb22276a21 100644 --- a/official/c65433790.lua +++ b/official/c65433790.lua @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(ep,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,ep,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,ep) - and Duel.SelectYesNo(ep,aux.Stringid(id,1)) then return end + and Duel.SelectYesNo(ep,aux.Stringid(id,1))) then return end Duel.Hint(HINT_SELECTMSG,ep,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(ep,s.spfilter,ep,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,ep) if #sg>0 and Duel.SpecialSummon(sg,0,ep,ep,false,false,POS_FACEUP)>0 then From 7e04828419c79b2d47fe2dc6c17a48794b9d03ed Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 2 Jun 2025 17:38:27 -0300 Subject: [PATCH 061/128] Update "Duelist Kingdom" It was calling an incorrect string for the victory reason when the duel finished due to its rules --- unofficial/c511002621.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial/c511002621.lua b/unofficial/c511002621.lua index af9b3423a2..055f765cbd 100644 --- a/unofficial/c511002621.lua +++ b/unofficial/c511002621.lua @@ -149,7 +149,7 @@ function s.wincon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetActivityCount(p,ACTIVITY_SPSUMMON)==0 and Duel.GetActivityCount(p,ACTIVITY_FLIPSUMMON)==0 end function s.winop(e,tp,eg,ep,ev,re,r,rp) - local WIN_REASON=0x58 + local WIN_REASON=0x5a local p=Duel.GetTurnPlayer() if Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)==0 and Duel.GetActivityCount(p,ACTIVITY_NORMALSUMMON)==0 and Duel.GetActivityCount(p,ACTIVITY_SPSUMMON)==0 and Duel.GetActivityCount(p,ACTIVITY_FLIPSUMMON)==0 then From db9e4838353348a826e3ba30acd88c55f0acce55 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 3 Jun 2025 06:26:28 +0200 Subject: [PATCH 062/128] fixed Emergency Return --- rush/c160203004.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rush/c160203004.lua b/rush/c160203004.lua index af4c83c90f..488b8b5422 100644 --- a/rush/c160203004.lua +++ b/rush/c160203004.lua @@ -4,6 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Negate opponent monster's attack local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCategory(CATEGORY_TOHAND) @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==1-tp end function s.filter(c) - return c:IsMonster() and c:IsLevelAbove(5) and c:IsAbleToHand() and c:IsFaceup() + return c:IsMonster() and c:IsLevelAbove(5) and c:IsAbleToHand() and c:IsFaceup() and not c:IsMaximumModeSide() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -27,12 +28,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) + --Effect Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g) g=g:AddMaximumCheck() - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - --Effect + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + local og=Duel.GetOperatedGroup() + if #og>0 and og:GetFirst():IsLocation(LOCATION_HAND) then Duel.NegateAttack() end end From d3922a616f81a6dd99ed164d484e55f1497b93d2 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 3 Jun 2025 06:36:48 +0200 Subject: [PATCH 063/128] fixed Star Salvation Shield --- rush/c160015065.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rush/c160015065.lua b/rush/c160015065.lua index a4047c4687..b11be41607 100644 --- a/rush/c160015065.lua +++ b/rush/c160015065.lua @@ -24,10 +24,10 @@ function s.filter1(c,tp) return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.filter1,1,nil,tp) and Duel.IsTurnPlayer(1-tp) + return eg:IsExists(s.filter1,1,nil,tp) and Duel.IsTurnPlayer(1-tp) and Duel.GetFlagEffect(ep,id)==0 end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and Duel.IsTurnPlayer(1-tp) + return ep==1-tp and Duel.IsTurnPlayer(1-tp) and Duel.GetFlagEffect(ep,id)==0 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end @@ -41,6 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) g=g:AddMaximumCheck() local ct=Duel.SendtoGrave(g,REASON_COST) if ct>0 then + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) --can attack once local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) From a6695baf9f00e8ae030b4808546eb09a8433b41c Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 3 Jun 2025 07:47:43 +0200 Subject: [PATCH 064/128] added scripts for new alt arts --- rush/c160455010.lua | 3 +++ rush/c160455011.lua | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 rush/c160455010.lua create mode 100644 rush/c160455011.lua diff --git a/rush/c160455010.lua b/rush/c160455010.lua new file mode 100644 index 0000000000..c6438c6276 --- /dev/null +++ b/rush/c160455010.lua @@ -0,0 +1,3 @@ +--花牙美人のゲッカ +--Gekka the Shadow Flower Beauty +Duel.LoadCardScriptAlias(160005028) diff --git a/rush/c160455011.lua b/rush/c160455011.lua new file mode 100644 index 0000000000..d8d4bae641 --- /dev/null +++ b/rush/c160455011.lua @@ -0,0 +1,3 @@ +--花牙クノイチ・エトランゼ +--Etraynze the Shadow Flower Ninja +Duel.LoadCardScriptAlias(160005029) From be90d603932ef044ffb8a9907ed234c1015e797a Mon Sep 17 00:00:00 2001 From: Naim Date: Tue, 3 Jun 2025 06:28:24 -0300 Subject: [PATCH 065/128] "Disablaster the Negation Fortress" fix Ficed a bug where it could negate an effect activated in the Field Spell Zone --- official/c58707981.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c58707981.lua b/official/c58707981.lua index 5971e5beed..d0d8dcbfe5 100644 --- a/official/c58707981.lua +++ b/official/c58707981.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local seq,p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_SEQUENCE,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) - if loc&(LOCATION_MZONE|LOCATION_SZONE)==0 then return end --triggering outside the field or in the Field Zone + if loc&(LOCATION_MZONE|LOCATION_SZONE)==0 or (loc&LOCATION_FZONE)>0 then return end --triggering outside the field or in the Field Zone if (seq==5 or seq==6) then --First, correct effects triggering in the Extra Monster Zone if seq==5 then seq=1 From f4d17e084cf352cabaf422ebbf47eff89ee0880c Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 4 Jun 2025 07:31:17 -0300 Subject: [PATCH 066/128] "Artifact Mjollnir" fix Fixed a bug in which cards that negate "effects that include a Special Summon" would be able to negate the mandatory trigger effect even when there was no target --- official/c80237445.lua | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/official/c80237445.lua b/official/c80237445.lua index d9efb35992..3600b50679 100644 --- a/official/c80237445.lua +++ b/official/c80237445.lua @@ -2,13 +2,13 @@ --Artifact Mjollnir local s,id=GetID() function s.initial_effect(c) - --Set itself to the S/T zone + --Set itself to the Spell/Trap Zone as a Spell local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MONSTER_SSET) e1:SetValue(TYPE_SPELL) c:RegisterEffect(e1) - --Special summon itsel + --Special Summon this card from the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -18,10 +18,9 @@ function s.initial_effect(c) e2:SetTarget(s.sptg1) e2:SetOperation(s.spop1) c:RegisterEffect(e2) - --Special summon a target from the GY + --Special Summon 1 "Artifact" monster from the 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_F) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -57,27 +56,26 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true 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,0,0) + if #g>0 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + end end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end + --You cannot Special Summon monsters until the end of the next turn, except "Artifact" monsters local e1=Effect.CreateEffect(e:GetHandler()) + 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:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE|PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) return not c:IsSetCard(SET_ARTIFACT) From 0c841a4fd2e8bf7712f294904cccc18836228847 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Fri, 6 Jun 2025 18:35:45 +0200 Subject: [PATCH 067/128] added Grace Cat --- rush/c160215022.lua | 53 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 rush/c160215022.lua diff --git a/rush/c160215022.lua b/rush/c160215022.lua new file mode 100644 index 0000000000..2d3b4e1e52 --- /dev/null +++ b/rush/c160215022.lua @@ -0,0 +1,53 @@ +--いとをかしねこ +--Grace Cat +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Excavate the top 6 cards of your Deck and add cards to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={160004013} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAttackPos() and c:IsCanChangePositionRush() end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=6 end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.filter(c) + return c:IsCode(160004013) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + if Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,0,0,0)<1 then return end + --Effect + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<6 then return end + Duel.ConfirmDecktop(tp,6) + local g=Duel.GetDecktopGroup(tp,6) + Duel.DisableShuffleCheck() + if g:IsExists(s.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tg=g:FilterSelect(tp,s.filter,1,1,nil) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,tg) + Duel.ShuffleHand(tp) + g:RemoveCard(tg) + end + end + local ct=#g + if ct>0 then + Duel.MoveToDeckBottom(ct,tp) + Duel.SortDeckbottom(tp,tp,ct) + end +end From 01188a52f8d1bd7ff352f2cbf7444e3a07f9f4ba Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Sat, 7 Jun 2025 16:43:58 +0200 Subject: [PATCH 068/128] Fix earthbound release anime --- unofficial/c100000430.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unofficial/c100000430.lua b/unofficial/c100000430.lua index 97d03e5ca3..f61da60a36 100644 --- a/unofficial/c100000430.lua +++ b/unofficial/c100000430.lua @@ -1,5 +1,5 @@ --地縛解放 ---Earthbound Release +--Earthbound Release (Anime) local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,8 +19,8 @@ end s.listed_series={SET_EARTHBOUND_IMMORTAL} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,aux.ReleaseCheckTarget,nil,dg,SET_EARTHBOUND_IMMORTAL) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,aux.ReleaseCheckTarget,nil,dg,SET_EARTHBOUND_IMMORTAL) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,aux.ReleaseCheckTarget,dg,SET_EARTHBOUND_IMMORTAL) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,aux.ReleaseCheckTarget,dg,SET_EARTHBOUND_IMMORTAL) Duel.Release(g,REASON_COST) end function s.filter(c,p) @@ -39,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dam=Duel.GetOperatedGroup():GetSum(Card.GetPreviousAttackOnField) Duel.Damage(1-tp,dam,REASON_EFFECT) end -end \ No newline at end of file +end From 93955863f5ef503dde6aefa4dfa45ef09d5173d7 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Sat, 7 Jun 2025 08:55:31 -0700 Subject: [PATCH 069/128] Update "Bonds of Hope" - Should be able to use even if no Xyz Monsters on your field have material - Optimized handling of moving materials from 1 Xyz Monster to another/adding handling for the above change - General script polish/modernization --- unofficial/c511005023.lua | 76 +++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/unofficial/c511005023.lua b/unofficial/c511005023.lua index 5c2798e7a1..78e914b3ef 100644 --- a/unofficial/c511005023.lua +++ b/unofficial/c511005023.lua @@ -1,79 +1,69 @@ +--希望の絆 --Bonds of Hope --scripted by Shad3, fixed by MLD local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 Xyz Monster from your GY, then attach this card and all materials from 1 Xyz Monster on your field to 1 other Xyz Monster on the field local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCondition(s.condition) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end) e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.cfilter(c,tp) return c:IsType(TYPE_XYZ) and c:IsControler(tp) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) -end -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.filter2(c) - return c:IsType(TYPE_XYZ) and c:IsFaceup() and c:GetOverlayCount()~=0 -end -function s.filter3(c) - return c:IsType(TYPE_XYZ) and c:IsFaceup() +function s.detachfilter(c,tp) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) 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_GRAVE) and s.filter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,nil) + 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,LOCATION_GRAVE) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) +function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not tc or not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)<=0 then return end - local xc - local og=Group.CreateGroup() - if c:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) - local xg=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE,0,1,1,nil,TYPE_XYZ) - if #xg>0 then - Duel.HintSelection(xg) - xc=xg:GetFirst() - og=xc:GetOverlayGroup() - c:CancelToGrave() - og:AddCard(c) - end - end - if #og>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local ng=Duel.SelectMatchingCard(tp,s.filter3,tp,LOCATION_MZONE,0,1,1,xc) - Duel.HintSelection(ng) - local nc=ng:GetFirst() - Duel.Overlay(nc,og) + Duel.BreakEffect() + local tg=Duel.GetMatchingGroup(s.detachfilter,tp,LOCATION_MZONE,0,nil,tp) + if #tg>0 then + c:CancelToGrave() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM) + local detachxyz=tg:FilterSelect(tp,Card.CheckRemoveOverlayCard,1,1,nil,tp,1,REASON_EFFECT):GetFirst() + local attachxyz=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,1,1,detachxyz):GetFirst() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) + local attach_group=detachxyz:GetOverlayGroup() + if #attach_group>0 and c:IsOnField() then attach_group:AddCard(c) end + Duel.Overlay(attachxyz,attach_group) + Duel.RaiseSingleEvent(detachxyz,EVENT_DETACH_MATERIAL,e,0,0,0,0) + else + c:CancelToGrave() + local attachxyz=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + Duel.Overlay(attachxyz,c) end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetOperation(s.desop) e1:SetLabelObject(tc) + e1:SetOperation(s.desop) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if tc and tc:IsOnField() then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end From 87cbab66f27b4163e95db7453624cce326b931a4 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Sat, 7 Jun 2025 09:46:26 -0700 Subject: [PATCH 070/128] Update "Contagion of Madness" -Should only be able to activate when an opponent's monster attacks -Should not negate attacks -Script polishing/modernization --- unofficial/c511000408.lua | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/unofficial/c511000408.lua b/unofficial/c511000408.lua index 4528ad82c7..45af076550 100644 --- a/unofficial/c511000408.lua +++ b/unofficial/c511000408.lua @@ -1,30 +1,24 @@ +--狂気の伝染 --Contagion of Madness local s,id=GetID() function s.initial_effect(c) - --Activate + -Activate when your opponent's monster declares an attack local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) + e1:SetCondition(function(e) return Duel.GetAttacker():IsControler(1-e:GetHandlerPlayer()) end) + e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetAttacker() - if chk==0 then return tg:IsOnField() end - local dam=tg:GetAttack() - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,dam) +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Your opponent takes damage equal to half the battle damage you would take from this battle + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_BATTLE_DAMAGE) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==tp end) + e1:SetOperation(function(e) Duel.Damage(1-e:GetHandlerPlayer(),Duel.GetBattleDamage(e:GetHandlerPlayer())/2,REASON_EFFECT) end) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) + Duel.RegisterEffect(e1,tp) end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg,d=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS,CHAININFO_TARGET_PARAM) - local tc=Duel.GetAttacker() - local ap=tc:GetControler() - if tc:IsFaceup() and tc:CanAttack() then - if Duel.NegateAttack() then - Duel.Damage(1-ap,d,REASON_BATTLE) - Duel.Damage(ap,d/2,REASON_EFFECT) - end - end -end \ No newline at end of file From eda7bf968e27a1fbff10c7e0b736f3b3befae192 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Sat, 7 Jun 2025 09:53:53 -0700 Subject: [PATCH 071/128] Update c511000408.lua Missing dash --- unofficial/c511000408.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial/c511000408.lua b/unofficial/c511000408.lua index 45af076550..7b00168a59 100644 --- a/unofficial/c511000408.lua +++ b/unofficial/c511000408.lua @@ -2,7 +2,7 @@ --Contagion of Madness local s,id=GetID() function s.initial_effect(c) - -Activate when your opponent's monster declares an attack + --Activate when your opponent's monster declares an attack local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_ACTIVATE) From be0c0e3e3b4cceb7597b1904ebe96f0253bf76ac Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Sat, 7 Jun 2025 13:19:49 -0700 Subject: [PATCH 072/128] Update "Number 65: Djinn Buster (Anime)" -Should apply negation check to both fields -Script polish/modernization update --- unofficial/c511010065.lua | 61 ++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/unofficial/c511010065.lua b/unofficial/c511010065.lua index 352084b96c..19c5b880c3 100644 --- a/unofficial/c511010065.lua +++ b/unofficial/c511010065.lua @@ -1,49 +1,44 @@ ---No.65 裁断魔人ジャッジ・バスター +--No.65 裁断魔人ジャッジ・バスター (Anime) +--Number 65: Djinn Buster (Anime) Duel.LoadCardScript("c3790062.lua") local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,2,2) c:EnableReviveLimit() - --negate activate + --Xyz Summon procedure: 2 Level 2 monsters + Xyz.AddProcedure(c,nil,2,2) + --Cannot be destroyed by battle, except with "Number" monsters local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --battle indestructable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(s.indes) - c:RegisterEffect(e3) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) + c:RegisterEffect(e1) + --Negate the activation of a monster effect and inflict 500 damage to your opponent + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.negdamcon) + e2:SetCost(Cost.Detach(1)) + e2:SetTarget(s.negdamtg) + e2:SetOperation(s.negdamop) + c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end +s.listed_series={SET_NUMBER} s.xyz_number=65 -function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) +function s.negdamcon(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and loc==LOCATION_MZONE - and re:IsActiveType(TYPE_MONSTER) 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) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and loc==LOCATION_MZONE + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.negdamtg(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) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.negdamop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) Duel.Damage(1-tp,500,REASON_EFFECT) end -function s.indes(e,c) - return not c:IsSetCard(SET_NUMBER) -end \ No newline at end of file From 0843e480e277c2f03d7ea78ee469f35e44d6d21b Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 8 Jun 2025 01:24:26 +0300 Subject: [PATCH 073/128] Added new card script --- pre-release/c100200273.lua | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 pre-release/c100200273.lua diff --git a/pre-release/c100200273.lua b/pre-release/c100200273.lua new file mode 100644 index 0000000000..5ca130e032 --- /dev/null +++ b/pre-release/c100200273.lua @@ -0,0 +1,94 @@ +--黒魔術の護符 +--Dark Magic Amulet +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can activate this card the turn it was Set by revealing 1 Spellcaster monster in your hand + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e0:SetValue(function(e) e:SetLabel(1) end) + e0:SetCondition(function(e) return Duel.IsExistingMatchingCard(s.discostfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) end) + c:RegisterEffect(e0) + --Negate a monster effect that is activated in response to the activation of a card that mentions "Dark Magician" or its effect + 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.discon) + e1:SetCost(s.discost) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + e1:SetLabelObject(e0) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LEAVE_GRAVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(s.setcon) + e2:SetCost(Cost.PayLP(2500)) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_DARK_MAGICIAN} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local chainlink=Duel.GetCurrentChain(true)-1 + if not (chainlink>0 and re:IsMonsterEffect() and Duel.IsChainDisablable(ev)) then return false end + local trig_eff=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_EFFECT) + return trig_eff and trig_eff:GetHandler():ListsCode(CARD_DARK_MAGICIAN) +end +function s.discostfilter(c) + return c:IsRace(RACE_SPELLCASTER) and not c:IsPublic() +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + local label_obj=e:GetLabelObject() + if chk==0 then label_obj:SetLabel(0) return true end + if label_obj:GetLabel()>0 then + label_obj:SetLabel(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_HAND,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + end +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 +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) then + local code1,code2=re:GetHandler():GetOriginalCodeRule() + --For the rest of this turn, the activated effects of monsters with the same original name are negated + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsMonsterEffect() and re:GetHandler():IsOriginalCodeRule(code1,code2) end) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.setconfilter(c,tp) + return c:IsCode(CARD_DARK_MAGICIAN) and c:IsSummonPlayer(tp) and c:IsFaceup() +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.setconfilter,1,nil,tp) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file From a475c43eab85bd05241b8079f2f452ea893a17fb Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Sun, 8 Jun 2025 11:55:11 +0200 Subject: [PATCH 074/128] Add description string to tokens summoned by Scapegoat (GOAT) --- goat/c504700123.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/goat/c504700123.lua b/goat/c504700123.lua index c12d242981..116ad1e8ca 100644 --- a/goat/c504700123.lua +++ b/goat/c504700123.lua @@ -45,6 +45,7 @@ function s.initial_effect(c) end) end) end +s.listed_names={73915052} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return (Duel.GetCurrentChain(true)==0 and Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0) or @@ -53,7 +54,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.sumlimit) @@ -62,7 +63,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() @@ -71,7 +72,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e4:SetDescription(aux.Stringid(id,1)) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) end @@ -91,12 +92,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) for i=1,4 do local token=Duel.CreateToken(tp,73915051+i) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + --Cannot be tributed for a tribute summon local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3304) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() From 4df928a5ec77b2defde3df1423005ba94d3517bc Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Mon, 9 Jun 2025 21:08:29 -0700 Subject: [PATCH 075/128] Fix "Revelation of Hope (Manga)" Mislabeled parameter correction --- unofficial/c511001631.lua | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/unofficial/c511001631.lua b/unofficial/c511001631.lua index 006eb61328..ca830e00ed 100644 --- a/unofficial/c511001631.lua +++ b/unofficial/c511001631.lua @@ -1,48 +1,48 @@ ---希望の天啓 ---Revelation of Hope +--希望の天啓 (Manga) +--Revelation of Hope (Manga) local s,id=GetID() function s.initial_effect(c) - --spsummon + --Special Summon 1 Dragon Xyz Monster from your Extra Deck by sending 1 non-Xyz Dragon monster from your field to your GY local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.cfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and not c:IsType(TYPE_XYZ) and c:GetLevel()>0 and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),tc) +function s.tgfilter(c,e,tp) + return c:IsRace(RACE_DRAGON) and not c:IsType(TYPE_XYZ) and c:HasLevel() and c:IsAbleToGraveAsCost() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp,c) end -function s.spfilter(c,e,tp,lv,tc) - return c:IsRank(lv) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) - and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 +function s.spfilter(c,lv,e,tp,tc) + return c:IsRank(lv) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) 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) e:SetLabel(1) if chk==0 then return true end end -function s.tg(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 if e:GetLabel()~=1 then return false end e:SetLabel(0) local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_XYZ) - return #pg<=0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + return #pg<=0 and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SetTargetParam(g:GetFirst():GetLevel()) Duel.SendtoGrave(g,REASON_COST) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end -function s.op(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_XYZ) if #pg>0 then return end local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp):GetFirst() if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then sc:CompleteProcedure() end -end \ No newline at end of file +end From a301cb2b31a0eeae364048659f2fc5da739c4391 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Mon, 9 Jun 2025 21:31:55 -0700 Subject: [PATCH 076/128] Update "Tank Corps" - Should not target a "KC-1 Crayton", only check if it is on the field. - Defense parameter missing from special summon checks - Tokens should not be Tributable for a Tribute Summon - Script modernization update --- unofficial/c511000881.lua | 44 ++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/unofficial/c511000881.lua b/unofficial/c511000881.lua index 8bb30a2d99..067354ddd5 100644 --- a/unofficial/c511000881.lua +++ b/unofficial/c511000881.lua @@ -1,38 +1,40 @@ +--歴戦の戦車部隊 --Tank Corps local s,id=GetID() function s.initial_effect(c) - -- + --Special Summon 3 "Tank Tokens" while you control "KC-1 Crayton" local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(e:GetHandlerPlayer(),aux.FaceupFilter(Card.IsCode,511000880),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_names={511000880} -function s.filter(c) - return c:IsFaceup() and c:IsCode(511000880) -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) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,800,1200,3,RACE_MACHINE,ATTRIBUTE_EARTH) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) +s.listed_names={511000880,id+1} --"KC-1 Crayton", "Tank Token" +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,3,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,800,1200,3,RACE_MACHINE,ATTRIBUTE_EARTH) then - for i=1,3 do - local token=Duel.CreateToken(tp,id+1) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 or + not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,3,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE)then return end + for i=1,3 do + local token=Duel.CreateToken(tp,id+1) + if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Cannot be Tributed for a Tribute Summon + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3304) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_UNRELEASABLE_SUM) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + e1:SetValue(1) + token:RegisterEffect(e1,true) end - Duel.SpecialSummonComplete() end -end \ No newline at end of file + Duel.SpecialSummonComplete() +end From 29b58c3157dd209361b3073edb975c2ac4374020 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 10 Jun 2025 08:16:59 +0200 Subject: [PATCH 077/128] added new rush cards --- rush/c160215031.lua | 48 ++++++++++++++++++++++++++++++++++++++ rush/c160215032.lua | 57 +++++++++++++++++++++++++++++++++++++++++++++ rush/c160215036.lua | 39 +++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 rush/c160215031.lua create mode 100644 rush/c160215032.lua create mode 100644 rush/c160215036.lua diff --git a/rush/c160215031.lua b/rush/c160215031.lua new file mode 100644 index 0000000000..10e7ebb139 --- /dev/null +++ b/rush/c160215031.lua @@ -0,0 +1,48 @@ +--双焔魔天アルシェル +--Twin Blaze Fiend Angel Archel +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Ritual + c:EnableReviveLimit() + --Increase ATK + 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:SetCondition(s.condition) + e1:SetCost(s.cost) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.cfilter(c) + return c:IsMonster() and c:IsType(TYPE_MAXIMUM) and c:IsAttribute(ATTRIBUTE_FIRE) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end +end +function s.filter(c) + return c:IsMonster() and c:IsType(TYPE_MAXIMUM) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end + --Effect + local c=e:GetHandler() + --Increase ATK + local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_GRAVE,0,nil) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(ct*300) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,3,nil) then + c:AddPiercing(RESETS_STANDARD_PHASE_END) + end +end \ No newline at end of file diff --git a/rush/c160215032.lua b/rush/c160215032.lua new file mode 100644 index 0000000000..1d4c5f8a10 --- /dev/null +++ b/rush/c160215032.lua @@ -0,0 +1,57 @@ +--双焔魔天ルナエル +--Twin Blaze Fiend Angel Lunael +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Ritual + c:EnableReviveLimit() + --Monsters on your opponent's field lose 1000 ATK/DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetCondition(s.condition) + e1:SetTarget(aux.TargetBoolFunction(Card.IsFaceup)) + e1:SetValue(-1000) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2) + --actlimit + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(s.condition2) + e3:SetOperation(s.operation) + c:RegisterEffect(e3) +end +function s.filter(c) + return c:IsFaceup() and c:IsLevel(10) and c:IsAttribute(ATTRIBUTE_FIRE) +end +function s.condition(e) + return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) +end +function s.condition2(e) + local tp=e:GetHandlerPlayer() + return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MAXIMUM)>2 +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(0,1) + e1:SetValue(s.aclimit) + e1:SetCondition(s.actcon) + e1:SetReset(RESET_CHAIN) + Duel.RegisterEffect(e1,tp) +end +function s.aclimit(e,re,tp) + return re:GetHandler():IsTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE) +end +function s.actcon(e) + local c=Duel.GetAttacker() + return c:IsLevel(10) and c:IsAttribute(ATTRIBUTE_FIRE) +end \ No newline at end of file diff --git a/rush/c160215036.lua b/rush/c160215036.lua new file mode 100644 index 0000000000..35eb366019 --- /dev/null +++ b/rush/c160215036.lua @@ -0,0 +1,39 @@ +--双焔魔の祭壇 +--Altar of the Twin Blaze Fiends +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=s.ritualfil,matfilter=s.forcedgroup,stage2=s.stage2}) + c:RegisterEffect(e1) +end +s.listed_names={160215031,160215032} +function s.ritualfil(c) + return c:IsCode(160215031,160215032) +end +function s.forcedgroup(c,e,tp) + return c:IsRace(RACE_FIEND) +end +function s.stage2(mg,e,tp,eg,ep,ev,re,r,rp,tc) + local c=e:GetHandler() + if mg:IsExists(Card.WasMaximumMode,1,nil) then + --Gains ATK/DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(2000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + tc:RegisterEffect(e2) + --Effect protection + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e3:SetDescription(3001) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_CLIENT_HINT) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(1) + tc:RegisterEffect(e3) + end +end \ No newline at end of file From 46742f7349d5b0dc5d14fae5c46428ae6fa2f2a9 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 10 Jun 2025 16:57:11 +0200 Subject: [PATCH 078/128] added Blaze Fiend Overlord Zebulth --- rush/c160215033.lua | 78 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 rush/c160215033.lua diff --git a/rush/c160215033.lua b/rush/c160215033.lua new file mode 100644 index 0000000000..7ee4b0cec8 --- /dev/null +++ b/rush/c160215033.lua @@ -0,0 +1,78 @@ +--焔魔神ゼブルス +--Blaze Fiend Overlord Zebulth +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --special summon + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetRange(LOCATION_HAND) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Special Summon 1 monster from the 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_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e)return e:GetHandler():IsStatus(STATUS_SUMMON_TURN|STATUS_SPSUMMON_TURN)end) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,0,e:GetHandler()) + return aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0,c) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local rg=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,0,e:GetHandler()) + local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE,nil,nil,true) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.SendtoGrave(g,REASON_COST) + g:DeleteGroup() +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevel(10) and not c:IsAttack(2400) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE) +end +function s.posfilter(c) + return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsCanChangePositionRush() +end +function s.operation(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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then + local sg=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) + if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local sc=sg:Select(tp,1,1,nil) + if #sc==0 then return end + Duel.HintSelection(sc) + Duel.BreakEffect() + Duel.ChangePosition(sc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end + end +end \ No newline at end of file From fa402ee59c2d476c35d49d669322cf69648d815b Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Tue, 10 Jun 2025 13:27:57 -0700 Subject: [PATCH 079/128] Update "Tank Corps" -Tokens should be Level 4 -Incorrect function order caused issues with activation --- unofficial/c511000881.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unofficial/c511000881.lua b/unofficial/c511000881.lua index 067354ddd5..c478127610 100644 --- a/unofficial/c511000881.lua +++ b/unofficial/c511000881.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(e:GetHandlerPlayer(),aux.FaceupFilter(Card.IsCode,511000880),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,511000880),e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -15,13 +15,13 @@ end s.listed_names={511000880,id+1} --"KC-1 Crayton", "Tank Token" function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,3,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,4,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 or - not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,3,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE)then return end + not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,4,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE)then return end for i=1,3 do local token=Duel.CreateToken(tp,id+1) if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then From 885f9c68d9f021a90cef8fd8ecb765c6c3b9ad21 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 11 Jun 2025 06:49:55 -0300 Subject: [PATCH 080/128] Add new constants - SET_MAGNIFISTORMING = 0x1c9 - CARD_MYSTICAL_SPACE_TYPHOON = 5318639 --- archetype_setcode_constants.lua | 1 + card_counter_constants.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index ff84b24e68..26832719cb 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -594,3 +594,4 @@ SET_IMPRISONED_DEITY = 0x1c6 SET_ARTMEGIA = 0x1c7 --Pre-release archetypes SET_DOOM_KING = 0x1c8 +SET_MAGNIFISTORMING = 0x1c9 diff --git a/card_counter_constants.lua b/card_counter_constants.lua index 65be965fec..b4cce40b78 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -57,6 +57,7 @@ CARD_MEDIUS_THE_INNOCENT = 97556336 CARD_MEMENTOAL_TECUHTLICA = 23288411 CARD_MILLENNIUM_CROSS = 37613663 CARD_MONSTER_REBORN = 83764718 +CARD_MYSTICAL_SPACE_TYPHOON = 5318639 CARD_MYUTANT_ARSENAL = 7574904 CARD_MYUTANT_BEAST = 34695290 CARD_MYUTANT_MIST = 61089209 From 4ec93b2e4d3fb2f1957220066a8acdd3583af62e Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 11 Jun 2025 15:24:15 +0200 Subject: [PATCH 081/128] added Ominous Ogre of Yamimakai --- rush/c101302006.lua | 92 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 rush/c101302006.lua diff --git a/rush/c101302006.lua b/rush/c101302006.lua new file mode 100644 index 0000000000..95a26a77c9 --- /dev/null +++ b/rush/c101302006.lua @@ -0,0 +1,92 @@ +--剛鬼マシン・スープレックス +--Gouki Mashin Suprex +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both this card and 1 "Gouki" monster in your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.spcostfilter(c,e,tp) + return c:IsSetCard(SET_GOUKI) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() + e:SetLabelObject(rc) + Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) + Duel.ShuffleHand(tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + local rc=e:GetLabelObject() + Duel.SetTargetCard(rc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,rc),2,tp,0) +end +function s.spfilter(c,e,tp) + return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Group.FromCards(c,Duel.GetFirstTarget()) + if g:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + --Register a flag to the summoned monsters + for tc in g:Iter() do + tc:RegisterFlagEffect(id,RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + end + --You cannot Special Summon, except "Gouki" monsters, while you control any of those face-up monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) --intentionaly no client hint + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasFlagEffect,id),tp,LOCATION_MZONE,0,1,nil) end) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) + --no reset + Duel.RegisterEffect(e1,tp) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file From 2cadc51a55678fe15665a5464d02c748ccf7189b Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 11 Jun 2025 10:31:05 -0300 Subject: [PATCH 082/128] update archetype_setcode_constants.lua --- 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 26832719cb..aa5081cbda 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -594,4 +594,4 @@ SET_IMPRISONED_DEITY = 0x1c6 SET_ARTMEGIA = 0x1c7 --Pre-release archetypes SET_DOOM_KING = 0x1c8 -SET_MAGNIFISTORMING = 0x1c9 +SET_MAGNIFISTOR = 0x1c9 From 4167ab5c5a91657a94f15e483b87ac3a06dda861 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 11 Jun 2025 10:38:05 -0300 Subject: [PATCH 083/128] fix a typo --- 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 aa5081cbda..e0dfc071c5 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -594,4 +594,4 @@ SET_IMPRISONED_DEITY = 0x1c6 SET_ARTMEGIA = 0x1c7 --Pre-release archetypes SET_DOOM_KING = 0x1c8 -SET_MAGNIFISTOR = 0x1c9 +SET_MAGNIFISTORM = 0x1c9 From 3652ec70e9eb40da82b38a8bd807eb696bb6d5e2 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Wed, 11 Jun 2025 09:04:18 -0700 Subject: [PATCH 084/128] Update "Traplin" -Modified monster zone check to prevent being able to prompt player to Special Summon when all Main Monster Zones are full. -Slight script cleanup/polish --- unofficial/c511005041.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/unofficial/c511005041.lua b/unofficial/c511005041.lua index fb5d214895..c37fb75f05 100644 --- a/unofficial/c511005041.lua +++ b/unofficial/c511005041.lua @@ -3,7 +3,7 @@ --By Shad3 local s,id=GetID() function s.initial_effect(c) - --Special Summon itself from hand + --Special Summon itself from your hand by Tributing 1 Continuous Trap you control local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -14,16 +14,14 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spfilter(c,tp) - return (c:IsTrap() and c:IsType(TYPE_CONTINUOUS)) and c:IsReleasable() and (not tp or Duel.GetMZoneCount(tp,c)>0) -end function s.spcon(e,c) if c==nil then return true end - local g=Duel.GetMatchingGroup(s.spfilter,c:GetControler(),LOCATION_ONFIELD,0,nil,tp) - return not Duel.IsPlayerAffectedByEffect(c:GetControler(),EFFECT_CANNOT_RELEASE) and #g>0 + local g=Duel.GetMatchingGroup(aux.AND(Card.IsContinuousTrap,Card.IsReleasable),c:GetControler(),LOCATION_ONFIELD,0,nil) + return not Duel.IsPlayerAffectedByEffect(c:GetControler(),EFFECT_CANNOT_RELEASE) and #g>0 + and Duel.GetMZoneCount(e:GetHandlerPlayer())>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_ONFIELD,0,nil) + local g=Duel.GetMatchingGroup(aux.AND(Card.IsContinuousTrap,Card.IsReleasable),tp,LOCATION_ONFIELD,0,nil) local sg=aux.SelectUnselectGroup(g,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_RELEASE,nil,nil,true) local dg=sg:Filter(Card.IsFacedown,nil) if #dg>0 then @@ -41,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() -end \ No newline at end of file +end From 880b198a2cd3e721b2730284dabab310e39914af Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Wed, 11 Jun 2025 11:03:15 -0700 Subject: [PATCH 085/128] Update "Gouki Jet Ogre" Minor script polish --- official/c59644128.lua | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/official/c59644128.lua b/official/c59644128.lua index d06ad86f9f..18d4ed8128 100644 --- a/official/c59644128.lua +++ b/official/c59644128.lua @@ -1,12 +1,11 @@ --剛鬼ジェット・オーガ --Gouki Jet Ogre --- local s,id=GetID() function s.initial_effect(c) - --link summon c:EnableReviveLimit() + --Link Summon procedure: 2 "Gouki" monsters Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) - --position + --Destroy 1 "Gouki" card you control to change all monsters on the field to Attack Position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION) @@ -17,14 +16,14 @@ function s.initial_effect(c) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) - --atkup + --Make all "Gouki" monsters you control gain 500 ATK until the end of the turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_GRAVE) e2:SetCountLimit(1,id) - e2:SetCondition(s.atkcon) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -32,10 +31,7 @@ end s.listed_series={SET_GOUKI} function s.desfilter(c,tp) return c:IsFaceup() and c:IsSetCard(SET_GOUKI) - and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) -end -function s.posfilter(c) - return c:IsDefensePos() or c:IsFacedown() + and Duel.IsExistingMatchingCard(aux.OR(Card.IsDefensePos,Card.IsFacedown),tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) end @@ -46,30 +42,18 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.posop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then + local g=Duel.GetMatchingGroup(aux.OR(Card.IsDefensePos,Card.IsFacedown),tp,LOCATION_MZONE,LOCATION_MZONE,nil) if #g==0 then return end Duel.ChangePosition(g,POS_FACEUP_ATTACK) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_GOUKI) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GOUKI),tp,LOCATION_MZONE,0,1,nil) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_GOUKI),tp,LOCATION_MZONE,0,nil) + for tc in g:Iter() do + tc:UpdateAttack(500,RESETS_STANDARD_PHASE_END,e:GetHandler()) end -end \ No newline at end of file +end From 87b613a305f21be79ffbeaab5874a916cfb5209a Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 11 Jun 2025 22:44:21 +0200 Subject: [PATCH 086/128] added script for Ominous Ogre of Yaminakai --- rush/c101302006.lua | 92 --------------------------------------------- rush/c160215006.lua | 44 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 92 deletions(-) delete mode 100644 rush/c101302006.lua create mode 100644 rush/c160215006.lua diff --git a/rush/c101302006.lua b/rush/c101302006.lua deleted file mode 100644 index 95a26a77c9..0000000000 --- a/rush/c101302006.lua +++ /dev/null @@ -1,92 +0,0 @@ ---剛鬼マシン・スープレックス ---Gouki Mashin Suprex ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both this card and 1 "Gouki" monster in your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -function s.spcostfilter(c,e,tp) - return c:IsSetCard(SET_GOUKI) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsPublic() - and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() - e:SetLabelObject(rc) - Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) - Duel.ShuffleHand(tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - local rc=e:GetLabelObject() - Duel.SetTargetCard(rc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,rc),2,tp,0) -end -function s.spfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Group.FromCards(c,Duel.GetFirstTarget()) - if g:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - --Register a flag to the summoned monsters - for tc in g:Iter() do - tc:RegisterFlagEffect(id,RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - end - --You cannot Special Summon, except "Gouki" monsters, while you control any of those face-up monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) --intentionaly no client hint - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasFlagEffect,id),tp,LOCATION_MZONE,0,1,nil) end) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) - --no reset - Duel.RegisterEffect(e1,tp) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/rush/c160215006.lua b/rush/c160215006.lua new file mode 100644 index 0000000000..d04ee0245c --- /dev/null +++ b/rush/c160215006.lua @@ -0,0 +1,44 @@ +--闇魔界の凶鬼 +--Ominous Ogre of Yamimakai +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Special Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={160215005} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsStatus(STATUS_SUMMON_TURN|STATUS_SPSUMMON_TURN) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsCode(160215005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoGrave(g,REASON_EFFECT)==0 then return end + --Special Summon + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local ssg=sg:Select(tp,1,1,nil) + if #ssg>0 then + Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end From 0099f8cdd75ebed2ba99729e38afba46ca754048 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Thu, 12 Jun 2025 06:39:50 +0200 Subject: [PATCH 087/128] updated rush cards that take control --- rush/c160015065.lua | 6 +++--- rush/c160019046.lua | 2 +- rush/c160020023.lua | 2 +- rush/c160205061.lua | 4 ++-- rush/c160323029.lua | 29 ++++++++++++++--------------- rush/c160455005.lua | 5 +++-- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/rush/c160015065.lua b/rush/c160015065.lua index b11be41607..cfd561317a 100644 --- a/rush/c160015065.lua +++ b/rush/c160015065.lua @@ -33,7 +33,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end end function s.ctrlfilter(c) - return c:IsFaceup() and c:IsRace(RACE_MAGICALKNIGHT) and c:IsLevelAbove(9) and c:IsType(TYPE_FUSION) and c:GetBaseAttack()==3000 and c:IsControlerCanBeChanged(true) + return c:IsFaceup() and c:IsRace(RACE_MAGICALKNIGHT) and c:IsLevelAbove(9) and c:IsType(TYPE_FUSION) and c:GetBaseAttack()==3000 end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -60,11 +60,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabelObject(e1) Duel.RegisterEffect(e2,tp) - if Duel.IsExistingMatchingCard(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + if Duel.IsExistingMatchingCard(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local dg=Duel.SelectMatchingCard(tp,s.ctrlfilter,tp,0,LOCATION_MZONE,1,1,nil) if #dg>0 then - Duel.HintSelection(dg,true) + Duel.HintSelection(dg) Duel.GetControl(dg,tp) end end diff --git a/rush/c160019046.lua b/rush/c160019046.lua index d879f3d125..e88c6884ae 100644 --- a/rush/c160019046.lua +++ b/rush/c160019046.lua @@ -47,7 +47,7 @@ function s.revop(e,tp,eg,ep,ev,re,r,rp) end end function s.ctrlfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_MAXIMUM) and c:IsControlerCanBeChanged(true) + return c:IsFaceup() and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_MAXIMUM) end function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/rush/c160020023.lua b/rush/c160020023.lua index 796df43ca3..69ba1b58a2 100644 --- a/rush/c160020023.lua +++ b/rush/c160020023.lua @@ -35,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0) end function s.ctrlfilter(c) - return c:IsFaceup() and c:IsLevelBelow(8) and not c:IsType(TYPE_MAXIMUM) and c:IsControlerCanBeChanged(true) + return c:IsFaceup() and c:IsLevelBelow(8) and not c:IsType(TYPE_MAXIMUM) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/rush/c160205061.lua b/rush/c160205061.lua index 041c3aa762..e0d71ba2f0 100644 --- a/rush/c160205061.lua +++ b/rush/c160205061.lua @@ -24,7 +24,7 @@ function s.costfilter(c,tp) and Duel.IsExistingMatchingCard(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil,c:GetRace()) end function s.ctrlfilter(c,race) - return c:IsFaceup() and c:IsRace(race) and c:IsLevelBetween(5,8) and c:IsControlerCanBeChanged(true) + return c:IsFaceup() and c:IsRace(race) and c:IsLevelBetween(5,8) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end @@ -45,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local dg=Duel.SelectMatchingCard(tp,s.ctrlfilter,tp,0,LOCATION_MZONE,1,1,nil,race) if #dg>0 then - Duel.HintSelection(dg,true) + Duel.HintSelection(dg) Duel.GetControl(dg,tp) end end \ No newline at end of file diff --git a/rush/c160323029.lua b/rush/c160323029.lua index 9d89dbc476..1cec1d6556 100644 --- a/rush/c160323029.lua +++ b/rush/c160323029.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsFaceup() and not c:IsMaximumMode() and c:IsControlerCanBeChanged(true) + return c:IsFaceup() and not c:IsMaximumMode() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -28,18 +28,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local tc=g:GetFirst() Duel.HintSelection(g) - if Duel.GetControl(tc,tp) then - local e1=Effect.CreateEffect(c) - local reset=RESETS_STANDARD_PHASE_END&~RESET_TURN_SET - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(reset) - e1:SetValue(1) - tc:RegisterEffect(e1) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(reset) - tc:RegisterEffect(e3) - end + Duel.GetControl(tc,tp) + local e1=Effect.CreateEffect(c) + local reset=RESETS_STANDARD_PHASE_END&~RESET_TURN_SET + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UNRELEASABLE_SUM) + e1:SetReset(reset) + e1:SetValue(1) + tc:RegisterEffect(e1) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_CANNOT_ATTACK) + e2:SetReset(reset) + tc:RegisterEffect(e2) end \ No newline at end of file diff --git a/rush/c160455005.lua b/rush/c160455005.lua index 713e8210a2..622dd0be10 100644 --- a/rush/c160455005.lua +++ b/rush/c160455005.lua @@ -20,13 +20,14 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsStatus(STATUS_SUMMON_TURN) end function s.ctrlfilter(c) - return c:IsFacedown() and c:IsControlerCanBeChanged() + return c:IsFacedown() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,nil) end end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) From 71f0edb02219d733722fdf4c7172cbfd48f1dc74 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Thu, 12 Jun 2025 12:59:01 +0200 Subject: [PATCH 088/128] added The Sword of Zera --- rush/c160215010.lua | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 rush/c160215010.lua diff --git a/rush/c160215010.lua b/rush/c160215010.lua new file mode 100644 index 0000000000..95a039e15b --- /dev/null +++ b/rush/c160215010.lua @@ -0,0 +1,46 @@ +--ゼラの剣 +--The Sword of Zera +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --equip + aux.AddEquipProcedure(c,0,s.eqfilter,s.eqlimit,nil,nil,s.gainop) + --Increase ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetCondition(s.condition) + e1:SetValue(1000) + c:RegisterEffect(e1) +end +s.listed_names={69123138,66073051} +function s.eqfilter(c) + return c:IsFaceup() and c:IsCode(69123138,66073051) and not c:IsMaximumModeSide() +end +function s.eqlimit(e,c) + return c:IsFaceup() +end +function s.gainop(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 tc:IsFaceup() then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_PIERCE) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetCondition(s.condition) + e2:SetTarget(s.eftg) + e2:SetLabelObject(e1) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e2) + end +end +function s.eftg(e,c) + return e:GetHandler():GetEquipTarget()==c +end +function s.condition(e) + return Duel.GetTurnPlayer()==e:GetHandler():GetControler() +end \ No newline at end of file From 42fd49b15fc5788945fb61765b4d592ca69274a6 Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 12 Jun 2025 14:35:35 -0300 Subject: [PATCH 089/128] "Juraishin, the Cursed Thunder God" update Fixed a bug where it would cause an script error when it activated its effect to destroy Spell/Traps but the only valid cards were equipped to itself --- official/c78693036.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/official/c78693036.lua b/official/c78693036.lua index 5cdabb1852..9d6d4c0a2d 100644 --- a/official/c78693036.lua +++ b/official/c78693036.lua @@ -45,7 +45,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local g2=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,nil) + local g2=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,e:GetHandler():GetEquipGroup()) local b1=#g1>0 local b2=#g2>0 if chk==0 then return b1 or b2 end @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end \ No newline at end of file +end From 69900ca04e8e4719bc1be6a4dd98a28f399ddfe8 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Fri, 13 Jun 2025 13:11:17 +0200 Subject: [PATCH 090/128] added Wicked Dragon with the Ominous Head --- rush/c160215007.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 rush/c160215007.lua diff --git a/rush/c160215007.lua b/rush/c160215007.lua new file mode 100644 index 0000000000..19c5714e88 --- /dev/null +++ b/rush/c160215007.lua @@ -0,0 +1,36 @@ +--凶頭を持つ邪竜 +--Wicked Dragon with the Ominous Head +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Send the top 2 cards of deck to GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={160215006,160215010} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end + Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) +end +function s.thfilter(c) + return c:IsCode(160215006,160215010) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + if Duel.DiscardDeck(tp,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end From b432798566835cfaf2a6ce1614f8bfd2f128c734 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 13 Jun 2025 18:48:40 -0300 Subject: [PATCH 091/128] "Hidden Passage" fix Fixed a bug causing script errors when the opponent did not have a face-up monster --- unofficial/c511000060.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unofficial/c511000060.lua b/unofficial/c511000060.lua index 4e557b63da..acca8f3066 100644 --- a/unofficial/c511000060.lua +++ b/unofficial/c511000060.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --direct attack + --Level 2 or lower Spellcaster-Type monsters you control can attack your opponent directly local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_SZONE) @@ -18,6 +18,7 @@ function s.initial_effect(c) end function s.attg(e,c) local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil) + if #g==0 then return false end local _,atk=Group.GetMinGroup(g,Card.GetAttack) return c:IsMonster() and c:IsFaceup() and c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and not c:IsHasEffect(EFFECT_CANNOT_ATTACK) and c:GetAttack() Date: Sat, 14 Jun 2025 13:08:25 +0200 Subject: [PATCH 092/128] added Grace Princess Kaori --- rush/c160215018.lua | 83 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 rush/c160215018.lua diff --git a/rush/c160215018.lua b/rush/c160215018.lua new file mode 100644 index 0000000000..cba0759f05 --- /dev/null +++ b/rush/c160215018.lua @@ -0,0 +1,83 @@ +--いとをかしかおりひめ +--Grace Princess Kaori +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Special summon procedure + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetRange(LOCATION_HAND) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Gain ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(s.cost) + e2:SetTarget(s.target) + e2:SetOperation(s.operation) + c:RegisterEffect(e2) +end +s.listed_names={160004013,160215023} +function s.spcfilter(c) + return c:IsMonster() and c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) and c:IsDefense(1400) and not c:IsPublic() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_HAND,0,nil) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) + local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_HAND,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + g:DeleteGroup() +end +function s.cost(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 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) +end +function s.thfilter(c) + return c:IsCode(160004013,160215023) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoGrave(g,REASON_COST)<1 then return end + --Effect + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Recover(p,d,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end \ No newline at end of file From e391ac4ae3b6468b1c347821f256d6b18b80d2ea Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 15 Jun 2025 07:29:31 -0300 Subject: [PATCH 093/128] Script updates Removed trailing white spaces from scripts already in the DeltaBagooska repository --- official/c10515412.lua | 2 +- official/c11082056.lua | 2 +- official/c14301396.lua | 2 +- official/c23020408.lua | 2 +- official/c26462013.lua | 2 +- official/c29251488.lua | 2 +- official/c30964246.lua | 2 +- official/c37433748.lua | 21 +++++++++------------ official/c38694052.lua | 4 ++-- official/c4837861.lua | 2 +- official/c50903514.lua | 2 +- official/c63899196.lua | 4 ++-- official/c64664373.lua | 2 +- official/c64961254.lua | 2 +- official/c66809920.lua | 2 +- official/c67797569.lua | 4 ++-- official/c69809989.lua | 2 +- official/c70369116.lua | 5 +++-- official/c74011784.lua | 4 ++-- official/c74271714.lua | 2 +- official/c79415624.lua | 2 +- official/c92034192.lua | 2 +- official/c96004535.lua | 2 +- official/c97556336.lua | 6 +++--- pre-release/c100443001.lua | 3 +-- pre-release/c100445026.lua | 2 +- proc_rush.lua | 2 +- rush/c160021005.lua | 2 +- rush/c160021034.lua | 6 +++--- rush/c160021064.lua | 4 ++-- skill/c300308011.lua | 4 ++-- unofficial/c511000513.lua | 6 +++--- unofficial/c511000881.lua | 6 +++--- unofficial/c511000921.lua | 8 ++++---- unofficial/c511000986.lua | 4 ++-- unofficial/c511001561.lua | 13 +++++-------- unofficial/c511001631.lua | 4 ++-- unofficial/c511002219.lua | 6 +++--- unofficial/c511002599.lua | 3 +-- unofficial/c511002621.lua | 8 ++++---- unofficial/c511005041.lua | 4 ++-- unofficial/c511005093.lua | 7 ++----- unofficial/c511027112.lua | 7 ++++--- unofficial/c95000003.lua | 10 +++++----- 44 files changed, 91 insertions(+), 100 deletions(-) diff --git a/official/c10515412.lua b/official/c10515412.lua index 5820270bec..488dd965c3 100644 --- a/official/c10515412.lua +++ b/official/c10515412.lua @@ -65,7 +65,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function() return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_NORMAL),tp,LOCATION_MZONE,0,1,nil) end) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - --Reset e1 when the card is activated (to allow effects of Continuous Spell/Traps to be used when they are face-up) + --Reset e1 when the card is activated (to allow effects of Continuous Spell/Traps to be used when they are face-up) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) diff --git a/official/c11082056.lua b/official/c11082056.lua index 6bb0b8e789..ebffdcba39 100644 --- a/official/c11082056.lua +++ b/official/c11082056.lua @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end if Duel.SendtoGrave(mc,REASON_EFFECT)==0 or not mc:IsLocation(LOCATION_GRAVE) then return end local code=mc:GetCode() - if mc:IsPreviousLocation(LOCATION_ONFIELD) and mc:IsPreviousPosition(POS_FACEUP) then + if mc:IsPreviousLocation(LOCATION_ONFIELD) and mc:IsPreviousPosition(POS_FACEUP) then code=mc:GetPreviousCodeOnField() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) diff --git a/official/c14301396.lua b/official/c14301396.lua index 069c10e552..9d05e38647 100644 --- a/official/c14301396.lua +++ b/official/c14301396.lua @@ -68,7 +68,7 @@ end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c) diff --git a/official/c23020408.lua b/official/c23020408.lua index c0766a867a..49cb8c1819 100644 --- a/official/c23020408.lua +++ b/official/c23020408.lua @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) Duel.MoveToDeckTop(tc) - else + else Duel.HintSelection(tc,true) Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end diff --git a/official/c26462013.lua b/official/c26462013.lua index bdf4101ca8..668d95f7d6 100644 --- a/official/c26462013.lua +++ b/official/c26462013.lua @@ -50,7 +50,7 @@ function s.spfilter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end diff --git a/official/c29251488.lua b/official/c29251488.lua index 415e72a4a5..731480fdee 100644 --- a/official/c29251488.lua +++ b/official/c29251488.lua @@ -140,7 +140,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) end end function s.applyfilter(c) - return c:IsRitualSpell() and c:IsSetCard(SET_RECIPE) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil + return c:IsRitualSpell() and c:IsSetCard(SET_RECIPE) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil end function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end diff --git a/official/c30964246.lua b/official/c30964246.lua index 400be42355..e390d34ffb 100644 --- a/official/c30964246.lua +++ b/official/c30964246.lua @@ -49,7 +49,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) Duel.ShuffleHand(tp) if Duel.IsExistingMatchingCard(s.trapfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() diff --git a/official/c37433748.lua b/official/c37433748.lua index 02992ee851..7ae581c7d0 100644 --- a/official/c37433748.lua +++ b/official/c37433748.lua @@ -2,7 +2,7 @@ --SPYRAL GEAR - Last Resort local s,id=GetID() function s.initial_effect(c) - --equip + --Equip this card to 1 "SPYRAL" monster you control local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) @@ -29,7 +29,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not tc:IsRelateToEffect(e) then Duel.SendtoGrave(c,REASON_EFFECT) return end @@ -42,7 +42,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) - --destroy sub + --The equipped monster cannot be destroyed by battle or card effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -53,18 +53,18 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e3) - --cannot be targeted + --Your opponent cannot target the equipped monster with card effects local e4=e2:Clone() e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e4:SetValue(aux.tgoval) c:RegisterEffect(e4) - --direct attack + --Allo the equipped monster to attack directly this turn local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,1)) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_SZONE) e5:SetCountLimit(1) - e5:SetCondition(s.dircon) + e5:SetCondition(function() return Duel.IsAbleToEnterBP() end) e5:SetCost(s.dircost) e5:SetOperation(s.dirop) e5:SetReset(RESET_EVENT|RESETS_STANDARD) @@ -73,16 +73,13 @@ end function s.eqlimit(e,c) return c==e:GetLabelObject() end -function s.dircon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end function s.dircost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local g=Group.FromCards(c,c:GetEquipTarget()) + local g=Group.FromCards(c,c:GetEquipTarget()) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,g) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,g) - Duel.SendtoGrave(g,REASON_COST) + local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,g) + Duel.SendtoGrave(tg,REASON_COST) end function s.dirop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c38694052.lua b/official/c38694052.lua index f2f903a63a..8df27a20e8 100644 --- a/official/c38694052.lua +++ b/official/c38694052.lua @@ -48,8 +48,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and tc:IsPreviousLocation(LOCATION_MZONE) - and (tc:HasLevel() or tc:HasRank()) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and tc:IsPreviousLocation(LOCATION_MZONE) + and (tc:HasLevel() or tc:HasRank()) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) local sc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() diff --git a/official/c4837861.lua b/official/c4837861.lua index b78e568f5b..23e53fcd9f 100644 --- a/official/c4837861.lua +++ b/official/c4837861.lua @@ -76,7 +76,7 @@ function s.eqfilter(c,tp) return c:CheckUniqueOnField(tp) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,0,LOCATION_EXTRA,1,nil,tp) end Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_EXTRA) end diff --git a/official/c50903514.lua b/official/c50903514.lua index ffc5f3aa0b..73c2dce3d3 100644 --- a/official/c50903514.lua +++ b/official/c50903514.lua @@ -41,7 +41,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsAttackAbove(600) and tc:IsRelateToEffect(e) and tc:IsFaceup() - and c:UpdateAttack(-600)==-600 then + and c:UpdateAttack(-600)==-600 then --That monster gains 600 ATK tc:UpdateAttack(600,nil,c) end diff --git a/official/c63899196.lua b/official/c63899196.lua index 7210fd5e42..5f2607ec1f 100644 --- a/official/c63899196.lua +++ b/official/c63899196.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) end s.listed_series={SET_MONARCH} s.listed_names={id,51945556,4929256,26205777,60229110,73125233,9748752} ---"Zaborg the Thunder Monarch", "Mobius the Frost Monarch", "Thestalos the Firestorm Monarch", "Granmarg the Rock Monarch", "Raiza the Storm Monarch", "Caius the Shadow Monarch" +--"Zaborg the Thunder Monarch", "Mobius the Frost Monarch", "Thestalos the Firestorm Monarch", "Granmarg the Rock Monarch", "Raiza the Storm Monarch", "Caius the Shadow Monarch" function s.tgfilter(c) return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToGrave() end @@ -72,7 +72,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) local sumc=sg:Select(tp,1,1,nil):GetFirst() Duel.BreakEffect() - Duel.Summon(tp,sumc,true,nil) + Duel.Summon(tp,sumc,true,nil) end end end \ No newline at end of file diff --git a/official/c64664373.lua b/official/c64664373.lua index 340bf22769..8f6db1de2f 100644 --- a/official/c64664373.lua +++ b/official/c64664373.lua @@ -26,7 +26,7 @@ function s.spfilter(c,e,tp,rac,att,atk) if c:IsAttribute(att) then ct=ct+1 end if c:IsAttack(atk) then ct=ct+1 end return ct>=2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and ((c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) + and ((c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c64961254.lua b/official/c64961254.lua index edab30f2f4..77c84b8666 100644 --- a/official/c64961254.lua +++ b/official/c64961254.lua @@ -28,7 +28,7 @@ function s.thcfilter(c) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - and not Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE,0,1,nil) + and not Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) return c:IsCode(91969909) and c:IsAbleToHand() diff --git a/official/c66809920.lua b/official/c66809920.lua index bd0914393a..63fd51c639 100644 --- a/official/c66809920.lua +++ b/official/c66809920.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_VALKYRIE} -s.listed_names={92182447,id} --"Mischief of the Time Goddess" +s.listed_names={92182447,id} --"Mischief of the Time Goddess" function s.thfilter(c) return c:IsCode(92182447) and c:IsAbleToHand() end diff --git a/official/c67797569.lua b/official/c67797569.lua index 981e1c8b6d..60b984e968 100644 --- a/official/c67797569.lua +++ b/official/c67797569.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) - --Cchange face-up monsters your opponent controls, up to the number of "Laval" monsters you control, to face-down Defense Position + --Change face-up monsters your opponent controls, up to the number of "Laval" monsters you control, to face-down Defense Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_POSITION) @@ -37,7 +37,7 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) + return sg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) diff --git a/official/c69809989.lua b/official/c69809989.lua index fd0748317f..a9cf2aecd4 100644 --- a/official/c69809989.lua +++ b/official/c69809989.lua @@ -42,7 +42,7 @@ 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_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) diff --git a/official/c70369116.lua b/official/c70369116.lua index 3c5429e4d4..28fbd42938 100644 --- a/official/c70369116.lua +++ b/official/c70369116.lua @@ -10,8 +10,8 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,id) e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1) @@ -39,6 +39,7 @@ end function s.atop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then + --It becomes DARK until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) @@ -48,7 +49,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) end end function s.copfilter(c) - return c:IsAbleToGraveAsCost() and c:IsSetCard(SET_FUSION) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:CheckActivateEffect(true,true,false)~=nil + return c:IsAbleToGraveAsCost() and c:IsSetCard(SET_FUSION) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:CheckActivateEffect(true,true,false)~=nil end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,2000) and Duel.IsExistingMatchingCard(s.copfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c74011784.lua b/official/c74011784.lua index cce5fb2177..d7ffac4e48 100644 --- a/official/c74011784.lua +++ b/official/c74011784.lua @@ -67,7 +67,7 @@ end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end +end function s.spfilter(c,e,tp) return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -82,4 +82,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c74271714.lua b/official/c74271714.lua index c200019702..9a42932511 100644 --- a/official/c74271714.lua +++ b/official/c74271714.lua @@ -30,7 +30,7 @@ end function s.rmtgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local g=Duel.GetMatchingGroup(s.rmtgfilter,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_HAND) Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK) diff --git a/official/c79415624.lua b/official/c79415624.lua index 5127f0be6d..25560c2608 100644 --- a/official/c79415624.lua +++ b/official/c79415624.lua @@ -74,7 +74,7 @@ function s.desfilter(c,e) return c:IsCanBeEffectTarget(e) and (c:IsMonster() or (c:IsContinuousSpell() and c:IsFaceup())) end function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(Card.IsContinuousSpell,1,nil) + return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(Card.IsContinuousSpell,1,nil) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c92034192.lua b/official/c92034192.lua index 84608132c6..9783e198bf 100644 --- a/official/c92034192.lua +++ b/official/c92034192.lua @@ -42,7 +42,7 @@ s.listed_series={SET_SUPER_QUANT,SET_SUPER_QUANTAL_MECH_BEAST} function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_EFFECT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) diff --git a/official/c96004535.lua b/official/c96004535.lua index 0fecdc0e3a..ff4cb46beb 100644 --- a/official/c96004535.lua +++ b/official/c96004535.lua @@ -44,7 +44,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) end function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) + if Duel.NegateActivation(ev) and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() diff --git a/official/c97556336.lua b/official/c97556336.lua index ddcb365b19..1c7cbbc401 100644 --- a/official/c97556336.lua +++ b/official/c97556336.lua @@ -58,7 +58,7 @@ function s.tdfilter(c,tp) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) @@ -70,9 +70,9 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if sc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,sc) else Duel.HintSelection(sc) end local c=e:GetHandler() - if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) - and c:IsRelateToEffect(e) + and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then --Banish it when it leaves the field local e1=Effect.CreateEffect(c) diff --git a/pre-release/c100443001.lua b/pre-release/c100443001.lua index 8104029c84..963cbfcef7 100644 --- a/pre-release/c100443001.lua +++ b/pre-release/c100443001.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) + return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) end function s.controlfilter(c) return c:HasCounter(COUNTER_MAIDEN) and c:IsControlerCanBeChanged() @@ -74,6 +74,5 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) if sc then Duel.GetControl(sc,tp) end - end end \ No newline at end of file diff --git a/pre-release/c100445026.lua b/pre-release/c100445026.lua index 1cdd0fc079..b0cb87ac7e 100644 --- a/pre-release/c100445026.lua +++ b/pre-release/c100445026.lua @@ -46,7 +46,7 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + 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) diff --git a/proc_rush.lua b/proc_rush.lua index 6eda6ca0dd..f52035f1bd 100644 --- a/proc_rush.lua +++ b/proc_rush.lua @@ -132,7 +132,7 @@ FLAG_DOUBLE_TRIB_WYRM=160015011 -- Demolition Soldier Ashiba Bikke FLAG_DOUBLE_TRIB_FIEND=160210078 -- Royal Rebel's Guardian FLAG_DOUBLE_TRIB_SPELLCASTER=160017008 -- Releaslayer FLAG_DOUBLE_TRIB_0_ATK=160017041 -- Multiply Skull -FLAG_DOUBLE_TRIB_0_DEF=160017141 +FLAG_DOUBLE_TRIB_0_DEF=160017141 FLAG_DOUBLE_TRIB_EFFECT=160017241 FLAG_DOUBLE_TRIB_LEGEND=160212047 -- Legend Scout FLAG_DOUBLE_TRIB_FAIRY=160019009 -- Dice Key Lilith diff --git a/rush/c160021005.lua b/rush/c160021005.lua index 226a4eaa39..c2fa638ca6 100644 --- a/rush/c160021005.lua +++ b/rush/c160021005.lua @@ -26,7 +26,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.ShuffleExtra(tp) - --Effect + --Effect local announceFilter={} for _,name in pairs(tc.material) do if #announceFilter==0 then diff --git a/rush/c160021034.lua b/rush/c160021034.lua index 869b60489d..3cd941b512 100644 --- a/rush/c160021034.lua +++ b/rush/c160021034.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) --Destroy 1 card your opponent controls local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_names={160008032} +s.listed_names={160008032} --"Master of the Sevens Road" function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNotMaximumModeSide,tp,0,LOCATION_ONFIELD,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) @@ -29,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dg2=dg:AddMaximumCheck() Duel.HintSelection(dg2) if Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,160008032) - and Duel.IsExistingMatchingCard(aux.FilterMaximumSideFunctionEx(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) + and Duel.IsExistingMatchingCard(aux.FilterMaximumSideFunctionEx(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then local g=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,1,nil) g=g:AddMaximumCheck() diff --git a/rush/c160021064.lua b/rush/c160021064.lua index 87be7bfb41..16eae33be2 100644 --- a/rush/c160021064.lua +++ b/rush/c160021064.lua @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)<1 then return end --Effect local tc=eg:GetFirst() - if Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)>0 + if Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/skill/c300308011.lua b/skill/c300308011.lua index 5ca46561c4..f92fd72465 100644 --- a/skill/c300308011.lua +++ b/skill/c300308011.lua @@ -62,7 +62,7 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp) s.eqop(ec,e,tp,sc,atk) end end - end + end end function s.eqop(c,e,tp,tc,atk) if not c:EquipByEffectAndLimitRegister(e,tp,tc,nil,false) then return end @@ -81,4 +81,4 @@ function s.eqop(c,e,tp,tc,atk) e2:SetValue(function(e,c) return c:GetControler()==e:GetHandlerPlayer() end) e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/unofficial/c511000513.lua b/unofficial/c511000513.lua index 379fb75ac0..54451892e5 100644 --- a/unofficial/c511000513.lua +++ b/unofficial/c511000513.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_SEND_REPLACE) e3:SetTarget(s.reptg) - c:RegisterEffect(e3) + c:RegisterEffect(e3) end s.listed_series={SET_NUMBER} s.xyz_number=77 @@ -51,8 +51,8 @@ end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetDestination()==LOCATION_REMOVED and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - if Duel.SelectYesNo(tp,aux.Stringid(77631175,0)) then + if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then c:RemoveOverlayCard(tp,1,1,REASON_COST) return true else return false end -end +end \ No newline at end of file diff --git a/unofficial/c511000881.lua b/unofficial/c511000881.lua index c478127610..3c17ac6755 100644 --- a/unofficial/c511000881.lua +++ b/unofficial/c511000881.lua @@ -14,13 +14,13 @@ function s.initial_effect(c) end s.listed_names={511000880,id+1} --"KC-1 Crayton", "Tank Token" function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,4,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 or + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,500,1200,4,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE)then return end for i=1,3 do local token=Duel.CreateToken(tp,id+1) @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/unofficial/c511000921.lua b/unofficial/c511000921.lua index c9668dc2e0..0615096345 100644 --- a/unofficial/c511000921.lua +++ b/unofficial/c511000921.lua @@ -3,7 +3,7 @@ Duel.LoadScript("c420.lua") local s,id=GetID() function s.initial_effect(c) - --Special Summon 2 "Emissary of Darkness" monsters from your Deck + --Special Summon 2 "Emissary of Darkness" monsters from your Deck local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -25,8 +25,8 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) c:RegisterEffect(e3) end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return ep==tp and Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsEmissaryOfDarkness() @@ -43,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/unofficial/c511000986.lua b/unofficial/c511000986.lua index b06bfa768c..57ac33d74c 100644 --- a/unofficial/c511000986.lua +++ b/unofficial/c511000986.lua @@ -19,7 +19,7 @@ function s.cfilter(c,tp) return c:IsType(TYPE_XYZ) and c:IsC() and c:GetOverlayCount()>0 and c:IsSummonPlayer(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return #eg==1 and eg:IsExists(s.cfilter,1,nil,1-tp) + return #eg==1 and eg:IsExists(s.cfilter,1,nil,1-tp) end function s.thfilter(c) return c:IsCode(111011002) and c:IsAbleToHand() @@ -45,4 +45,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) Duel.RegisterEffect(e1,tp) end -end +end \ No newline at end of file diff --git a/unofficial/c511001561.lua b/unofficial/c511001561.lua index 78d4e36a03..70d3be681a 100644 --- a/unofficial/c511001561.lua +++ b/unofficial/c511001561.lua @@ -22,13 +22,10 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end +s.listed_names={id+1} --"Copy Token" function s.sumchk(e,tp,eg,ep,ev,re,r,rp) for tc in eg:Iter() do - if tc:GetSummonPlayer()==0 then - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - else - Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) - end + Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,RESET_PHASE|PHASE_END,0,1) end end function s.tokenfilter(c,tp) @@ -91,9 +88,9 @@ function s.tokenop(e,tp,eg,ep,ev,re,r,rp) e7:SetCode(EFFECT_CANNOT_ATTACK) e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e7:SetCondition(function(e) return Duel.IsTurnPlayer(e:GetHandlerPlayer()) end) - e7:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TOFIELD) + e7:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)) token:RegisterEffect(e7) - token:CopyEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD&~RESET_TOFIELD,1) + token:CopyEffect(tc:GetOriginalCode(),RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD),1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/unofficial/c511001631.lua b/unofficial/c511001631.lua index ca830e00ed..059c9030fa 100644 --- a/unofficial/c511001631.lua +++ b/unofficial/c511001631.lua @@ -17,7 +17,7 @@ function s.tgfilter(c,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp,c) end function s.spfilter(c,lv,e,tp,tc) - return c:IsRank(lv) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 + return c:IsRank(lv) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/unofficial/c511002219.lua b/unofficial/c511002219.lua index 4379478e81..08887d1b46 100644 --- a/unofficial/c511002219.lua +++ b/unofficial/c511002219.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Synchro Summon 1 Synchro Monster by banishing this card and 1 non-Tuner monster from your GY local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89326990,0)) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) @@ -27,7 +27,7 @@ function s.matfilter(c,mc,sc) return c:IsAbleToRemove() and sc:IsSynchroSummonable(nil,Group.FromCards(c,mc)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) + if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) and Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,tp,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Synchro.Send=2 Duel.SynchroSummon(tp,tc,nil,mat) end -end +end \ No newline at end of file diff --git a/unofficial/c511002599.lua b/unofficial/c511002599.lua index f56e66b96a..c4a8ee57b2 100644 --- a/unofficial/c511002599.lua +++ b/unofficial/c511002599.lua @@ -22,7 +22,6 @@ function s.initial_effect(c) e2:SetCost(Cost.Detach(1)) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) - end s.listed_series={SET_NUMBER} -s.xyz_number=39 +s.xyz_number=39 \ No newline at end of file diff --git a/unofficial/c511002621.lua b/unofficial/c511002621.lua index 055f765cbd..fc3e87d5f3 100644 --- a/unofficial/c511002621.lua +++ b/unofficial/c511002621.lua @@ -92,11 +92,11 @@ end function s.limitop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(s.limitfilter,tp,0xff,0xff,nil) - for tc in aux.Next(g) do + for tc in g:Iter() do tc:RegisterFlagEffect(id,0,0,0) end local g2=Duel.GetMatchingGroup(s.limitfilter2,tp,0xff,0xff,nil) - for tc in aux.Next(g2) do + for tc in g2:Iter() do tc:RegisterFlagEffect(id+1,0,0,0) end end @@ -145,13 +145,13 @@ function s.atkcheckop(e,tp,eg,ep,ev,re,r,rp) end function s.wincon(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetTurnPlayer() - return Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)==0 and Duel.GetActivityCount(p,ACTIVITY_NORMALSUMMON)==0 + return Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)==0 and Duel.GetActivityCount(p,ACTIVITY_NORMALSUMMON)==0 and Duel.GetActivityCount(p,ACTIVITY_SPSUMMON)==0 and Duel.GetActivityCount(p,ACTIVITY_FLIPSUMMON)==0 end function s.winop(e,tp,eg,ep,ev,re,r,rp) local WIN_REASON=0x5a local p=Duel.GetTurnPlayer() - if Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)==0 and Duel.GetActivityCount(p,ACTIVITY_NORMALSUMMON)==0 + if Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)==0 and Duel.GetActivityCount(p,ACTIVITY_NORMALSUMMON)==0 and Duel.GetActivityCount(p,ACTIVITY_SPSUMMON)==0 and Duel.GetActivityCount(p,ACTIVITY_FLIPSUMMON)==0 then Duel.Win(1-p,WIN_REASON) end diff --git a/unofficial/c511005041.lua b/unofficial/c511005041.lua index c37fb75f05..dae4178c48 100644 --- a/unofficial/c511005041.lua +++ b/unofficial/c511005041.lua @@ -17,7 +17,7 @@ end function s.spcon(e,c) if c==nil then return true end local g=Duel.GetMatchingGroup(aux.AND(Card.IsContinuousTrap,Card.IsReleasable),c:GetControler(),LOCATION_ONFIELD,0,nil) - return not Duel.IsPlayerAffectedByEffect(c:GetControler(),EFFECT_CANNOT_RELEASE) and #g>0 + return not Duel.IsPlayerAffectedByEffect(c:GetControler(),EFFECT_CANNOT_RELEASE) and #g>0 and Duel.GetMZoneCount(e:GetHandlerPlayer())>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) @@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.Release(g,REASON_COST) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/unofficial/c511005093.lua b/unofficial/c511005093.lua index 614c3cb887..639b69dc00 100644 --- a/unofficial/c511005093.lua +++ b/unofficial/c511005093.lua @@ -49,7 +49,7 @@ local pack={} --before anything if not BoosterDraft then BoosterDraft={} - local function finish_setup() + local function finish_setup() --Pre-draw local e1=Effect.GlobalEffect() e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -87,7 +87,6 @@ if not BoosterDraft then counts[1]=Duel.GetPlayersCount(1) Duel.DisableShuffleCheck() Duel.Hint(HINT_CARD,0,id) - for p=z,o do for team=1,counts[p] do Duel.RemoveCards(Duel.GetFieldGroup(p,0xff,0),0,-2,REASON_RULE) @@ -96,7 +95,6 @@ if not BoosterDraft then end end end - local groups={} groups[0]={} groups[1]={} @@ -106,7 +104,6 @@ if not BoosterDraft then for i=1,counts[1] do groups[1][i]={} end - local function generate_packs() local total=(counts[0]+counts[1])*3 local retpacks={} @@ -164,4 +161,4 @@ if not BoosterDraft then e:Reset() end finish_setup() -end +end \ No newline at end of file diff --git a/unofficial/c511027112.lua b/unofficial/c511027112.lua index a6814416de..9430b387b9 100644 --- a/unofficial/c511027112.lua +++ b/unofficial/c511027112.lua @@ -66,7 +66,7 @@ function s.effdamcon(e,tp,eg,ep,ev,re,r,rp) local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) if ex and (cp==tp or cp==PLAYER_ALL) and not rd and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE) then e:SetLabel(cv) - return true + return true end ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) if ex and (cp==tp or cp==PLAYER_ALL) and rr and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE) then @@ -114,7 +114,8 @@ function s.flagval(e,c) end --This card gains ATK equal to the ATK lost, then monsters your opponent controls lose ATK equal to the ATK gained function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffectLabel(id) and e:GetHandler():GetFlagEffectLabel(id)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end + if chk==0 then return e:GetHandler():GetFlagEffectLabel(id) and e:GetHandler():GetFlagEffectLabel(id)>0 + and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -129,4 +130,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end c:SetFlagEffectLabel(id,0) -end +end \ No newline at end of file diff --git a/unofficial/c95000003.lua b/unofficial/c95000003.lua index f9b744fa3b..f3880290ca 100644 --- a/unofficial/c95000003.lua +++ b/unofficial/c95000003.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_CANNOT_DISEFFECT) e4:SetRange(LOCATION_FZONE) - e4:SetValue(s.effectfilter) + e4:SetValue(s.effectfilter) c:RegisterEffect(e4) --(Hidden Effect) Return all other Spell/Trap cards on the field to the hand local e5=Effect.CreateEffect(c) @@ -49,7 +49,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil):GetClassCount(Card.GetCode)==5 end end function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsCode,1,nil,95000004) and sg:IsExists(Card.IsCode,1,nil,95000005) and sg:IsExists(Card.IsCode,1,nil,95000006) + return sg:IsExists(Card.IsCode,1,nil,95000004) and sg:IsExists(Card.IsCode,1,nil,95000005) and sg:IsExists(Card.IsCode,1,nil,95000006) and sg:IsExists(Card.IsCode,1,nil,95000007) and sg:IsExists(Card.IsCode,1,nil,95000008) end function s.setop(e,tp,eg,ep,ev,re,r,rp) @@ -63,13 +63,13 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.effectfilter(e,ct) - local trig_e=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) + local trig_e=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) local trig_c=trig_e:GetHandler() if not (trig_e:IsTrapEffect() and trig_c:IsContinuousTrap()) then return false end return trig_c:IsControler(e:GetHandlerPlayer()) and trig_c:IsLocation(LOCATION_ONFIELD) and trig_c:IsFaceup() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) end @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file From bcd29d1ce77f466d2f45734befa0a9df59d82336 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Sun, 15 Jun 2025 13:51:32 +0200 Subject: [PATCH 094/128] added Grace Bird --- rush/c160215021.lua | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 rush/c160215021.lua diff --git a/rush/c160215021.lua b/rush/c160215021.lua new file mode 100644 index 0000000000..b43b06138e --- /dev/null +++ b/rush/c160215021.lua @@ -0,0 +1,56 @@ +--いとをかしとり +--Grace Bird +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Draw + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + 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 +s.listed_names={160004013} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=10 +end +function s.costfilter(c) + return c:IsMonster() and c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end +end +function s.target(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.thfilter(c) + return c:IsCode(160004013) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoGrave(g,REASON_COST)<1 then return end + --Effect + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Draw(p,d,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g2>0 then + Duel.BreakEffect() + Duel.SendtoHand(g2,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g2) + end + end +end \ No newline at end of file From 8dd58a6d335a185d3842b5e80f1c5a63f0218e19 Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 15 Jun 2025 10:04:02 -0300 Subject: [PATCH 095/128] "Torna the Magician of Whirlwinds" fix Fixed a bug where it would only be able to destroy face-up monsters --- rush/c160402051.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rush/c160402051.lua b/rush/c160402051.lua index 04c8285014..b77f85f4ec 100644 --- a/rush/c160402051.lua +++ b/rush/c160402051.lua @@ -27,7 +27,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_FUSION) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsDefensePos),tp,0,LOCATION_MZONE,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) end Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) @@ -35,7 +35,7 @@ function s.spfilter(c,e,tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) --Effect - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsDefensePos,8),tp,0,LOCATION_MZONE,nil) + local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local dg=g:Select(tp,1,1,nil) local dg2=dg:AddMaximumCheck() @@ -50,4 +50,4 @@ function s.operation(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 From 94c082488c09461404eecef78f568396d84d62ea Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:11:52 +0300 Subject: [PATCH 096/128] Added new card scripts --- pre-release/c100445057.lua | 106 ++++++++++++++++ pre-release/c100445058.lua | 63 +++++++++ pre-release/c100445059.lua | 85 +++++++++++++ pre-release/c101302006.lua | 91 +++++++++++++ pre-release/c101302012.lua | 70 ++++++++++ pre-release/c101302013.lua | 54 ++++++++ pre-release/c101302014.lua | 54 ++++++++ pre-release/c101302015.lua | 89 +++++++++++++ pre-release/c101302016.lua | 69 ++++++++++ pre-release/c101302017.lua | 65 ++++++++++ pre-release/c101302020.lua | 95 ++++++++++++++ pre-release/c101302021.lua | 120 ++++++++++++++++++ pre-release/c101302033.lua | 70 ++++++++++ pre-release/c101302034.lua | 85 +++++++++++++ pre-release/c101302036.lua | 65 ++++++++++ pre-release/c101302041.lua | 84 ++++++++++++ pre-release/c101302050.lua | 74 +++++++++++ pre-release/c101302056.lua | 75 +++++++++++ pre-release/c101302061.lua | 84 ++++++++++++ pre-release/c101302062.lua | 84 ++++++++++++ pre-release/c101302063.lua | 97 ++++++++++++++ pre-release/c101302065.lua | 253 +++++++++++++++++++++++++++++++++++++ pre-release/c101302066.lua | 103 +++++++++++++++ pre-release/c101302076.lua | 122 ++++++++++++++++++ 24 files changed, 2157 insertions(+) create mode 100644 pre-release/c100445057.lua create mode 100644 pre-release/c100445058.lua create mode 100644 pre-release/c100445059.lua create mode 100644 pre-release/c101302006.lua create mode 100644 pre-release/c101302012.lua create mode 100644 pre-release/c101302013.lua create mode 100644 pre-release/c101302014.lua create mode 100644 pre-release/c101302015.lua create mode 100644 pre-release/c101302016.lua create mode 100644 pre-release/c101302017.lua create mode 100644 pre-release/c101302020.lua create mode 100644 pre-release/c101302021.lua create mode 100644 pre-release/c101302033.lua create mode 100644 pre-release/c101302034.lua create mode 100644 pre-release/c101302036.lua create mode 100644 pre-release/c101302041.lua create mode 100644 pre-release/c101302050.lua create mode 100644 pre-release/c101302056.lua create mode 100644 pre-release/c101302061.lua create mode 100644 pre-release/c101302062.lua create mode 100644 pre-release/c101302063.lua create mode 100644 pre-release/c101302065.lua create mode 100644 pre-release/c101302066.lua create mode 100644 pre-release/c101302076.lua diff --git a/pre-release/c100445057.lua b/pre-release/c100445057.lua new file mode 100644 index 0000000000..c735e086a0 --- /dev/null +++ b/pre-release/c100445057.lua @@ -0,0 +1,106 @@ +--御巫奉サナキ +--Sanaki the Mikanko Devotee +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Return 1 "Mikanko" card you control to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon 1 non-Illusion "Mikanko" monster from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_EQUIP) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Equip this card to 1 face-up monster on the field as an Equip Spell + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_EQUIP) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.eqtg) + e3:SetOperation(s.eqop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MIKANKO} +function s.thfilter(c) + return c:IsSetCard(SET_MIKANKO) and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return not c:IsRace(RACE_ILLUSION) and c:IsSetCard(SET_MIKANKO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except "Mikanko" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + 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) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,c,tc) 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(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c100445058.lua b/pre-release/c100445058.lua new file mode 100644 index 0000000000..fb444b02ea --- /dev/null +++ b/pre-release/c100445058.lua @@ -0,0 +1,63 @@ +--ウズヒメの御巫 +--Uzuhime the Manifested Mikanko +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 "Mikanko" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MIKANKO),3,2) + --Add 1 Equip Spell from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Cannot be destroyed by battle, also your opponent takes any battle damage you would have taken from battles involving this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) + c:RegisterEffect(e3) + --Make another attack in a row + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + 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:SetOperation(s.atop) + c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) +end +s.listed_series={SET_MIKANKO} +function s.thfilter(c) + return c:IsEquipSpell() 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.atcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.GetAttacker()==c and c:CanChainAttack(0) +end +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 diff --git a/pre-release/c100445059.lua b/pre-release/c100445059.lua new file mode 100644 index 0000000000..c84cd4a2ea --- /dev/null +++ b/pre-release/c100445059.lua @@ -0,0 +1,85 @@ +--御巫神舞-二貴子 +--Mikanko Divine Dance - Futahashira no Uzu no Miko +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Send 1 "Mikanko" card from your Deck to the GY, except "Mikanko Divine Dance - Futahashira no Uzu no Miko", then you can Set 1 "Mikanko" Spell/Trap from your Deck, except "Mikanko Divine Dance - Futahashira no Uzu no Miko" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --Special Summon 1 "Mikanko" Ritual Monster from your hand or Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.AND(Cost.SelfBanish,s.spcost)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_MIKANKO} +function s.tgfilter(c) + return c:IsSetCard(SET_MIKANKO) and c:IsAbleToGrave() and not c:IsCode(id) +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.setfilter(c) + return c:IsSetCard(SET_MIKANKO) and c:IsSpellTrap() and c:IsSSetable() and not c:IsCode(id) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local dg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #dg>0 and Duel.SendtoGrave(dg,REASON_EFFECT)>0 and dg:GetFirst():IsLocation(LOCATION_GRAVE) then + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SSet(tp,sg) + end + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except "Mikanko" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end + Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_MIKANKO) and c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,true) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101302006.lua b/pre-release/c101302006.lua new file mode 100644 index 0000000000..9dc7f1a534 --- /dev/null +++ b/pre-release/c101302006.lua @@ -0,0 +1,91 @@ +--剛鬼マシン・スープレックス +--Gouki Mashin Suprex +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both this card and 1 "Gouki" monster in your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +s.listed_names={id} +function s.spcostfilter(c,e,tp) + return c:IsSetCard(SET_GOUKI) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() + e:SetLabelObject(rc) + rc:CreateEffectRelation(e) + Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) + Duel.ShuffleHand(tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0) +end +function s.spfilter(c,e,tp) + return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +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 c=e:GetHandler() + local sg=Group.FromCards(c,e:GetLabelObject()) + if sg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + for sc in sg:Iter() do + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --You cannot Special Summon, except "Gouki" monsters, while you control either of those face-up monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101302012.lua b/pre-release/c101302012.lua new file mode 100644 index 0000000000..29b8b7dde0 --- /dev/null +++ b/pre-release/c101302012.lua @@ -0,0 +1,70 @@ +--絢嵐たるメガラ +--Magnifistorming Megala +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + c:RegisterEffect(e1) + --Special Summon 1 "Magnifistorm" monster from your Deck with a different name from the 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:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (rc:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) or (rc:IsSetCard(SET_MAGNIFISTORM) and rc:IsQuickPlaySpell())) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_MZONE,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except WIND monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302013.lua b/pre-release/c101302013.lua new file mode 100644 index 0000000000..8abade161a --- /dev/null +++ b/pre-release/c101302013.lua @@ -0,0 +1,54 @@ +--絢嵐たるエルダム +--Magnifistorming Erdam +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + c:RegisterEffect(e1) + --Add 1 "Magnifistorm" monster or 1 "Mystical Space Typhoon" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON,id} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) 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 \ No newline at end of file diff --git a/pre-release/c101302014.lua b/pre-release/c101302014.lua new file mode 100644 index 0000000000..b5f232509a --- /dev/null +++ b/pre-release/c101302014.lua @@ -0,0 +1,54 @@ +--絢嵐たるスエン +--Magnifistorming Suen +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + c:RegisterEffect(e1) + --Add 1 "Magnifistorm" Spell/Trap or 1 "Mystical Space Typhoon" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsSpellTrap()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) 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/c101302015.lua b/pre-release/c101302015.lua new file mode 100644 index 0000000000..afc372648c --- /dev/null +++ b/pre-release/c101302015.lua @@ -0,0 +1,89 @@ +--絢嵐たるスエン +--Magnifistorming Crothea +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Cannot be destroyed by battle or card effects while your opponent controls no Spells/Traps + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCondition(function(e) return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil) end) + e1a:SetValue(1) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e1b) + --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_CHAINING) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Magnifistorm" card and/or 1 "Mystical Space Typhoon" from your Deck and/or GY to your hand + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetCountLimit(1,{id,1}) + e3a:SetTarget(s.thtg) + e3a:SetOperation(s.thop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={id,CARD_MYSTICAL_SPACE_TYPHOON} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) 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|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.rescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsSetCard,nil,SET_MAGNIFISTORM)<=1 and sg:FilterCount(Card.IsCode,nil,CARD_MYSTICAL_SPACE_TYPHOON)<=1 +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) + if #g>0 then + local sg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg>0 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end + --You cannot Special Summon for the rest of this turn, except WIND monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302016.lua b/pre-release/c101302016.lua new file mode 100644 index 0000000000..edee6484a5 --- /dev/null +++ b/pre-release/c101302016.lua @@ -0,0 +1,69 @@ +--絢嵐渦麗ヴァルルーン +--Magnifistorm Vortex Beauty Valrune +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate a monster effect activated by the opponent, then if you have 2 or more "Mystical Space Typhoon" in your GY, you can destroy that monster. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.discon) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Special Summon this card from your GY if "Mystical Space Typhoon" is activated + local e3=e1:Clone() + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) +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_DESTROY,re:GetHandler(),1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable() + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,CARD_MYSTICAL_SPACE_TYPHOON) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302017.lua b/pre-release/c101302017.lua new file mode 100644 index 0000000000..b14388bfcc --- /dev/null +++ b/pre-release/c101302017.lua @@ -0,0 +1,65 @@ +--絢嵐豪火フォニクス +--Magnifistorm Great Pyre Phonix +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand if a Quick-Play Spell Card is activated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Shuffle up to 2 cards your opponent controls into the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) + --Special Summon this card from your GY if "Mystical Space Typhoon" is activated + local e3=e1:Clone() + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302020.lua b/pre-release/c101302020.lua new file mode 100644 index 0000000000..1ee6aab373 --- /dev/null +++ b/pre-release/c101302020.lua @@ -0,0 +1,95 @@ +--ドレミコード・ソルフェージア +--Solfachord Solfeggia +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --Negate a monster effect activated by your opponent, then destroy this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.discon) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_SOLFACHORD)),tp,LOCATION_MZONE,0,1,nil) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon 1 "Solfachord" monster from your hand, except "Solfachord Solfeggia" + 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 +s.listed_names={id} +s.listed_series={SET_GRANSOLFACHORD,SET_SOLFACHORD} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GRANSOLFACHORD),tp,LOCATION_MZONE,0,1,nil) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.Hint(HINT_CARD,0,id) + if Duel.NegateEffect(ev) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(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,exc) + if not (c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) then + return Duel.GetMZoneCount(tp,exc)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,exc,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local cost_chk=Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,0) + local exc=cost_chk and e:GetHandler() or nil + local location=cost_chk and LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA or LOCATION_HAND + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,location,0,1,nil,e,tp,exc) end + local hand_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + if cost_chk and (not hand_chk or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then + Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,1) + e:SetLabel(LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) + else + e:SetLabel(LOCATION_HAND) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,e:GetLabel()) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,e:GetLabel(),0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101302021.lua b/pre-release/c101302021.lua new file mode 100644 index 0000000000..a9783f4bed --- /dev/null +++ b/pre-release/c101302021.lua @@ -0,0 +1,120 @@ +--ドレミコード・プリモア +--Solfachord Primoria +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --Return 1 "Solfachord" card in your Pendulum Zone to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(function(e,tp,eg) return eg:IsExists(s.pendthconfilter,1,nil,tp) end) + e1:SetTarget(s.pendthtg) + e1:SetOperation(s.pendthop) + c:RegisterEffect(e1) + --While you have "Solfachord" cards with even and odd Pendulum Scales in your Pendulum Zone, your activated "Solfachord" cards' effects cannot be negated + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_DISEFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.immcon) + e2:SetValue(s.immval) + c:RegisterEffect(e2) + --Add 1 "Solfachord" card from your Deck to your hand, except "Solfachord Primoria" + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetCountLimit(1,id) + e3a:SetTarget(s.deckthtg) + e3a:SetOperation(s.deckthop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) + --Add 1 "Solfachord" card from your GY or face-up Extra Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_TOHAND) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(function(e,tp,eg) return eg:IsExists(s.gyedthconfilter,1,nil,tp) end) + e4:SetTarget(s.gyedthtg) + e4:SetOperation(s.gyedthop) + c:RegisterEffect(e4) +end +s.listed_names={id} +s.listed_series={SET_SOLFACHORD} +function s.pendthconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() +end +function s.pendthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsAbleToHand() +end +function s.pendthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and s.pendthfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.pendthfilter,tp,LOCATION_PZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.pendthfilter,tp,LOCATION_PZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.pendthop(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 +function s.immcon(e) + local g=Duel.GetMatchingGroup(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil,SET_SOLFACHORD) + local a,b=g:GetFirst(),g:GetNext() + return a and b and ((a:GetScale()+b:GetScale())%2==1) +end +function s.immval(e,ct) + local trig_player,trig_setcodes=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) + if trig_player==1-e:GetHandlerPlayer() then return false end + for _,setcode in ipairs(trig_setcodes) do + if (SET_SOLFACHORD&0xfff)==(setcode&0xfff) and (SET_SOLFACHORD&setcode)==SET_SOLFACHORD then return true end + end +end +function s.deckthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,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.gyedthconfilter(c,tp) + return c:IsLinkSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsSummonPlayer(tp) +end +function s.gyedthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsFaceup() and c:IsAbleToHand() +end +function s.gyedthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.gyedthfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) +end +function s.gyedthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gyedthfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,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/c101302033.lua b/pre-release/c101302033.lua new file mode 100644 index 0000000000..694901f681 --- /dev/null +++ b/pre-release/c101302033.lua @@ -0,0 +1,70 @@ +--メガリス・フローチュ +--Megalith Phuloch +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Add 1 "Megalith" 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_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e1:SetCost(Cost.HardOncePerChain(id)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local ritual_params={ + handler=c, + filter=function(c) return c:IsSetCard(SET_MEGALITH) and not c:IsCode(id) end, + lvtype=RITPROC_GREATER, + location=LOCATION_GRAVE, + forcedselection=function(e,tp,g,sc) return g:IsContains(e:GetHandler()) end + } + --Ritual Summon 1 "Megalith" Ritual Monster from your GY, by Tributing monsters from your hand or field, including this card on your field, whose total Levels equal or exceed the Level of the Ritual Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_RELEASE+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:SetCost(Cost.HardOncePerChain(id)) + e2:SetTarget(Ritual.Target(ritual_params)) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) then + Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) + end + end) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_MEGALITH) 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,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end +function s.ritop(default_operation) + return function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) then + default_operation(e,tp,eg,ep,ev,re,r,rp) + end + end +end \ No newline at end of file diff --git a/pre-release/c101302034.lua b/pre-release/c101302034.lua new file mode 100644 index 0000000000..40fb0171af --- /dev/null +++ b/pre-release/c101302034.lua @@ -0,0 +1,85 @@ +--メガリス・ノートラ・プルーラ +--Megalith Nortra Phulra +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeRitualSummoned() + --Apply a "this turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects" effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) + e1:SetCost(Cost.SelfReveal) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Negate the activation of an opponent's card or effect, and if you do, destroy that card, then if that effect targeted a card(s) on the field, you can Tribute 1 monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_RELEASE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +s.mat_filter=Card.IsRitualMonster +function s.effop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --This turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAINING) + e1:SetOperation(s.inactop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.inactop(e,tp,eg,ep,ev,re,r,rp) + if ep==1-tp then return end + local trig_typ,trig_setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) + if trig_typ&(TYPE_RITUAL|TYPE_MONSTER)~=(TYPE_RITUAL|TYPE_MONSTER) then return end + for _,setcode in ipairs(trig_setcodes) do + if (SET_MEGALITH&0xfff)==(setcode&0xfff) and (SET_MEGALITH&setcode)==SET_MEGALITH then + return Duel.SetChainLimit(function(e,rp,tp) return rp==tp end) + end + end +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + if tg and tg:IsExists(Card.IsOnField,1,nil) then + e:SetLabel(100) + Duel.SetPossibleOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) + else + e:SetLabel(0) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) + and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()==100 + and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Release(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101302036.lua b/pre-release/c101302036.lua new file mode 100644 index 0000000000..058362801f --- /dev/null +++ b/pre-release/c101302036.lua @@ -0,0 +1,65 @@ +--剛鬼ザ・タイラント・オーガ +--Gouki The Tyrant Ogre +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Gouki" Link Monster + 1 Warrior, Dinosaur, or Cyberse monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE)) + --Register the Link Rating of the materials used for its Fusion Summon + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --Destroy cards on the field up to the total Link Rating of the "Gouki" Link Monsters used as material + 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_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()>0 end) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + e0:SetLabelObject(e1) + --If this card battles, your opponent cannot activate cards or effects until the end of the Damage Step + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,1) + e2:SetValue(1) + e2:SetCondition(function(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.matfilter(c) + return c:IsSetCard(SET_GOUKI) and c:IsLinkMonster() +end +function s.valcheck(e,c) + local g=c:GetMaterial() + local total=g:Filter(Card.IsSetCard,nil,SET_GOUKI):GetSum(Card.GetLink) + local link3=g:IsExists(Card.IsLinkAbove,1,nil,3) and 100 or 0 + e:GetLabelObject():SetLabel(total,link3) +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 + local total,link3=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,total,nil) + if link3==100 then + Duel.SetChainLimit(function(te) return not Duel.GetTargetCards(e):IsContains(te:GetHandler()) end) + end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302041.lua b/pre-release/c101302041.lua new file mode 100644 index 0000000000..8f251719c5 --- /dev/null +++ b/pre-release/c101302041.lua @@ -0,0 +1,84 @@ +--剛鬼ドラゴン・オーガ +--Gouki Dragon Ogre +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Add 1 "Gouki" Spell from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.deckthtg) + e1:SetOperation(s.deckthop) + c:RegisterEffect(e1) + --Add 1 "Gouki" monster with lower ATK than a targeted EARTH monster you control 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_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.gythtg) + e2:SetOperation(s.gythop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.deckthfilter(c) + return c:IsSetCard(SET_GOUKI) and c:IsSpell() and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,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.earthfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.gythfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack()) +end +function s.gythfilter(c,atk) + return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:GetAttack()0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --Your opponent's monsters can only target that face-up monster on your field for attacks + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302050.lua b/pre-release/c101302050.lua new file mode 100644 index 0000000000..d341bd7ce3 --- /dev/null +++ b/pre-release/c101302050.lua @@ -0,0 +1,74 @@ +--剛鬼シーク・オーガ +--Gouki Sheik Ogre +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 "Gouki" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) + --Special Summon any number of "Gouki" monsters from your hand with different Levels from each other + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_TO_HAND) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Fusion Summon 1 "Gouki" Fusion Monster from your Extra Deck, using monsters from your hand or field + local params={function(c) return c:IsSetCard(SET_GOUKI) end} + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(Fusion.SummonEffTG(params)) + e2:SetOperation(Fusion.SummonEffOP(params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.spconfilter(c,tp) + return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:IsPreviousLocation(LOCATION_DECK) + and c:IsControler(tp) and not c:IsReason(REASON_DRAW) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GOUKI) 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) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g==0 then return end + ft=math.min(ft,#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_SPSUMMON) + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + for sc in sg:Iter() do + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --You cannot Special Summon, except "Gouki" monsters, while you control any of those face-up monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end + end +end \ No newline at end of file diff --git a/pre-release/c101302056.lua b/pre-release/c101302056.lua new file mode 100644 index 0000000000..4862868f03 --- /dev/null +++ b/pre-release/c101302056.lua @@ -0,0 +1,75 @@ +--剛鬼闘魂 +--Gouki Fighting Spirit +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can Special Summon 1 Level 4 or lower EARTH monster (Warrior, Dinosaur, or Cyberse) from your hand in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Special Summon 1 "Dinowrestler" or "G Golem" monster from your Deck or Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.deckexspcost) + e2:SetTarget(s.deckexsptg) + e2:SetOperation(s.deckexspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI,SET_DINOWRESTLER,SET_G_GOLEM} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.handspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local g=Duel.GetMatchingGroup(s.handspfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.deckexcostfilter(c,e,tp) + return c:IsLinkAbove(3) and c:IsSetCard(SET_GOUKI) + and Duel.IsExistingMatchingCard(s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.deckexspfilter(c,e,tp,cost_card) + if not (c:IsSetCard({SET_DINOWRESTLER,SET_G_GOLEM}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp,cost_card)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,cost_card,c)>0 + end +end +function s.deckexspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.deckexcostfilter,1,false,nil,nil,e,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.deckexcostfilter,1,1,false,nil,nil,e,tp) + Duel.Release(g,REASON_COST) +end +function s.deckexsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.deckexspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101302061.lua b/pre-release/c101302061.lua new file mode 100644 index 0000000000..69eed14ed0 --- /dev/null +++ b/pre-release/c101302061.lua @@ -0,0 +1,84 @@ +--絢嵐たる献詠 +--Magnifistorming Stanza Tribute +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.thfilter1(c) + return c:IsLevelBelow(4) and c:IsSetCard(SET_MAGNIFISTORM) and c:IsAbleToHand() +end +function s.thfilter2(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) + local b2=Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) and not Duel.HasFlagEffect(tp,id+100) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Add 1 Level 4 or lower "Magnifistorm" monster from your Deck to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),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 +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/pre-release/c101302062.lua b/pre-release/c101302062.lua new file mode 100644 index 0000000000..9baf4efb23 --- /dev/null +++ b/pre-release/c101302062.lua @@ -0,0 +1,84 @@ +--絢嵐たる顕現 +--Magnifistorming Summoning Technique +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tgfilter(c) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() +end +function s.thfilter(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) and not Duel.HasFlagEffect(tp,id+100) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_TOGRAVE) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Send 1 "Magnifistorm" monster from your Deck to the GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + 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 +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/pre-release/c101302063.lua b/pre-release/c101302063.lua new file mode 100644 index 0000000000..f682f289f3 --- /dev/null +++ b/pre-release/c101302063.lua @@ -0,0 +1,97 @@ +--絢嵐たる見神 +--Magnifistorming Sight Trance +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tgfilter(c) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() +end +function s.thfilter(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsPlayerCanDraw(tp,2) and not Duel.HasFlagEffect(tp,id) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) and not Duel.HasFlagEffect(tp,id+100) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) + elseif op==2 then + e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.discardfilter(c) + return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsQuickPlaySpell()) and c:IsDiscardable(REASON_EFFECT) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Draw 2 cards, then discard 1 "Magnifistorm" card or 1 Quick-Play Spell, or, if you do not have any in your hand, discard your entire hand + if Duel.Draw(tp,2,REASON_EFFECT)>0 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + local handg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) + if handg:IsExists(s.discardfilter,1,nil) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local dg=handg:FilterSelect(tp,s.discardfilter,1,1,nil) + if #dg>0 then + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) + end + else + Duel.SendtoGrave(handg,REASON_EFFECT|REASON_DISCARD) + end + end + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + 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 +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/pre-release/c101302065.lua b/pre-release/c101302065.lua new file mode 100644 index 0000000000..b9d65c3aa9 --- /dev/null +++ b/pre-release/c101302065.lua @@ -0,0 +1,253 @@ +--幸せの多重奏 +--Solfachord Happiness +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_names={id} +s.listed_series={SET_SOLFACHORD} +function s.thfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id+100) + and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) + and Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetScale)>=2 + local b2=not Duel.HasFlagEffect(tp,id+200) and not Duel.HasFlagEffect(tp,id) + local b3=not Duel.HasFlagEffect(tp,id+300) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,2,nil,e,tp) + 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) + Duel.RegisterFlagEffect(tp,id+op*100,RESET_PHASE|PHASE_END,0,1) + if op==1 then + e:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + elseif op==2 then + e:SetCategory(0) + elseif op==3 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_PZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Discard 1 card, and if you do, add 2 "Solfachord" Pendulum Monsters with different Pendulum Scales from your Deck to your hand + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end + local dg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + local sdg=aux.SelectUnselectGroup(dg,e,tp,2,2,aux.dpcheck(Card.GetScale),1,tp,HINTMSG_ATOHAND) + if #sdg~=2 or Duel.SendtoHand(sdg,nil,REASON_EFFECT)~=2 then return end + Duel.ConfirmCards(1-tp,sdg:Match(Card.IsLocation,nil,LOCATION_HAND)) + Duel.ShuffleHand(tp) + local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + if #sdg~=2 or ct==0 then return end + local hg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end + ct=Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and 1 or (Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)+1) + ct=math.min(ct,ct) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local shg=hg:Select(tp,1,ct,nil) + if #shg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(shg,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,5)) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --You can conduct 1 Pendulum Summon of a "Solfachord" monster(s) in addition to your Pendulum Summon + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) + e1:SetCode(EVENT_ADJUST) + e1:SetOperation(s.checkop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + s.checkop(e,tp) + elseif op==3 then + --Special Summon 2 "Solfachord" cards from your Pendulum Zone + 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_PZONE,0,nil,e,tp) + if #g==2 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.checkop(e,tp) + local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) + if lpz~=nil and lpz:GetFlagEffect(id)<=0 then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,6)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_SPSUMMON_PROC_G) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.pencon1) + e1:SetOperation(s.penop1) + e1:SetValue(SUMMON_TYPE_PENDULUM) + e1:SetReset(RESET_PHASE|PHASE_END) + lpz:RegisterEffect(e1) + lpz:RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) + end + local olpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0) + local orpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + if olpz~=nil and orpz~=nil and olpz:GetFlagEffect(id)<=0 + and olpz:GetFlagEffectLabel(31531170)==orpz:GetFieldID() + and orpz:GetFlagEffectLabel(31531170)==olpz:GetFieldID() then + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetDescription(aux.Stringid(id,6)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_SPSUMMON_PROC_G) + e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE) + e2:SetRange(LOCATION_PZONE) + e2:SetCondition(s.pencon2) + e2:SetOperation(s.penop2) + e2:SetValue(SUMMON_TYPE_PENDULUM) + e2:SetReset(RESETS_STANDARD_PHASE_END) + olpz:RegisterEffect(e2) + olpz:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + end +end +function s.penfilter(c,e,tp,lscale,rscale) + return c:IsSetCard(SET_SOLFACHORD) and Pendulum.Filter(c,e,tp,lscale,rscale) +end +function s.pencon1(e,c,og) + if c==nil then return true end + local tp=c:GetControler() + local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) + if rpz==nil or c==rpz or Duel.GetFlagEffect(tp,29432356)>0 then return false end + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local loc=0 + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_HAND end + if Duel.GetLocationCountFromEx(tp)>0 then loc=loc|LOCATION_EXTRA end + if loc==0 then return false end + local g=nil + if og then + g=og:Filter(Card.IsLocation,nil,loc) + else + g=Duel.GetFieldGroup(tp,loc,0) + end + return g:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) +end +function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) + local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) + local ft2=Duel.GetLocationCountFromEx(tp) + local ft=Duel.GetUsableMZoneCount(tp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + if ft1>0 then ft1=1 end + if ft2>0 then ft2=1 end + ft=1 + end + local loc=0 + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end + local tg=nil + if og then + tg=og:Filter(Card.IsLocation,nil,loc):Filter(s.penfilter,nil,e,tp,lscale,rscale) + else + tg=Duel.GetMatchingGroup(s.penfilter,tp,loc,0,nil,e,tp,lscale,rscale) + end + ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND)) + ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)) + ft2=math.min(ft2,aux.CheckSummonGate(tp) or ft2) + while true do + local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND) + local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) + local ct=ft + if ct1>ft1 then ct=math.min(ct,ft1) end + if ct2>ft2 then ct=math.min(ct,ft2) end + local loc=0 + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end + local g=tg:Filter(Card.IsLocation,sg,loc) + if #g==0 or ft==0 then break end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Group.SelectUnselect(g,sg,tp,#sg>0,Duel.IsSummonCancelable()) + if not tc then break end + if sg:IsContains(tc) then + sg:RemoveCard(tc) + if tc:IsLocation(LOCATION_HAND) then + ft1=ft1+1 + else + ft2=ft2+1 + end + ft=ft+1 + else + sg:AddCard(tc) + if tc:IsLocation(LOCATION_HAND) then + ft1=ft1-1 + else + ft2=ft2-1 + end + ft=ft-1 + end + end + if #sg>0 then + Duel.Hint(HINT_CARD,0,id) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) + Duel.HintSelection(Group.FromCards(c)) + Duel.HintSelection(Group.FromCards(rpz)) + end +end +function s.pencon2(e,c,inchain,re,rp) + if c==nil then return true end + local tp=e:GetOwnerPlayer() + if inchain and tp~=rp then return false end + local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) or Duel.GetFlagEffect(tp,29432356)>0 then return false end + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft=Duel.GetLocationCountFromEx(tp) + if ft<=0 then return false end + if og then + return og:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) + else + return Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale) + end +end +function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) + local tp=e:GetOwnerPlayer() + local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft=Duel.GetLocationCountFromEx(tp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + ft=math.min(ft,aux.CheckSummonGate(tp) or ft) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.penfilter,tp,LOCATION_EXTRA,0,inchain and 1 or 0,ft,nil,e,tp,lscale,rscale) + if g then + sg:Merge(g) + end + if #sg>0 then + Duel.Hint(HINT_CARD,0,31531170) + Duel.Hint(HINT_CARD,0,id) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) + Duel.HintSelection(Group.FromCards(c)) + Duel.HintSelection(Group.FromCards(rpz)) + end +end \ No newline at end of file diff --git a/pre-release/c101302066.lua b/pre-release/c101302066.lua new file mode 100644 index 0000000000..ec3cab8c80 --- /dev/null +++ b/pre-release/c101302066.lua @@ -0,0 +1,103 @@ +--メガリス・アナスタシス +--Megalith Anastasis +--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) + --Add 2 "Megalith" monsters (1 Level 4 or lower and 1 Level 8 or higher) 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_SZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Discard()) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Activate 1 of these effects + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.effcon) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +function s.thfilter(c) + return (c:IsLevelBelow(4) or c:IsLevelAbove(8)) and c:IsSetCard(SET_MEGALITH) and c:IsAbleToHand() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsLevelBelow,1,nil,4) and sg:IsExists(Card.IsLevelAbove,1,nil,8) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) +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 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end +end +function s.effconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsRitualSummoned() and c:IsSetCard(SET_MEGALITH) and c:IsFaceup() +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.effconfilter,1,nil,tp) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsPlayerCanDraw(tp,2) + local b2=not Duel.HasFlagEffect(tp,id+100) + and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_RELEASE) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Draw 2 cards, then discard 1 card + if Duel.Draw(tp,2,REASON_EFFECT)==2 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end + elseif op==2 then + --Tribute 1 monster your opponent controls + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Release(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101302076.lua b/pre-release/c101302076.lua new file mode 100644 index 0000000000..8c1ebf3c4a --- /dev/null +++ b/pre-release/c101302076.lua @@ -0,0 +1,122 @@ +--絢嵐たる権能 +--Magnifistorming Sovereign Tyranny +--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) + --Apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+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_SZONE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Negate the effects 1 face-up card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Set this card + 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) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,id) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tdfilter(c,e) + return c:IsQuickPlaySpell() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) + and #g>=3 and g:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) + end + local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,0,tp,300) + Duel.SetPossibleOperationInfo(0,CATEGORY_DEFCHANGE,nil,0,tp,300) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local break_chk=false + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + break_chk=true + Duel.ShuffleDeck(tp) + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + if break_chk then Duel.BreakEffect() end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) + --WIND monsters you control will gain 300 ATK/DEF for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetValue(300) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + Duel.RegisterEffect(e2,tp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and c:IsControler(1-tp) 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,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Negate its effects + tc:NegateEffects(e:GetHandler(),nil,true) + end +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file From d1ffe81bc3a855a9168361c7f92877472e912331 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:32:32 +0300 Subject: [PATCH 097/128] "Mystical Space Typhoon" update Added more hint timings. --- official/c5318639.lua | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/official/c5318639.lua b/official/c5318639.lua index afe40d97de..88ee6ac5a5 100644 --- a/official/c5318639.lua +++ b/official/c5318639.lua @@ -2,30 +2,29 @@ --Mystical Space Typhoon local s,id=GetID() function s.initial_effect(c) - --Activate + --Destroy 1 Spell/Trap on the field local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) 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:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.filter(c) - return c:IsSpellTrap() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end \ No newline at end of file +end From a5d8d2c9ac3b452796518d1523306c310ae668a8 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Tue, 17 Jun 2025 08:09:01 +0800 Subject: [PATCH 098/128] add SET_RB constant --- archetype_setcode_constants.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index e0dfc071c5..6cc7fd3a60 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -595,3 +595,4 @@ SET_ARTMEGIA = 0x1c7 --Pre-release archetypes SET_DOOM_KING = 0x1c8 SET_MAGNIFISTORM = 0x1c9 +SET_RB = 0x1ca From b177dc178f99abf041fa5c278e4c8b157bdcf60c Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Tue, 17 Jun 2025 07:14:10 +0200 Subject: [PATCH 099/128] added Tamatamagachance --- rush/c160402053.lua | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 rush/c160402053.lua diff --git a/rush/c160402053.lua b/rush/c160402053.lua new file mode 100644 index 0000000000..76e9b2d4fa --- /dev/null +++ b/rush/c160402053.lua @@ -0,0 +1,62 @@ +--タマタマガチャンス +--Tamatamagachance +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Send the top 3 cards of your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DECKDES|CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={CARD_TAMABOT} +function s.cfilter(c) + return c:IsMonster() and c:IsRace(RACE_MACHINE) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,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_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.tgfilter(c) + return c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsMonster() +end +function s.chkfilter(c) + return c:IsLevel(7) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) +end +function s.spfilter(c,e,tp) + return (s.chkfilter(c) or c:IsCode(CARD_TAMABOT)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,nil) + if Duel.SendtoGrave(g,REASON_COST)==0 then return end + --Effect + Duel.DiscardDeck(tp,3,REASON_EFFECT) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<1 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local og=Duel.GetOperatedGroup() + local ct=og:FilterCount(s.tgfilter,nil) + if ct>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=aux.SelectUnselectGroup(sg,1,tp,1,math.min(ft,3,#sg),s.rescon,1,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.rescon(sg,e,tp,mg) + if sg:FilterCount(s.chkfilter,nil)>0 then return #sg==1 end + return sg:FilterCount(s.chkfilter,nil)==0 +end \ No newline at end of file From 9748a8d7646f69e34ba43b7a554bef3770d592d0 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:17:25 +0300 Subject: [PATCH 100/128] "Magnifistorming Sovereign Tyranny" update Added a hint timing for the Damage Step to its first effect. --- pre-release/c101302076.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-release/c101302076.lua b/pre-release/c101302076.lua index 8c1ebf3c4a..565395848d 100644 --- a/pre-release/c101302076.lua +++ b/pre-release/c101302076.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_SZONE) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1) e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.efftg) @@ -119,4 +119,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end -end \ No newline at end of file +end From ac811c820ab446f13642e317e9ed4f98f0c57cf9 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:23:46 +0300 Subject: [PATCH 101/128] "Solfachord Happiness" fix Fixed an edge case where the player would be able to select more monsters to Special Summon with its first effect than the number of available Main Monster Zones they have. --- pre-release/c101302065.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pre-release/c101302065.lua b/pre-release/c101302065.lua index b9d65c3aa9..a7625eb5f6 100644 --- a/pre-release/c101302065.lua +++ b/pre-release/c101302065.lua @@ -58,11 +58,11 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sdg:Match(Card.IsLocation,nil,LOCATION_HAND)) Duel.ShuffleHand(tp) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if #sdg~=2 or ct==0 then return end + if ct==0 then return end local hg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end - ct=Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and 1 or (Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)+1) - ct=math.min(ct,ct) + ct=math.min(ct,Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)+1) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local shg=hg:Select(tp,1,ct,nil) if #shg>0 then @@ -250,4 +250,4 @@ function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(rpz)) end -end \ No newline at end of file +end From 10fca404bcd26a4ee4480f0ceae24d8dd34c5338 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 18 Jun 2025 09:26:43 +0200 Subject: [PATCH 102/128] added new rush cards --- rush/c160215040.lua | 59 ++++++++++++++++++++++++++++++++++++++++++ rush/c160215066.lua | 62 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 rush/c160215040.lua create mode 100644 rush/c160215066.lua diff --git a/rush/c160215040.lua b/rush/c160215040.lua new file mode 100644 index 0000000000..daf7cf6a7c --- /dev/null +++ b/rush/c160215040.lua @@ -0,0 +1,59 @@ +--セレブローズ・リッチ・マジシャンズ +--Celeb Rose Rich Magicians +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Fusion Materials + c:EnableReviveLimit() + Fusion.AddProcMix(c,true,true,160013009,160013010) + --Set + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LEAVE_GRAVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={CARD_FUSION,160210022} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) +end +function s.ssfilter(c) + return (c:IsCode(CARD_FUSION,160210022) or c:IsEquipSpell()) and c:IsSpellTrap() and c:IsSSetable() and not c:IsType(TYPE_FIELD) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft>2 then ft=2 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.ssfilter,tp,LOCATION_GRAVE,0,1,ft,nil) + if #g==0 then return end + if Duel.SSet(tp,g)>0 and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + --Cannot activate + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetTargetRange(1,0) + e1:SetValue(s.aclimit) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.aclimit(e,re,tp) + local c=re:GetHandler() + return c:IsType(TYPE_FUSION) and c:IsLevel(7) +end \ No newline at end of file diff --git a/rush/c160215066.lua b/rush/c160215066.lua new file mode 100644 index 0000000000..2607046756 --- /dev/null +++ b/rush/c160215066.lua @@ -0,0 +1,62 @@ +--湾楽姫コルネットラス +--Cornetlass the Music Princess +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Excavate the top 5 cards + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(s.condition) + 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) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.filter(c) + return ((c:IsMonster() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_NORMAL)) or c:IsCode(CARD_FUSION)) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Effect + local c=e:GetHandler() + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return end + Duel.ConfirmDecktop(tp,5) + local g=Duel.GetDecktopGroup(tp,5) + Duel.DisableShuffleCheck() + if g:IsExists(s.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tg=g:FilterSelect(tp,s.filter,1,1,nil) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,tg) + Duel.ShuffleHand(tp) + g:RemoveCard(tg) + end + end + local ct=#g + if ct>0 then + Duel.MoveToDeckBottom(ct,tp) + Duel.SortDeckbottom(tp,tp,ct) + end + --Prevent non-WIND Warriors from attacking + 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:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.ftarget(e,c) + return not c:IsRace(RACE_WARRIOR) or not c:IsAttribute(ATTRIBUTE_WIND) +end \ No newline at end of file From 62d35c7f1ee849eaee753a9dc53a205a954e65e5 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 18 Jun 2025 08:06:00 -0300 Subject: [PATCH 103/128] "Lubellion the Searing Dragon" update Keep its interaction vs Necrovalley consistent with other Fusion effects that can use materials from the GY --- official/c70534340.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/official/c70534340.lua b/official/c70534340.lua index 46f3dcdecd..761b4f3a6c 100644 --- a/official/c70534340.lua +++ b/official/c70534340.lua @@ -3,10 +3,10 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --Fusion Summon procedure + --Fusion Summon materials: 1 DARK monster + "Fallen of Albaz" Fusion.AddProcMix(c,true,true,CARD_ALBAZ,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK)) c:EnableReviveLimit() - --Fusion Summon + --Fusion Summon 1 Level 8 or lower Fusion Monster from your Extra Deck,shuffling Fusion Materials into the Deck, from your monsters on the field, GY, and/or face-up banished cards local params = {fusfilter=s.fusfilter,matfilter=Fusion.OnFieldMat(Card.IsAbleToDeck),extrafil=s.fextra,extraop=Fusion.ShuffleMaterial,stage2=s.stage2,extratg=s.extratg} local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -33,7 +33,7 @@ function s.fusfilter(c) return c:IsLevelBelow(8) and not c:IsCode(id) end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) end function s.stage2(e,tc,tp,mg,chk) if chk==2 then From 43ea320f4fb5e348ca4334e99dd3f214020ea05c Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 18 Jun 2025 20:09:33 +0300 Subject: [PATCH 104/128] Added new card scripts --- pre-release/c101301090.lua | 59 ++++++++++++++++++++++++++ pre-release/c101301091.lua | 62 +++++++++++++++++++++++++++ pre-release/c101301092.lua | 61 +++++++++++++++++++++++++++ pre-release/c101301093.lua | 86 ++++++++++++++++++++++++++++++++++++++ pre-release/c101301094.lua | 69 ++++++++++++++++++++++++++++++ pre-release/c101301095.lua | 82 ++++++++++++++++++++++++++++++++++++ pre-release/c101301096.lua | 69 ++++++++++++++++++++++++++++++ 7 files changed, 488 insertions(+) create mode 100644 pre-release/c101301090.lua create mode 100644 pre-release/c101301091.lua create mode 100644 pre-release/c101301092.lua create mode 100644 pre-release/c101301093.lua create mode 100644 pre-release/c101301094.lua create mode 100644 pre-release/c101301095.lua create mode 100644 pre-release/c101301096.lua diff --git a/pre-release/c101301090.lua b/pre-release/c101301090.lua new file mode 100644 index 0000000000..0fe6854615 --- /dev/null +++ b/pre-release/c101301090.lua @@ -0,0 +1,59 @@ +-- +--R.B. Ga10 Driller +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy both 1 monster your opponent controls and this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(500)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +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(nil,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil,tp)+e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) +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 tc:IsMonster() then + Duel.Destroy(Group.FromCards(tc,c),REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301091.lua b/pre-release/c101301091.lua new file mode 100644 index 0000000000..c20fdbf914 --- /dev/null +++ b/pre-release/c101301091.lua @@ -0,0 +1,62 @@ +-- +--R.B. Ga10 Cutter +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy this card, and if you do, negate a Spell/Trap Card or effect activated by your opponent, and if you do that, destroy that card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(700)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return rp==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) + and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return true end + local c=e:GetHandler() + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg+c,2,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 + and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301092.lua b/pre-release/c101301092.lua new file mode 100644 index 0000000000..750a65ebd1 --- /dev/null +++ b/pre-release/c101301092.lua @@ -0,0 +1,61 @@ +-- +--R.B. VALCan Rocket +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy up to 2 cards your opponent controls, also this card, and if you do, inflict 500 damage to your opponent for each card destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(1000)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil,tp)+e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + if c:IsRelateToEffect(e) then tg:AddCard(c) end + if #tg==0 then return end + local dam=Duel.Destroy(tg,REASON_EFFECT)*500 + if dam>0 then + Duel.Damage(1-tp,dam,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301093.lua b/pre-release/c101301093.lua new file mode 100644 index 0000000000..5af62abb67 --- /dev/null +++ b/pre-release/c101301093.lua @@ -0,0 +1,86 @@ +-- +--R.B. VALCan Booster +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 Machine monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2,2) + --Add 1 "R.B." Spell from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon 1 "R.B." monster from your hand or GY in Defense Position, then you can move this card you control to another of your Main Monster Zones + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_EMZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.thfilter(c) + return c:IsSetCard(SET_RB) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_RB) 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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 + and c:IsRelateToEffect(e) and c:IsControler(tp) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) + local seq=math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2) + Duel.BreakEffect() + Duel.MoveSequence(c,seq) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters with 1500 or less ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:IsAttackBelow(1500)) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) + local atk=c:GetTextAttack() + return not c:IsOriginalRace(RACE_MACHINE) or atk==-2 or atk>1500 + end) +end \ No newline at end of file diff --git a/pre-release/c101301094.lua b/pre-release/c101301094.lua new file mode 100644 index 0000000000..9b08ee05bf --- /dev/null +++ b/pre-release/c101301094.lua @@ -0,0 +1,69 @@ +--JP Name +--R.B. The Brute Blues +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ Machine monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2) + --Gains total original ATK of "R.B." monsters this card points to while it points to a "R.B." monster + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --Can make a second attack during each Battle Phase while it points to a "R.B." monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_EXTRA_ATTACK) + e2:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e2:SetValue(1) + c:RegisterEffect(e2) + --Cannot be destroyed by battle or card effects while it points to a "R.B." monster + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e3:SetValue(1) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e4) + --Add 1 "R.B." card from your Deck to your hand + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,0)) + e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1,id) + e5:SetTarget(s.thtg) + e5:SetOperation(s.thop) + c:RegisterEffect(e5) +end +s.listed_series={SET_RB} +function s.atkfilter(c) + return c:IsFaceup() and c:IsSetCard(SET_RB) and c:GetBaseAttack()>=0 +end +function s.atkval(e,c) + return c:GetLinkedGroup():Filter(s.atkfilter,nil):GetSum(Card.GetBaseAttack) +end +function s.thfilter(c) + return c:IsSetCard(SET_RB) 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/c101301095.lua b/pre-release/c101301095.lua new file mode 100644 index 0000000000..5e5856d319 --- /dev/null +++ b/pre-release/c101301095.lua @@ -0,0 +1,82 @@ +--JP Name +--R.B. Funk Dock +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "R.B." card from your Deck to your hand, except "R.B. Funk Dock" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Gain 500 LP each time a monster(s) your opponent controls is destroyed + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_FZONE) + e2:SetCondition(s.lpcon) + e2:SetOperation(function(e) Duel.Hint(HINT_CARD,0,id) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) end) + c:RegisterEffect(e2) + --Special Summon 1 "R.B." monster from your Deck if a face-up "R.B." monster(s) you control leaves the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_LEAVE_FIELD) + e3:SetRange(LOCATION_FZONE) + 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_RB} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_RB) and c:IsAbleToHand() and not c:IsCode(id) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.lpconfilter(c,tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.lpcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.lpconfilter,1,nil,1-tp) +end +function s.spconfilter(c,tp) + return c:IsPreviousSetCard(SET_RB) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101301096.lua b/pre-release/c101301096.lua new file mode 100644 index 0000000000..c8137974be --- /dev/null +++ b/pre-release/c101301096.lua @@ -0,0 +1,69 @@ +--JP Name +--R.B. Stage Landing +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "R.B." monster from your Deck/Extra Deck 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:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) + --If an "R.B." monster(s) you control would be destroyed, you can banish this card from your GY instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_GRAVE) + e2:SetTarget(s.reptg) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + e2:SetOperation(function(e) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcost(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 card, except Machine monsters with 1500 or less original ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spfilter(c,e,tp) + if not (c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil)) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,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:IsSetCard(SET_RB) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end + return Duel.SelectEffectYesNo(tp,c,96) +end \ No newline at end of file From 2b2dfc4dbcd5512415c19261669bd1b4b870b643 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 18 Jun 2025 21:06:52 +0300 Subject: [PATCH 105/128] "R.B. Funk Dock" fix Should only trigger if an "R.B." monster leaves the field by card effect specifically. --- pre-release/c101301095.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pre-release/c101301095.lua b/pre-release/c101301095.lua index 5e5856d319..69dde151b5 100644 --- a/pre-release/c101301095.lua +++ b/pre-release/c101301095.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCondition(s.lpcon) e2:SetOperation(function(e) Duel.Hint(HINT_CARD,0,id) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) end) c:RegisterEffect(e2) - --Special Summon 1 "R.B." monster from your Deck if a face-up "R.B." monster(s) you control leaves the field + --Special Summon 1 "R.B." monster from your Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -60,6 +60,7 @@ function s.lpcon(e,tp,eg,ep,ev,re,r,rp) end function s.spconfilter(c,tp) return c:IsPreviousSetCard(SET_RB) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) + and c:IsReason(REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spconfilter,1,nil,tp) @@ -79,4 +80,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 fa5c69b2d838aa37f536fd7383530526ad0465b2 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Wed, 18 Jun 2025 23:43:21 +0300 Subject: [PATCH 106/128] Ritual proc update Added handling to skip the selection process for the Ritual Monster if the effect is Ritual Summoning the card itself. --- proc_ritual.lua | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/proc_ritual.lua b/proc_ritual.lua index 040e9ea511..7bdfb7ac78 100644 --- a/proc_ritual.lua +++ b/proc_ritual.lua @@ -47,7 +47,7 @@ function Ritual.WholeLevelTributeValue(cond) end --Ritual Summon Ritual.CreateProc = aux.FunctionWithNamedArgs( -function(c,_type,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg) +function(c,_type,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg,self) --lv can be a function (like GetLevel/GetOriginalLevel), fixed level, if nil it defaults to GetLevel if filter and type(filter)=="function" then local mt=c.__index @@ -65,17 +65,17 @@ function(c,_type,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,force e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(Ritual.Target(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,specificmatfilter,requirementfunc,sumpos,extratg)) - e1:SetOperation(Ritual.Operation(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos)) + e1:SetTarget(Ritual.Target(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,specificmatfilter,requirementfunc,sumpos,extratg,self)) + e1:SetOperation(Ritual.Operation(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,self)) return e1 -end,"handler","lvtype","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg") +end,"handler","lvtype","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg","self") Ritual.AddProc = aux.FunctionWithNamedArgs( -function(c,_type,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg) - local e1=Ritual.CreateProc(c,_type,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg) +function(c,_type,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg,self) + local e1=Ritual.CreateProc(c,_type,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg,self) c:RegisterEffect(e1) return e1 -end,"handler","lvtype","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg") +end,"handler","lvtype","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg","self") local function WrapTableReturn(func) if func then @@ -127,7 +127,7 @@ local function GetDefaultSummonFromLocation() return Duel.IsDuelType(DUEL_EXTRA_DECK_RITUAL) and LOCATION_EXTRA or LOCATION_HAND end Ritual.Target = aux.FunctionWithNamedArgs( -function(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,specificmatfilter,requirementfunc,sumpos,extratg) +function(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,specificmatfilter,requirementfunc,sumpos,extratg,self) location = location or GetDefaultSummonFromLocation() sumpos = sumpos or POS_FACEUP return function(e,tp,eg,ep,ev,re,r,rp,chk) @@ -163,7 +163,7 @@ function(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselect if extratg then extratg(e,tp,eg,ep,ev,re,r,rp,chk) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,location) end -end,"filter","lvtype","lv","extrafil","extraop","matfilter","stage2","location","forcedselection","specificmatfilter","requirementfunc","sumpos","extratg") +end,"filter","lvtype","lv","extrafil","extraop","matfilter","stage2","location","forcedselection","specificmatfilter","requirementfunc","sumpos","extratg","self") function Auxiliary.RitualCheckAdditionalLevel(c,rc) local raw_level=c:GetRitualLevel(rc) @@ -220,10 +220,12 @@ function Ritual.Finishcon(sc,lv,forcedselection,requirementfunc,_type) end Ritual.Operation = aux.FunctionWithNamedArgs( -function(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos) +function(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,self) location = location or GetDefaultSummonFromLocation() sumpos = sumpos or POS_FACEUP return function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if self and not c:IsRelateToEffect(e) then return end local mg=Duel.GetRitualMaterial(tp,not requirementfunc) local mg2=extrafil and extrafil(e,tp,eg,ep,ev,re,r,rp) or Group.CreateGroup() --if an EFFECT_EXTRA_RITUAL_MATERIAL effect has a forcedselection of its own @@ -251,8 +253,13 @@ function(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselect end Ritual.CheckMatFilter(matfilter,e,tp,mg,mg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Ritual.Filter),tp,location,0,1,1,nil,filter,_type,e,tp,mg,mg2,func,specificmatfilter,lv,requirementfunc,sumpos) + local tg=Group.CreateGroup() + if not self then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Ritual.Filter),tp,location,0,1,1,nil,filter,_type,e,tp,mg,mg2,func,specificmatfilter,lv,requirementfunc,sumpos) + elseif Ritual.Filter(c,filter,_type,e,tp,mg,mg2,func,specificmatfilter,lv,requirementfunc,sumpos) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) then + tg:AddCard(c) + end if #tg>0 then local tc=tg:GetFirst() local lv=(lv and (type(lv)=="function" and lv(tc)) or lv) or tc:GetLevel() @@ -321,13 +328,13 @@ function(filter,_type,lv,extrafil,extraop,matfilter,stage2,location,forcedselect Ritual.SummoningLevel=nil end end -end,"filter","lvtype","lv","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos") +end,"filter","lvtype","lv","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","self") --Ritual Summon, geq fixed lv Ritual.AddProcGreater = aux.FunctionWithNamedArgs( -function(c,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg) - return Ritual.AddProc(c,RITPROC_GREATER,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg) -end,"handler","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg") +function(c,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg,self) + return Ritual.AddProc(c,RITPROC_GREATER,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg,self) +end,"handler","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg","self") function Ritual.AddProcCode(c,_type,lv,desc,...) if not c:IsStatus(STATUS_COPYING_EFFECT) and c.fit_monster==nil then @@ -343,9 +350,9 @@ end --Ritual Summon, equal to Ritual.AddProcEqual = aux.FunctionWithNamedArgs( -function(c,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg) - return Ritual.AddProc(c,RITPROC_EQUAL,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg) -end,"handler","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg") +function(c,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg,self) + return Ritual.AddProc(c,RITPROC_EQUAL,filter,lv,desc,extrafil,extraop,matfilter,stage2,location,forcedselection,customoperation,specificmatfilter,requirementfunc,sumpos,extratg,self) +end,"handler","filter","lv","desc","extrafil","extraop","matfilter","stage2","location","forcedselection","customoperation","specificmatfilter","requirementfunc","sumpos","extratg","self") function Ritual.AddProcEqualCode(c,lv,desc,...) return Ritual.AddProcCode(c,RITPROC_EQUAL,lv,desc,...) From 1513ff0822f981dd3e496576a535c9e1c0e4545d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 19 Jun 2025 00:22:31 +0300 Subject: [PATCH 107/128] Added new card scripts --- pre-release/c101301084.lua | 63 ++++++++++++++++++++++++++ pre-release/c101301085.lua | 93 ++++++++++++++++++++++++++++++++++++++ pre-release/c101301086.lua | 85 ++++++++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 pre-release/c101301084.lua create mode 100644 pre-release/c101301085.lua create mode 100644 pre-release/c101301086.lua diff --git a/pre-release/c101301084.lua b/pre-release/c101301084.lua new file mode 100644 index 0000000000..79ab4ce63c --- /dev/null +++ b/pre-release/c101301084.lua @@ -0,0 +1,63 @@ +-- +--Miracle Raven +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c) + c:AddMustBeRitualSummoned() + --Ritual Summon this card, by Tributing monsters from your hand or field whose total Levels equal or exceed 1 + local e1=Ritual.CreateProc({ + handler=c, + lvtype=RITPROC_GREATER, + filter=function(rc) return rc==c end, + lv=1, + location=LOCATION_PZONE, + desc=aux.Stringid(id,0), + self=true + }) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1) + c:RegisterEffect(e1) + --This Ritual Summoned card is unaffected by your opponent's activated effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e2:SetValue(function(e,te) return te:IsActivated() and te:GetOwnerPlayer()==1-e:GetHandlerPlayer() end) + c:RegisterEffect(e2) + --If you Ritual Summon exactly 1 Ritual Monster with a card effect that requires use of monsters, this card you control can be used as the entire Tribute + local e3=Ritual.AddWholeLevelTribute(c,aux.TRUE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetRange(LOCATION_MZONE) + --Add 1 Ritual Monster from your Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_RELEASE) + e4:SetCondition(function(e) return e:GetHandler():IsReason(REASON_RITUAL) end) + e4:SetTarget(s.thtg) + e4:SetOperation(s.thop) + c:RegisterEffect(e4) +end +s.listed_names={id} +function s.thfilter(c) + return c:IsRitualMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,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,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/c101301085.lua b/pre-release/c101301085.lua new file mode 100644 index 0000000000..ae89096a2d --- /dev/null +++ b/pre-release/c101301085.lua @@ -0,0 +1,93 @@ +-- +--ASHLAN U1000 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters with different Types and Attributes + Link.AddProcedure(c,nil,2,nil,s.spcheck) + --If a Ritual Monster this card points to attacks a Defense Position monster, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(function(e,c) return c:IsRitualMonster() and e:GetHandler():GetLinkedGroup():IsContains(c) end) + c:RegisterEffect(e1) + --Add 1 Ritual Monster with a different Type and Attribute than the revealed monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Return 1 face-up card your opponent controls to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.rthcon) + e3:SetTarget(s.rthtg) + e3:SetOperation(s.rthop) + c:RegisterEffect(e3) +end +function s.spcheck(g,lc,sumtype,tp) + return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) and g:CheckDifferentPropertyBinary(Card.GetAttribute,lc,sumtype,tp) +end +function s.thcostfilter(c,tp) + return c:IsRitualMonster() and not c:IsPublic() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace(),c:GetAttribute()) +end +function s.thfilter(c,race,attribute) + return c:IsRitualMonster() and c:IsDifferentRace(race) and c:IsAttributeExcept(attribute) and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + rc:CreateEffectRelation(e) +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 rc=e:GetLabelObject() + if not rc:IsRelateToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetRace(),rc:GetAttribute()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.rthconfilter(c,tp) + return c:IsRitualSummoned() and c:IsSummonPlayer(tp) +end +function s.rthcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.rthconfilter,1,nil,tp) +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc:IsAbleToHand() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.rthop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301086.lua b/pre-release/c101301086.lua new file mode 100644 index 0000000000..097e6665c9 --- /dev/null +++ b/pre-release/c101301086.lua @@ -0,0 +1,85 @@ +-- +--Readying of Rites +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SACIFICIAL_OFFERING=id+100 +function s.initial_effect(c) + --Add 1 Fiend Ritual Monster from your Deck to your hand, then if you added a Pendulum Monster, you can Special Summon 1 "Sacrificial Offering Token" (Fiend/DARK/Level 1/ATK 300/DEF 300) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.drcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_SACIFICIAL_OFFERING} +function s.thfilter(c) + return c:IsRace(RACE_FIEND) and c:IsRitualMonster() and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + if sc:IsType(TYPE_PENDULUM) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SACIFICIAL_OFFERING,0,TYPES_TOKEN,300,300,1,RACE_FIEND,ATTRIBUTE_DARK) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local token=Duel.CreateToken(tp,TOKEN_SACIFICIAL_OFFERING) + Duel.BreakEffect() + if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then + token:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + --While you control that Token, you cannot Special Summon from the Extra Deck + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e1,true) + end + end + end +end +function s.drconfilter(c,tp) + return c:IsRitualMonster() and c:IsControler(tp) +end +function s.drcon(e,tp,eg,ep,ev,re,r,rp) + return ep==1-tp and eg:IsExists(s.drconfilter,1,nil,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) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end \ No newline at end of file From 8d99b2839752acda505f700de18bf8ea7cc76be9 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 19 Jun 2025 10:28:39 +0800 Subject: [PATCH 108/128] fix "Miracle Raven" - its search effect should be hard once per turn - had mismatched parameter names in the target and operation, causing `chk` to be improperly checked --- pre-release/c101301084.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pre-release/c101301084.lua b/pre-release/c101301084.lua index 79ab4ce63c..1b800fb69c 100644 --- a/pre-release/c101301084.lua +++ b/pre-release/c101301084.lua @@ -40,6 +40,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_RELEASE) + e4:SetCountLimit(1,id) e4:SetCondition(function(e) return e:GetHandler():IsReason(REASON_RITUAL) end) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) @@ -49,15 +50,15 @@ s.listed_names={id} function s.thfilter(c) return c:IsRitualMonster() and c:IsAbleToHand() end -function s.thtg(e,tp,eg,ep,ev,r,rp,chk) +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,r,rp) +function s.spop(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 +end From 84a9c7a17c1cfcee6c0c73a576e318fa33529ac9 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Thu, 19 Jun 2025 11:17:13 +0800 Subject: [PATCH 109/128] fix "Miracle Raven" typo from previous commit --- pre-release/c101301084.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre-release/c101301084.lua b/pre-release/c101301084.lua index 1b800fb69c..82ec4b92a0 100644 --- a/pre-release/c101301084.lua +++ b/pre-release/c101301084.lua @@ -54,7 +54,7 @@ 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.spop(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 From 2a2a76e1544e65183f16730fcf2e32d1932f1a75 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:27:20 +0300 Subject: [PATCH 110/128] "Zefrasaber, Swordmaster of the Nekroz" fix Should exclude itself when considering what can be Tributed for the Ritual Summon, but only for the activation check. --- c84388461.lua | 33 +++++++++++++++++++++++++++++++++ c90887783.lua | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 c84388461.lua create mode 100644 c90887783.lua diff --git a/c84388461.lua b/c84388461.lua new file mode 100644 index 0000000000..a215f0476d --- /dev/null +++ b/c84388461.lua @@ -0,0 +1,33 @@ +--剣聖の影霊衣-セフィラセイバー +--Zefrasaber, Swordmaster of the Nekroz +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --You cannot Pendulum Summon monsters, except "Nekroz" and "Zefra" monsters, this effect cannot be negated + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e0:SetRange(LOCATION_PZONE) + e0:SetTargetRange(1,0) + e0:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_NEKROZ,SET_ZEFRA}) end) + c:RegisterEffect(e0) + local ritual_target_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) and ritual_c~=c end,forcedselection=s.forcedselection} + local ritual_operation_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) end} + --Tribute monsters from your hand or field, then Ritual Summon 1 "Nekroz" Ritual Monster from your hand whose Level exactly equals the total Levels of those monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfTribute) + e1:SetTarget(Ritual.Target(ritual_target_params)) + e1:SetOperation(Ritual.Operation(ritual_operation_params)) + c:RegisterEffect(e1) +end +s.listed_series={SET_NEKROZ,SET_ZEFRA} +function s.forcedselection(e,tp,g,sc) + local c=e:GetHandler() + return not g:IsContains(c),g:IsContains(c) +end \ No newline at end of file diff --git a/c90887783.lua b/c90887783.lua new file mode 100644 index 0000000000..f59d1ce786 --- /dev/null +++ b/c90887783.lua @@ -0,0 +1,41 @@ +--竜の交感 +--Draconnection +local s,id=GetID() +function s.initial_effect(c) + --Reveal 1 Dragon-Type monster in your hand, add 1 Dragon-Type monster with the same Level from your Deck to your hand, then shuffle the revealed monster into the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.revfilter(c,tp) + return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() and not c:IsPublic() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel()) +end +function s.thfilter(c,lv) + return c:IsRace(RACE_DRAGON) and c:IsLevel(lv) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.revfilter,tp,LOCATION_HAND,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() + if not rc then return end + Duel.ConfirmCards(1-tp,rc) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetLevel()):GetFirst() + if not sc then return end + Duel.BreakEffect() + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + Duel.BreakEffect() + Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file From 5ea96bb56a287dd5b9ffabc0824e0b00293cd516 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:38:28 +0300 Subject: [PATCH 111/128] Pushed to the wrong folder --- c84388461.lua | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 c84388461.lua diff --git a/c84388461.lua b/c84388461.lua deleted file mode 100644 index a215f0476d..0000000000 --- a/c84388461.lua +++ /dev/null @@ -1,33 +0,0 @@ ---剣聖の影霊衣-セフィラセイバー ---Zefrasaber, Swordmaster of the Nekroz -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --You cannot Pendulum Summon monsters, except "Nekroz" and "Zefra" monsters, this effect cannot be negated - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) - e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e0:SetRange(LOCATION_PZONE) - e0:SetTargetRange(1,0) - e0:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_NEKROZ,SET_ZEFRA}) end) - c:RegisterEffect(e0) - local ritual_target_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) and ritual_c~=c end,forcedselection=s.forcedselection} - local ritual_operation_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) end} - --Tribute monsters from your hand or field, then Ritual Summon 1 "Nekroz" Ritual Monster from your hand whose Level exactly equals the total Levels of those monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND|LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfTribute) - e1:SetTarget(Ritual.Target(ritual_target_params)) - e1:SetOperation(Ritual.Operation(ritual_operation_params)) - c:RegisterEffect(e1) -end -s.listed_series={SET_NEKROZ,SET_ZEFRA} -function s.forcedselection(e,tp,g,sc) - local c=e:GetHandler() - return not g:IsContains(c),g:IsContains(c) -end \ No newline at end of file From 861ac9cd8b23d06b452eff26d391a448a1a9a7f9 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:38:36 +0300 Subject: [PATCH 112/128] Pushed to the wrong folder --- c90887783.lua | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 c90887783.lua diff --git a/c90887783.lua b/c90887783.lua deleted file mode 100644 index f59d1ce786..0000000000 --- a/c90887783.lua +++ /dev/null @@ -1,41 +0,0 @@ ---竜の交感 ---Draconnection -local s,id=GetID() -function s.initial_effect(c) - --Reveal 1 Dragon-Type monster in your hand, add 1 Dragon-Type monster with the same Level from your Deck to your hand, then shuffle the revealed monster into the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.revfilter(c,tp) - return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() and not c:IsPublic() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel()) -end -function s.thfilter(c,lv) - return c:IsRace(RACE_DRAGON) and c:IsLevel(lv) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.revfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() - if not rc then return end - Duel.ConfirmCards(1-tp,rc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetLevel()):GetFirst() - if not sc then return end - Duel.BreakEffect() - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - Duel.BreakEffect() - Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file From c3d5504b27d7fb2c0f3519b19844c9257f0d5838 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:40:30 +0300 Subject: [PATCH 113/128] "Zefrasaber, Swordmaster of the Nekroz" fix Should exclude itself when considering what can be Tributed for the Ritual Summon, but only for the activation check. --- official/c84388461.lua | 38 +++++++++++++++++++++----------------- official/c90887783.lua | 34 +++++++++++++++++----------------- 2 files changed, 38 insertions(+), 34 deletions(-) diff --git a/official/c84388461.lua b/official/c84388461.lua index ce1b225208..a215f0476d 100644 --- a/official/c84388461.lua +++ b/official/c84388461.lua @@ -2,28 +2,32 @@ --Zefrasaber, Swordmaster of the Nekroz local s,id=GetID() function s.initial_effect(c) - --pendulum summon Pendulum.AddProcedure(c) - --Ritual Summon - local e1=Ritual.CreateProc(c,RITPROC_EQUAL,aux.FilterBoolFunction(Card.IsSetCard,SET_NEKROZ),nil,aux.Stringid(id,1)) + --You cannot Pendulum Summon monsters, except "Nekroz" and "Zefra" monsters, this effect cannot be negated + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e0:SetRange(LOCATION_PZONE) + e0:SetTargetRange(1,0) + e0:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_NEKROZ,SET_ZEFRA}) end) + c:RegisterEffect(e0) + local ritual_target_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) and ritual_c~=c end,forcedselection=s.forcedselection} + local ritual_operation_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) end} + --Tribute monsters from your hand or field, then Ritual Summon 1 "Nekroz" Ritual Monster from your hand whose Level exactly equals the total Levels of those monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE|LOCATION_HAND) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCost(Cost.SelfTribute) + e1:SetTarget(Ritual.Target(ritual_target_params)) + e1:SetOperation(Ritual.Operation(ritual_operation_params)) c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) - e2:SetTargetRange(1,0) - e2:SetTarget(s.splimit) - c:RegisterEffect(e2) end s.listed_series={SET_NEKROZ,SET_ZEFRA} -s.listed_names={21105106} -function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(SET_NEKROZ) or c:IsSetCard(SET_ZEFRA) then return false end - return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM +function s.forcedselection(e,tp,g,sc) + local c=e:GetHandler() + return not g:IsContains(c),g:IsContains(c) end \ No newline at end of file diff --git a/official/c90887783.lua b/official/c90887783.lua index 52b0384a4c..f59d1ce786 100644 --- a/official/c90887783.lua +++ b/official/c90887783.lua @@ -2,40 +2,40 @@ --Draconnection local s,id=GetID() function s.initial_effect(c) - --Activate + --Reveal 1 Dragon-Type monster in your hand, add 1 Dragon-Type monster with the same Level from your Deck to your hand, then shuffle the revealed monster into the Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.thfilter(c,lv) - return c:IsRace(RACE_DRAGON) and c:IsLevel(lv) and c:IsAbleToHand() -end function s.revfilter(c,tp) return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() and not c:IsPublic() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel()) end +function s.thfilter(c,lv) + return c:IsRace(RACE_DRAGON) and c:IsLevel(lv) and c:IsAbleToHand() +end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.revfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - if #g1==0 then return end - Duel.ConfirmCards(1-tp,g1) +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() + if not rc then return end + Duel.ConfirmCards(1-tp,rc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,g1:GetFirst():GetLevel()) - if #g2==0 then return end + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetLevel()):GetFirst() + if not sc then return end Duel.BreakEffect() - if Duel.SendtoHand(g2,nil,REASON_EFFECT)>0 and g2:GetFirst():IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,g2) + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) Duel.BreakEffect() - Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end \ No newline at end of file From 34753135fe77c9b2015078db1397a8c29f19673f Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 19 Jun 2025 11:29:53 -0300 Subject: [PATCH 114/128] Fusion procedure update Prevent effects that can use an extra group of materials (e.g. "Lubellion the Searing Dragon") and interact with the GY from bypassing "Necrovalley"'s effect --- proc_fusion_spell.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/proc_fusion_spell.lua b/proc_fusion_spell.lua index 4b28f53443..95804eb291 100644 --- a/proc_fusion_spell.lua +++ b/proc_fusion_spell.lua @@ -330,6 +330,9 @@ function (fusfilter,matfilter,extrafil,extraop,gc2,stage2,exactcount,value,locat local efmg=fmg_all:Filter(GetExtraMatEff,nil) local extragroup=nil local repl_flag=false + local function filter_material_immunity_and_necrovalley(card,fvalue,feffect) + return card:IsCanBeFusionMaterial(nil,fvalue) and not card:IsImmuneToEffect(feffect) and aux.nvfilter(card) + end if #efmg>0 then local extra_feff=GetExtraMatEff(efmg:GetFirst()) if extra_feff and extra_feff:GetLabelObject() then @@ -344,7 +347,7 @@ function (fusfilter,matfilter,extrafil,extraop,gc2,stage2,exactcount,value,locat ret[1]:Match(repl_function[2],nil,e,tp) efmg:Match(repl_function[2],nil,e,tp) end - Fusion.ExtraGroup=ret[1]:Filter(Card.IsCanBeFusionMaterial,nil,nil,value):Match(aux.NOT(Card.IsImmuneToEffect),nil,e) + Fusion.ExtraGroup=ret[1]:Filter(filter_material_immunity_and_necrovalley,nil,value,e) mg1:Merge(ret[1]) end checkAddition=ret[2] @@ -355,7 +358,7 @@ function (fusfilter,matfilter,extrafil,extraop,gc2,stage2,exactcount,value,locat if ret[1] then repl[1]:Match(matfilter,nil,e,tp,1) ret[1]:Merge(repl[1]) - Fusion.ExtraGroup=ret[1]:Filter(Card.IsCanBeFusionMaterial,nil,nil,value):Match(aux.NOT(Card.IsImmuneToEffect),nil,e) + Fusion.ExtraGroup=ret[1]:Filter(filter_material_immunity_and_necrovalley,nil,value,e) mg1:Merge(ret[1]) end if ret[2] then @@ -370,13 +373,13 @@ function (fusfilter,matfilter,extrafil,extraop,gc2,stage2,exactcount,value,locat if not repl_flag and extrafil then local ret = {extrafil(e,tp,mg1)} if ret[1] then - Fusion.ExtraGroup=ret[1]:Filter(Card.IsCanBeFusionMaterial,nil,nil,value):Match(aux.NOT(Card.IsImmuneToEffect),nil,e) + Fusion.ExtraGroup=ret[1]:Filter(filter_material_immunity_and_necrovalley,nil,value,e) extragroup=ret[1] mg1:Merge(ret[1]) end checkAddition=ret[2] end - mg1:Match(Card.IsCanBeFusionMaterial,nil,nil,value):Match(aux.NOT(Card.IsImmuneToEffect),nil,e) + mg1:Match(filter_material_immunity_and_necrovalley,nil,value,e) if gc and (not mg1:Includes(gc) or gc:IsExists(Fusion.ForcedMatValidity,1,nil,e)) then Fusion.ExtraGroup=nil return false From 27603594abcf5da86bf731a0630fe410adbcd6b6 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Fri, 20 Jun 2025 15:40:40 +0800 Subject: [PATCH 115/128] update "Megalith Phuloch" - use unused function (s.ritop) - formatting --- pre-release/c101302033.lua | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pre-release/c101302033.lua b/pre-release/c101302033.lua index 694901f681..36a5722bba 100644 --- a/pre-release/c101302033.lua +++ b/pre-release/c101302033.lua @@ -17,12 +17,12 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) local ritual_params={ - handler=c, - filter=function(c) return c:IsSetCard(SET_MEGALITH) and not c:IsCode(id) end, - lvtype=RITPROC_GREATER, - location=LOCATION_GRAVE, - forcedselection=function(e,tp,g,sc) return g:IsContains(e:GetHandler()) end - } + handler=c, + filter=function(c) return c:IsSetCard(SET_MEGALITH) and not c:IsCode(id) end, + lvtype=RITPROC_GREATER, + location=LOCATION_GRAVE, + forcedselection=function(e,tp,g,sc) return g:IsContains(e:GetHandler()) end + } --Ritual Summon 1 "Megalith" Ritual Monster from your GY, by Tributing monsters from your hand or field, including this card on your field, whose total Levels equal or exceed the Level of the Ritual Monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -35,12 +35,7 @@ function s.initial_effect(c) e2:SetCondition(function() return Duel.IsMainPhase() end) e2:SetCost(Cost.HardOncePerChain(id)) e2:SetTarget(Ritual.Target(ritual_params)) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) then - Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) - end - end) + e2:SetOperation(s.ritop(Ritual.Operation(ritual_params))) c:RegisterEffect(e2) end s.listed_series={SET_MEGALITH} @@ -67,4 +62,4 @@ function s.ritop(default_operation) default_operation(e,tp,eg,ep,ev,re,r,rp) end end -end \ No newline at end of file +end From 5349fbf94bdaa52c59a098305d646dcd3419c85c Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 20 Jun 2025 13:16:05 +0300 Subject: [PATCH 116/128] Added new card scripts --- pre-release/c101301081.lua | 78 ++++++++++++++++++++++++++++++ pre-release/c101301082.lua | 86 +++++++++++++++++++++++++++++++++ pre-release/c101301083.lua | 48 +++++++++++++++++++ pre-release/c101301087.lua | 98 ++++++++++++++++++++++++++++++++++++++ pre-release/c101301088.lua | 81 +++++++++++++++++++++++++++++++ pre-release/c101301089.lua | 72 ++++++++++++++++++++++++++++ 6 files changed, 463 insertions(+) create mode 100644 pre-release/c101301081.lua create mode 100644 pre-release/c101301082.lua create mode 100644 pre-release/c101301083.lua create mode 100644 pre-release/c101301087.lua create mode 100644 pre-release/c101301088.lua create mode 100644 pre-release/c101301089.lua diff --git a/pre-release/c101301081.lua b/pre-release/c101301081.lua new file mode 100644 index 0000000000..cf76d0be32 --- /dev/null +++ b/pre-release/c101301081.lua @@ -0,0 +1,78 @@ +--Japanese name +--Buio the Dawn's Light +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Monsters in your leftmost or rightmost Main Monster Zones cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Negate the effects of 1 Fiend Effect Monster you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Mutiny in the Sky" from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={101301083} --"Mutiny in the Sky" +function s.disfilter(c) + return c:IsRace(RACE_FIEND) and c:IsType(TYPE_EFFECT) and c:IsNegatableMonster() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then + --Negate its effects + tc:NegateEffects(c) + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.thfilter(c) + return c:IsCode(101301083) 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/c101301082.lua b/pre-release/c101301082.lua new file mode 100644 index 0000000000..eaab6fd385 --- /dev/null +++ b/pre-release/c101301082.lua @@ -0,0 +1,86 @@ +--Japanese name +--Luce the Dusk's Dark +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Fiend and/or Fairy monsters in your GY + Fusion.AddProcMixN(c,true,true,s.fusionmatfilter,3) + --Monsters in your leftmost or rightmost Main Monster Zones cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Send 1 Fiend or Fairy monster from your Deck to the GY, and if you do, destroy 1 card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.tgdestg) + e2:SetOperation(s.tgdesop) + c:RegisterEffect(e2) + --Destroy 1 card on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.descon) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +function s.fusionmatfilter(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND|RACE_FAIRY,fc,sumtype,tp) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) +end +function s.tgfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToGrave() +end +function s.tgdestg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.tgdesop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT) and g:GetFirst():IsLocation(LOCATION_GRAVE) then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + end +end +function s.desconfilter(c,tp) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.desconfilter,1,nil,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() end + if chk==0 then return 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,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/c101301083.lua b/pre-release/c101301083.lua new file mode 100644 index 0000000000..b17574ac88 --- /dev/null +++ b/pre-release/c101301083.lua @@ -0,0 +1,48 @@ +--Japanese name +--Mutiny in the Sky +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fiend or Fairy Fusion Monster from your Extra Deck, by shuffling Fiend and/or Fairy monsters from your GY into the Deck + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND|RACE_FAIRY),aux.FALSE,s.fextra,Fusion.ShuffleMaterial) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCountLimit(1,id) + c:RegisterEffect(e1) + --Add this card to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +function s.matfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToDeck() +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil) +end +function s.thcostfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301087.lua b/pre-release/c101301087.lua new file mode 100644 index 0000000000..30ed6052bb --- /dev/null +++ b/pre-release/c101301087.lua @@ -0,0 +1,98 @@ +-- +--Steel-Stringed Sacrifice +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +function s.effcostfilter(c) + return c:IsLevelAbove(5) and not c:IsPublic() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + e:SetLabel(rc:GetOriginalCodeRule()) + rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) +end +function s.thfilter(c) + return c:IsLevelAbove(5) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local b1=c:IsLocation(LOCATION_HAND) and not Duel.HasFlagEffect(tp,id) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + local b2=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+100) and c:IsAbleToHand() + local b3=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+200) + and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}, + {b3,aux.Stringid(id,4)}) + Duel.SetTargetParam(op) + Duel.RegisterFlagEffect(tp,id+(op-1)*100,RESET_PHASE|PHASE_END,0,1) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_TOHAND) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) + elseif op==3 then + e:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local code=e:GetLabel() + local rc=e:GetLabelObject() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,5)) + --Register if the player Normal Summons the revealed monster or a monster with the same original name + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp,eg,ep) return ep==tp and ((rc:HasFlagEffect(id) and eg:IsContains(rc) and rc:IsFaceup()) or eg:IsExists(aux.FaceupFilter(Card.IsOriginalCodeRule,code),1,nil)) end) + e1:SetOperation(function(e) e:SetLabel(1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --During the End Phase of this turn, lose 1000 LP if you did not Normal Summon the revealed monster, or a monster with the same original name + local e2=e1:Clone() + e2:SetDescription(aux.Stringid(id,6)) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetCondition(function() return e1:GetLabel()==0 end) + e2:SetOperation(function(e,tp) Duel.SetLP(tp,Duel.GetLP(tp)-1000) end) + Duel.RegisterEffect(e2,tp) + if not c:IsRelateToEffect(e) then return end + local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if op==1 then + --Special Summon this card from your hand + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + elseif op==2 then + --Add this card from your GY to your hand + Duel.SendtoHand(c,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,c) + elseif op==3 then + --Banish this card from your GY, and if you do, add 1 Level 5 or higher monster from your GY to your hand + if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_REMOVED) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101301088.lua b/pre-release/c101301088.lua new file mode 100644 index 0000000000..f66e6fb0ce --- /dev/null +++ b/pre-release/c101301088.lua @@ -0,0 +1,81 @@ +--Japanese name +--Xyz Lay +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + local e0=aux.AddEquipProcedure(c) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + --The equipped monster gains 200 ATK for each Xyz Material attached to a monster on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(function(e) return 200*Duel.GetOverlayCount(0,1,1) end) + c:RegisterEffect(e1) + --Activate the following effect, based on the equipped monster's card type + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) + e2:SetCost(s.effcost) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_XYZ} +function s.thcfilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsDiscardable() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local ec=e:GetHandler():GetEquipTarget() + if chk==0 then return not ec:IsType(TYPE_XYZ) or Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_COST) end + if ec:IsType(TYPE_XYZ) then + Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_XYZ) and c:IsSpellTrap() and c:IsSSetable() +end +function s.spfilter(c,e,tp,lv) + return c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local ec=e:GetHandler():GetEquipTarget() + local b1=ec:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + local b2=not ec:IsType(TYPE_XYZ) and ec:HasLevel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,ec:GetLevel()) + if chk==0 then return b1 or b2 end + if b1 then + e:SetLabel(1) + e:SetCategory(0) + Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) + elseif b2 then + e:SetLabel(2) + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Set 1 "Xyz" Spell/Trap from your Deck + 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 + elseif op==2 then + --Special Summon 1 monster with the same Level as the equipped monster from your hand in Defense Position + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,c:GetEquipTarget():GetLevel()):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Negate its effects + sc:NegateEffects(c) + end + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/pre-release/c101301089.lua b/pre-release/c101301089.lua new file mode 100644 index 0000000000..2175ab4fba --- /dev/null +++ b/pre-release/c101301089.lua @@ -0,0 +1,72 @@ +-- +--Psychic Omnibuster +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Psychic monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) + --Look at 1 random card in your opponent's hand, and if it is the declared card type, apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&(LOCATION_MZONE|LOCATION_SZONE)>0 end) + e1:SetCost(Cost.PayLP(2000)) + e1:SetTarget(s.looktg) + e1:SetOperation(s.lookop) + c:RegisterEffect(e1) + aux.GlobalCheck(s,function() + s.declared_types={} + s.declared_types[0]=0 + s.declared_types[1]=0 + aux.AddValuesReset(function() + s.declared_types[0]=0 + s.declared_types[1]=0 + end) + end) +end +function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) + local declared_types=s.declared_types[tp] + if chk==0 then return declared_types~=(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) + local op=Duel.SelectEffect(tp, + {declared_types&TYPE_MONSTER==0,DECLTYPE_MONSTER}, + {declared_types&TYPE_SPELL==0,DECLTYPE_SPELL}, + {declared_types&TYPE_TRAP==0,DECLTYPE_TRAP}) + local typ=1<<(op-1) + s.declared_types[tp]=declared_types|typ + Duel.SetTargetParam(typ) +end +function s.lookop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end + local rc=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1):GetFirst() + Duel.ConfirmCards(tp,rc) + Duel.ShuffleHand(1-tp) + local typ=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if not rc:IsType(typ) then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local desc=(typ==TYPE_MONSTER and 3010) + or (typ==TYPE_SPELL and 3011) + or (typ==TYPE_TRAP and 3012) + Duel.BreakEffect() + --This card cannot be destroyed by the effects of the declared card type this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(desc) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetValue(function(e,te) return te:IsActiveType(typ) end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end + if rc:IsAbleToRemove() then + Duel.BreakEffect() + --Banish the card you looked at, face-up, until the End Phase + aux.RemoveUntil(rc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end) + end +end \ No newline at end of file From 8081ae32c76d4222971bd84818e225e874ef9dd2 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Fri, 20 Jun 2025 13:01:23 +0200 Subject: [PATCH 117/128] added Police Hound of the Blaze Fiends --- rush/c160215035.lua | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 rush/c160215035.lua diff --git a/rush/c160215035.lua b/rush/c160215035.lua new file mode 100644 index 0000000000..05fbea4fcf --- /dev/null +++ b/rush/c160215035.lua @@ -0,0 +1,48 @@ +--焔魔の劾狗 +--Police Hound of the Blaze Fiends +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Send the top 4 cards from your Deck to the GY and add 1 card from the GY to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.tgfilter(c) + return c:IsMonster() and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,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,4) end + Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.cfilter(c) + return c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsAttack(900) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoGrave(tg,REASON_COST)==0 then return end + --Effect + Duel.DiscardDeck(tp,4,REASON_EFFECT) + local g=Duel.GetOperatedGroup() + if g:FilterCount(aux.NecroValleyFilter(s.cfilter),nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:FilterSelect(tp,s.cfilter,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 5926aafc15792286b8a4e26b9981f099a957f859 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Sat, 21 Jun 2025 13:25:41 +0200 Subject: [PATCH 118/128] added Grace Princess Hina --- rush/c160215020.lua | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 rush/c160215020.lua diff --git a/rush/c160215020.lua b/rush/c160215020.lua new file mode 100644 index 0000000000..c684b753b5 --- /dev/null +++ b/rush/c160215020.lua @@ -0,0 +1,48 @@ +--いとをかしひなひめ +--Grace Princess Hina +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Special Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +s.listed_names={160004013} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND,0,1,nil) end +end +function s.filter(c,e,sp) + return ((c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) and c:IsLevel(7)) or c:IsCode(160004013)) and c:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEUP_DEFENSE) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:IsRitualSpell() and c:IsSSetable() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + --Requirement + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local td=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND,0,1,1,nil) + if Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_COST)<1 then return end + --Effect + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 and g:GetFirst():IsCode(160004013) + and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=g2:Select(tp,1,1,nil) + Duel.SSet(tp,sg) + end +end \ No newline at end of file From 6c346ff046992857569725735d10c71321be48e0 Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Sun, 22 Jun 2025 13:11:40 +0200 Subject: [PATCH 119/128] added Zera's Research --- rush/c160215011.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 rush/c160215011.lua diff --git a/rush/c160215011.lua b/rush/c160215011.lua new file mode 100644 index 0000000000..79986b5efd --- /dev/null +++ b/rush/c160215011.lua @@ -0,0 +1,36 @@ +--ゼラの探索 +--Zera's Research +--scripted by YoshiDuels +local s,id=GetID() +function s.initial_effect(c) + --Send the top 2 cards of your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DECKDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={81756897} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end + Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) +end +function s.thfilter(c) + return (c:IsCode(81756897) or (c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK|ATTRIBUTE_EARTH) and c:IsType(TYPE_NORMAL) and c:IsAttack(1600))) and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + --Effect + if Duel.DiscardDeck(tp,2,REASON_EFFECT)<1 then return end + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + local g2=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g2>0 then + Duel.SendtoHand(g2,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g2) + end + end +end \ No newline at end of file From 528ce8f027ff7677c1df9191f7374297b08638a5 Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 22 Jun 2025 13:00:45 -0300 Subject: [PATCH 120/128] "Cat Shark" update - Fixed the string used as description when the player has to target a monster - general script modernization --- official/c84224627.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/official/c84224627.lua b/official/c84224627.lua index 518f70c56c..d8dd9fa5cd 100644 --- a/official/c84224627.lua +++ b/official/c84224627.lua @@ -2,22 +2,24 @@ --Cat Shark local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,2,2) c:EnableReviveLimit() - --battle indestructable + --Xyz Summon procedure: 2 Level 2 monsters + Xyz.AddProcedure(c,nil,2,2) + --Cannot be destroyed by battle while it has a material attached that was originally WATER local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCondition(s.indcon) e1:SetValue(1) c:RegisterEffect(e1) - --double + --Double the ATK/DEF of 1 Rank 4 or lower Xyz Monster you control local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) e2:SetCondition(aux.StatChangeDamageStepCondition) @@ -35,8 +37,10 @@ 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) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,tc:GetBaseAttack()*2) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,tc,1,tp,tc:GetBaseDefense()*2) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() From 5cd9ca940e8f840a6f65173d45484ee8b32ea307 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 23 Jun 2025 00:03:13 +0300 Subject: [PATCH 121/128] Various script fixes - Crusadia Vanguard: Should be negatable by an effect such as that of "Ghost Belle & Haunted Mansion" if you activate it by Tributing a monster. - Cubic Rebirth: Should be treated as an effect that includes Special Summoning from the hand, Deck, and GY. - Goddess Verdande's Guidance: Its second effect should be negatable by an effect such as that of "Ash Blossom & Joyous Spring". - Luminous Dragon Ritual: Banishing and Special Summoning should be treated as happening at the same time. Should still banish even if there's no "Paladin of Photon Dragon" in your hand on resolution. - Rebirth of the Seventh Emperors: The damaging effect should be applied even if the target isn't there anymore on resolution. - Reincarnation of the Seventh Emperors: Should be treated as an effect that includes Special Summoning and inflict damage. --- official/c34834619.lua | 47 ++++++++-------- official/c55312487.lua | 85 ++++++++++++---------------- official/c57499304.lua | 49 ++++++++-------- official/c62200831.lua | 89 +++++++++++++++-------------- official/c64961254.lua | 34 +++++++----- official/c65124425.lua | 15 +++-- official/c71442223.lua | 123 +++++++++++++++++++---------------------- official/c83888009.lua | 27 ++++----- official/c89208725.lua | 36 ++++++------ 9 files changed, 246 insertions(+), 259 deletions(-) diff --git a/official/c34834619.lua b/official/c34834619.lua index 5cb22665e8..292dff06f9 100644 --- a/official/c34834619.lua +++ b/official/c34834619.lua @@ -2,11 +2,12 @@ --Luminous Dragon Ritual local s,id=GetID() function s.initial_effect(c) + --Ritual Summon 1 "Paladin of Photon Dragon" from your hand Ritual.AddProcEqualCode(c,4,nil,85346853) - --Special summon and treat it as a Ritual summon + --Banish monsters from your GY whose total Levels equal exactly 4, then Special Summon 1 "Paladin of Photon Dragon" from your hand (this is treated as a Ritual Summon) local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCost(Cost.SelfBanish) @@ -14,36 +15,34 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_names={85346853} -function s.mtfilter(c,e) +s.listed_names={85346853} --"Paladin of Photon Dragon" +function s.rmfilter(c,e,tp) return c:HasLevel() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) and aux.SpElimFilter(c,true) end -function s.spfilter(c,e,tp,m) +function s.rescon(sg,e,tp,mg) + return Duel.GetMZoneCount(tp,sg)>0 and sg:GetSum(Card.GetLevel)==4 +end +function s.spfilter(c,e,tp) return c:IsCode(85346853) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) - and m:CheckWithSumEqual(Card.GetRitualLevel,4,1,99,c) 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 false end - local mg=Duel.GetMatchingGroup(s.mtfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler(),e) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) + local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,e,tp) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,4,s.rescon,0) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local mg=Duel.GetMatchingGroup(s.mtfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) - local tc=g:GetFirst() - if tc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,4,1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP) - tc:CompleteProcedure() + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,e,tp) + if #g==0 then return end + local rg=aux.SelectUnselectGroup(g,e,tp,1,4,s.rescon,1,tp,HINTMSG_REMOVE) + if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 and rg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end end end \ No newline at end of file diff --git a/official/c55312487.lua b/official/c55312487.lua index 5ebd53edf8..7b4d6feb8d 100644 --- a/official/c55312487.lua +++ b/official/c55312487.lua @@ -2,79 +2,62 @@ --Crusadia Vanguard local s,id=GetID() function s.initial_effect(c) - --activate + --When you activate this card: You can also Tribute 1 "Crusadia" or "World Legacy" monster; if you did, Special Summon 1 "Crusadia" or "World Legacy" monster, with a different original name, from your Deck or GY 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_END_PHASE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) e1:SetTarget(s.target) + e1:SetOperation(s.activate) c:RegisterEffect(e1) - --cannot select, except link thing + --While you control a "Crusadia" Link Monster, your opponent's monsters can only target Link Monsters for attacks local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetCondition(s.catcondition) - e2:SetValue(s.catlimit) + e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(SET_CRUSADIA) and c:IsLinkMonster() end,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) + e2:SetValue(function(e,c) return not c:IsLinkMonster() end) c:RegisterEffect(e2) end s.listed_series={SET_CRUSADIA,SET_WORLD_LEGACY} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.spcostfilter(c,e,tp) + return c:IsSetCard({SET_CRUSADIA,SET_WORLD_LEGACY}) and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalCodeRule()) +end +function s.spfilter(c,e,tp,code) + return c:IsSetCard({SET_CRUSADIA,SET_WORLD_LEGACY}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not c:IsOriginalCodeRule(code) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - if s.spcost(e,tp,eg,ep,ev,re,r,rp,0) and s.sptarget(e,tp,eg,ep,ev,re,r,rp,0) - and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - s.spcost(e,tp,eg,ep,ev,re,r,rp,1) - s.sptarget(e,tp,eg,ep,ev,re,r,rp,1) - e:SetOperation(s.spoperation) + if Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst() + e:SetLabel(sc:GetOriginalCodeRule()) + Duel.Release(sc,REASON_COST) else - e:SetCategory(0) - e:SetOperation(nil) + e:SetLabel(-1) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end -end -function s.costfilter(c,e,tp) - return c:IsMonster() and (c:IsSetCard(SET_CRUSADIA) or c:IsSetCard(SET_WORLD_LEGACY)) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,tc) - return c:IsMonster() and (c:IsSetCard(SET_CRUSADIA) or c:IsSetCard(SET_WORLD_LEGACY)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsOriginalCode(tc:GetOriginalCode()) -end -function s.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,e,tp) + if e:GetLabel()>0 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + else + e:SetCategory(0) end - e:SetLabel(0) - local g=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,e,tp) - Duel.Release(g,REASON_COST) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end -function s.spoperation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local label=e:GetLabel() + if label==-1 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,tc) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,label) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end -function s.catfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_CRUSADIA) and c:IsLinkMonster() -end -function s.catcondition(e) - return Duel.IsExistingMatchingCard(s.catfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function s.catlimit(e,c) - return not c:IsLinkMonster() end \ No newline at end of file diff --git a/official/c57499304.lua b/official/c57499304.lua index 0b1a239e37..e3150e7a47 100644 --- a/official/c57499304.lua +++ b/official/c57499304.lua @@ -5,59 +5,58 @@ local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCondition(s.condition) e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.listed_series={SET_NUMBER} -function s.cfilter(c) +function s.confilter(c) if not c:IsType(TYPE_XYZ) then return false end local no=c.xyz_number return (c:IsSetCard(SET_NUMBER) and no and no>=101 and no<=107) - or c:GetOverlayGroup():IsExists(s.cfilter,1,nil) + or c:GetOverlayGroup():IsExists(s.confilter,1,nil) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetBattleMonster(tp) - return tc and s.cfilter(tc) + local bc=Duel.GetBattleMonster(tp) + return bc and s.confilter(bc) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetBattleMonster(tp) - local g=tc:GetOverlayGroup() - if chk==0 then return tc:IsAbleToRemove() and (#g==0 or #g==g:FilterCount(Card.IsAbleToRemove,nil)) end - Duel.SetTargetCard(tc) - g:AddCard(tc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) + local bc=Duel.GetBattleMonster(tp) + local g=bc:GetOverlayGroup() + if chk==0 then return bc:IsAbleToRemove() and (#g==0 or #g==g:FilterCount(Card.IsAbleToRemove,nil)) end + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g+bc,#g,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsControler(tp) then - local g=tc:GetOverlayGroup() - g:AddCard(tc) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + if bc:IsRelateToEffect(e) and bc:IsControler(tp) then + Duel.Remove(bc+bc:GetOverlayGroup(),POS_FACEUP,REASON_EFFECT) end if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --Special Summon 1 Rank 3 or lower Xyz during the End Phase + --During the End Phase of the turn you activated this card, Special Summon 1 Rank 3 or lower Xyz Monser from your Extra Deck, and if you do, inflict damage to your opponent equal to its original ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetOperation(s.op) + e1:SetOperation(s.spop) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.spfilter(c,e,tp) - return c:IsRankBelow(3) and not c:IsSetCard(SET_NUMBER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsRankBelow(3) and c:IsType(TYPE_XYZ) and not c:IsSetCard(SET_NUMBER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end -function s.op(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + Duel.Damage(1-tp,sc:GetBaseAttack(),REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c62200831.lua b/official/c62200831.lua index ca84d5b288..52d79a791c 100644 --- a/official/c62200831.lua +++ b/official/c62200831.lua @@ -8,22 +8,22 @@ function s.initial_effect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - --Place "Gunkan" card on top of deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetRange(LOCATION_FZONE) - e1:SetCondition(s.dtcon) - e1:SetTarget(s.dttg) - e1:SetOperation(s.dtop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Opponent pays LP, Special Summon "Gunkan" Xyz + --Place 1 "Gunkan" card from your Deck on top of your Deck + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetRange(LOCATION_FZONE) + e1a:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) + e1a:SetCondition(s.decktopcon) + e1a:SetTarget(s.decktoptg) + e1a:SetOperation(s.decktopop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Your opponent pays LP exactly equal to that monster's DEF in the GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -32,47 +32,55 @@ function s.initial_effect(c) e3:SetRange(LOCATION_FZONE) e3:SetCountLimit(1) e3:SetCondition(s.xyzcon) + e3:SetTarget(s.xyztg) e3:SetOperation(s.xyzop) c:RegisterEffect(e3) end s.listed_series={SET_GUNKAN} s.listed_names={CARD_SUSHIP_SHARI} -function s.cfilter(c,tp) - return c:IsMonster() and c:IsSetCard(SET_GUNKAN) and c:IsSummonPlayer(tp) +function s.decktopconfilter(c,tp) + return c:IsSetCard(SET_GUNKAN) and c:IsSummonPlayer(tp) and c:IsFaceup() end -function s.dtcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) +function s.decktopcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.decktopconfilter,1,nil,tp) end -function s.dttg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.decktoptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,SET_GUNKAN) end end -function s.dtop(e,tp,eg,ep,ev,re,r,rp) +function s.decktopop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local tc=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,SET_GUNKAN):GetFirst() - if tc then + local sc=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,SET_GUNKAN):GetFirst() + if sc then Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) + Duel.MoveSequence(sc,0) Duel.ConfirmDecktop(tp,1) end end -function s.filter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:GetReasonPlayer()==1-tp and c:IsSetCard(SET_GUNKAN) and c:IsSummonLocation(LOCATION_EXTRA) +function s.xyzconfilter(c,tp) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsReasonPlayer(1-tp) + and c:IsSetCard(SET_GUNKAN) and c:IsPreviousSetCard(SET_GUNKAN) and c:IsSummonLocation(LOCATION_EXTRA) end function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.filter,1,nil,tp) + return eg:IsExists(s.xyzconfilter,1,nil,tp) +end +function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=eg:Filter(s.xyzconfilter,nil,tp) + Duel.SetTargetCard(g) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_EXTRA) end function s.spfilter(c,e,tp) return c:IsCode(CARD_SUSHIP_SHARI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.xyzfilter(c,e,tp) - return c:IsSetCard(SET_GUNKAN) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) + return c:IsSetCard(SET_GUNKAN) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c) end function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetTargetCards(e) + if #g==0 then return end local def=0 - local g=eg:Filter(s.filter,nil,tp) for tc in g:Iter() do if tc:GetPreviousDefenseOnField()<0 then def=0 end def=def+tc:GetPreviousDefenseOnField() @@ -83,19 +91,18 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local hc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if Duel.SpecialSummon(hc,0,tp,tp,false,false,POS_FACEUP)>0 then + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + Duel.BreakEffect() + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyzg=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - local sc=xyzg:GetFirst() - if sc then + local xyzc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if xyzc then Duel.BreakEffect() - sc:SetMaterial(hc) - Duel.Overlay(sc,hc) - if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,true,false,POS_FACEUP)>0 then - sc:CompleteProcedure() + xyzc:SetMaterial(sg) + Duel.Overlay(xyzc,sg) + if Duel.SpecialSummon(xyzc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + xyzc:CompleteProcedure() end end end diff --git a/official/c64961254.lua b/official/c64961254.lua index 77c84b8666..bbb65b2060 100644 --- a/official/c64961254.lua +++ b/official/c64961254.lua @@ -3,68 +3,72 @@ --Scripted by Eerie Code and AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Activate + --When this card is activated: If all monsters you control are "Valkyrie" monsters (min. 1), you can add 1 "Goddess Urd's Verdict" from your Deck to your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) --Reveal the top card of your opponent's Deck and if it was the declared type, they Set it to their field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetTarget(s.target) - e2:SetOperation(s.operation) + e2:SetTarget(s.revealtg) + e2:SetOperation(s.revealop) c:RegisterEffect(e2) end s.listed_series={SET_VALKYRIE} s.listed_names={91969909} --"Goddess Urd's Verdict" -function s.thcfilter(c) - return c:IsFacedown() or not c:IsSetCard(SET_VALKYRIE) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - and not Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE,0,1,nil) +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) return c:IsCode(91969909) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and s.thcon(e,tp,eg,ep,ev,re,r,rp) and - Duel.SelectYesNo(tp,aux.Stringid(id,0)) then + if #g>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_VALKYRIE)),tp,LOCATION_MZONE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.revealtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.SetTargetParam(Duel.SelectOption(tp,DECLTYPE_MONSTER,DECLTYPE_SPELL,DECLTYPE_TRAP)) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.revealop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(1-tp,0,LOCATION_DECK)<=0 then return end Duel.DisableShuffleCheck() Duel.ConfirmDecktop(1-tp,1) - local g=Duel.GetDecktopGroup(1-tp,1) - local tc=g:GetFirst() + local tc=Duel.GetDecktopGroup(1-tp,1):GetFirst() if not tc then return end local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) if (opt==0 and tc:IsMonster() and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)) then Duel.SpecialSummon(tc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENSE) + Duel.ConfirmCards(tp,tc) elseif ((opt==1 and tc:IsSpell()) or (opt==2 and tc:IsTrap())) and tc:IsSSetable(false,1-tp) then Duel.DisableShuffleCheck() Duel.SSet(1-tp,tc) else Duel.SendtoHand(tc,1-tp,REASON_EFFECT) + Duel.ConfirmCards(tp,tc) Duel.ShuffleHand(1-tp) end end \ No newline at end of file diff --git a/official/c65124425.lua b/official/c65124425.lua index e333abeb1f..bc5ceaa37b 100644 --- a/official/c65124425.lua +++ b/official/c65124425.lua @@ -3,7 +3,9 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) + --Send 1 Wyrm monster from your Deck to the GY, then, if you control a face-up non-Effect Monster, you can add from your Deck to your hand 1 "Tenyi" monster with a different name from the monster sent to the GY local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -16,23 +18,24 @@ s.listed_series={SET_TENYI} function s.gyfilter(c) return c:IsRace(RACE_WYRM) and c:IsAbleToGrave() end -function s.thfilter(c,cd) - return c:IsSetCard(SET_TENYI) and c:IsMonster() and not c:IsCode(cd) and c:IsAbleToHand() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c,code) + return c:IsSetCard(SET_TENYI) and c:IsMonster() and not c:IsCode(code) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local gc=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if not gc or Duel.SendtoGrave(gc,REASON_EFFECT)==0 or not gc:IsLocation(LOCATION_GRAVE) then return end local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil,gc:GetCode()) - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNonEffectMonster),tp,LOCATION_MZONE,0,1,nil) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() + if #g>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNonEffectMonster),tp,LOCATION_MZONE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) + Duel.BreakEffect() Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end diff --git a/official/c71442223.lua b/official/c71442223.lua index 2ecb7587e1..ebd7e8eaeb 100644 --- a/official/c71442223.lua +++ b/official/c71442223.lua @@ -1,92 +1,81 @@ --方界輪廻 --Cubic Rebirth local s,id=GetID() +local COUNTER_CUBIC=0x1038 function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(s.condition) + e1:SetCode(EVENT_ATTACK_ANNOUNCE) + e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.listed_series={SET_CUBIC} -s.counter_place_list={0x1038} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function s.spfilter1(c,e,tp) +s.counter_place_list={COUNTER_CUBIC} +function s.cubicspfilter(c,e,tp) return c:IsSetCard(SET_CUBIC) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local at=Duel.GetAttacker() - if chkc then return chkc==at end - if chk==0 then return at:IsOnField() and at:IsCanBeEffectTarget(e) - and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetTargetCard(at) + local bc=Duel.GetAttacker() + if chkc then return chkc==bc end + if chk==0 then return bc:IsOnField() and bc:IsCanBeEffectTarget(e) and bc:IsCanAddCounter(COUNTER_CUBIC,1) + and Duel.IsExistingMatchingCard(s.cubicspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetTargetCard(bc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end -function s.spfilter2(c,e,tp,tc) - return c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +function s.oppspfilter(c,e,tp,code) + return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local tg=Group.FromCards(tc) - local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter2),1-tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,1-tp,tc) - if ft>0 and #g>0 then - if Duel.IsPlayerAffectedByEffect(1-tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=g:Clone() - if #g>ft then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - sg=g:Select(1-tp,ft,ft,nil) - g:Remove(Card.IsLocation,nil,LOCATION_MZONE|LOCATION_GRAVE) - Duel.SendtoGrave(g,REASON_EFFECT) - end - local sc=sg:GetFirst() - for sc in aux.Next(sg) do - Duel.SpecialSummonStep(sc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() - local og=Duel.GetOperatedGroup() - tg:Merge(og) - end - local tc=tg:GetFirst() - for tc in aux.Next(tg) do - s.counter(tc,c) + if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end + local opp=1-tp + local tg=Group.FromCards(tc) + local ft=Duel.GetLocationCount(opp,LOCATION_MZONE,opp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.oppspfilter),opp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,opp,tc:GetCode()) + if ft>0 and #g>0 then + if Duel.IsPlayerAffectedByEffect(opp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_SPSUMMON) + local sg=g:Select(opp,ft,ft,nil) + for sc in sg:Iter() do + Duel.SpecialSummonStep(sc,0,opp,opp,false,false,POS_FACEUP_ATTACK) end + Duel.SpecialSummonComplete() + local og=Duel.GetOperatedGroup() + tg:Merge(og) + end + local c=e:GetHandler() + local counter_chk=false + for tc in tg:Iter() do + --The ATK of the targeted monster and those Special Summoned monster(s) become 0 and place 1 Cubic Counter on each + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + if tc:AddCounter(COUNTER_CUBIC,1) then counter_chk=true end + --Monsters with a Cubic Counter cannot attack, also negate their effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_CANNOT_ATTACK) + e2:SetCondition(function(e) return e:GetHandler():GetCounter(COUNTER_CUBIC)>0 end) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_DISABLE) + tc:RegisterEffect(e3) + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local cubicg=Duel.SelectMatchingCard(tp,s.cubicspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #cubicg>0 then Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g2>0 then - Duel.SpecialSummon(g2,0,tp,tp,true,false,POS_FACEUP) - end + Duel.SpecialSummon(cubicg,0,tp,tp,true,false,POS_FACEUP) end -end -function s.disable(e) - return e:GetHandler():GetCounter(0x1038)>0 -end -function s.counter(tc,ec) - local e1=Effect.CreateEffect(ec) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - -- - tc:AddCounter(0x1038,1) - local e2=Effect.CreateEffect(ec) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetCondition(s.disable) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_DISABLE) - tc:RegisterEffect(e3) end \ No newline at end of file diff --git a/official/c83888009.lua b/official/c83888009.lua index 58661da841..e2e17e05ce 100644 --- a/official/c83888009.lua +++ b/official/c83888009.lua @@ -3,12 +3,14 @@ --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 of your banished Xyz Monsters local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE+CATEGORY_DAMAGE) 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:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -27,9 +29,9 @@ function s.spfilter(c,e,tp) 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_REMOVED) and s.spfilter(chkc,e,tp) end - local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_XYZ) if chk==0 then local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_XYZ) if e:GetLabel()==1 then ft=Duel.GetMZoneCount(tp,sg) end e:SetLabel(0) return ft>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) @@ -37,30 +39,29 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_REMOVED) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,300) end -function s.atfilter(c) - if not c:IsType(TYPE_XYZ) or not c:IsSetCard(SET_NUMBER) then return false end +function s.attachfilter(c) local no=c.xyz_number - return no and no>=101 and no<=107 and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) + return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and no and no>=101 and no<=107 and c:IsFaceup() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end local ct=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.atfilter),tp,LOCATION_REMOVED|LOCATION_GRAVE,0,tc) - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 - and ct>0 and #g>0 and not tc:IsImmuneToEffect(e) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.attachfilter),tp,LOCATION_REMOVED|LOCATION_GRAVE,0,tc) + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 + and ct>0 and #g>0 and not tc:IsImmuneToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) local mg=g:Select(tp,1,ct,nil) if #mg>0 then + Duel.HintSelection(mg) Duel.BreakEffect() Duel.Overlay(tc,mg) end end if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --Each player takes 300 damage for each card in their hand + --During the End Phase of the turn you activated this card, each player takes 300 damage for each card in their hand local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) diff --git a/official/c89208725.lua b/official/c89208725.lua index 8e6602b775..2d59ee5ba8 100644 --- a/official/c89208725.lua +++ b/official/c89208725.lua @@ -2,33 +2,35 @@ --Metaverse local s,id=GetID() function s.initial_effect(c) - --activate + --Take 1 Field Spell from your Deck, and either activate it or add it to your hand local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SEARCH) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.filter(c,tp) - return c:IsType(TYPE_FIELD) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp,true,true)) +function s.thactfilter(c,tp) + return c:IsFieldSpell() and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp,true,true)) 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,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thactfilter,tp,LOCATION_DECK,0,1,nil,tp) end if not Duel.CheckPhaseActivity() then Duel.RegisterFlagEffect(tp,CARD_MAGICAL_MIDBREAKER,RESET_CHAIN,0,1) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - aux.ToHandOrElse(tc,tp,function(c) - local te=tc:GetActivateEffect() - return te:IsActivatable(tp,true,true) - end, - function(c) - Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) - end, - aux.Stringid(id,2)) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) + local sc=Duel.SelectMatchingCard(tp,s.thactfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + aux.ToHandOrElse(sc,tp, + function() + return sc:GetActivateEffect():IsActivatable(tp,true,true) + end, + function() + Duel.ActivateFieldSpell(sc,e,tp,eg,ep,ev,re,r,rp) + end, + aux.Stringid(id,2) + ) end \ No newline at end of file From 9d696fb25dbda0b52223d4e6e994a3b5f4670338 Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 23 Jun 2025 06:42:54 -0300 Subject: [PATCH 122/128] "Magnifistorming Summoning Technique" update Prevent script errors when the destruction doesn't happen due to an event --- pre-release/c101302062.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-release/c101302062.lua b/pre-release/c101302062.lua index 9baf4efb23..ebf57437bf 100644 --- a/pre-release/c101302062.lua +++ b/pre-release/c101302062.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) @@ -81,4 +81,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end -end \ No newline at end of file +end From 97bdf7799b6662f237bb736325c1e51630b4200c Mon Sep 17 00:00:00 2001 From: Naim Date: Tue, 24 Jun 2025 12:25:44 -0300 Subject: [PATCH 123/128] Update c101302061.lua --- pre-release/c101302061.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-release/c101302061.lua b/pre-release/c101302061.lua index 69eed14ed0..f86aad1ed9 100644 --- a/pre-release/c101302061.lua +++ b/pre-release/c101302061.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) @@ -81,4 +81,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end -end \ No newline at end of file +end From 1fb556db49cb728563c02b2c9f57a8891df11a72 Mon Sep 17 00:00:00 2001 From: TheRazgriz <54089012+TheRazgriz@users.noreply.github.com> Date: Tue, 24 Jun 2025 19:11:40 -0700 Subject: [PATCH 124/128] Update "Cutter Shark (Anime)" - Added extra checks to see if there were free zones on resolution - Should be able to Summon this card in either Attack or Defense Position --- unofficial/c810000016.lua | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/unofficial/c810000016.lua b/unofficial/c810000016.lua index 5c84c9431f..b8238e7b7a 100644 --- a/unofficial/c810000016.lua +++ b/unofficial/c810000016.lua @@ -1,9 +1,10 @@ --- Cut-In Shark --- scripted by: UnknownGuest +--カット・イン・シャーク (Anime) +--Cutter Shark (Anime) +--Scripted by: UnknownGuest --fixed by MLD local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon this card from your hand when a monster you control is targeted for an attack local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -21,17 +22,19 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return at and at:IsControler(tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk==0 then return d:IsReleasable() and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or d:GetSequence()<5) end - Duel.Release(d,REASON_COST) + local at=Duel.GetAttackTarget() + if chk==0 then return at:IsReleasable() and Duel.GetMZoneCount(tp,at)>0 end + Duel.Release(at,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) + 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,LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetMZoneCount(tp)<=0 then return end local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end From 885bbfd2a054b69047a3cfc9b4b1f930340312c3 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 25 Jun 2025 05:56:47 -0300 Subject: [PATCH 125/128] "Turbo Synchron" fix Fixed a bug where it would not be able to change the position of a monster that could not be targeted by its effect --- official/c67270095.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/c67270095.lua b/official/c67270095.lua index e789cb4f4b..89a074fc78 100644 --- a/official/c67270095.lua +++ b/official/c67270095.lua @@ -27,7 +27,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local d=Duel.GetAttackTarget() if chkc then return chkc==d end - if chk==0 then return d and d:IsAttackPos() and d:IsCanChangePosition() and d:IsCanBeEffectTarget(e) end + if chk==0 then return d and d:IsAttackPos() and d:IsCanChangePosition() end Duel.SetTargetCard(d) Duel.SetOperationInfo(0,CATEGORY_POSITION,d,1,0,0) end From 8942dfb8804176dd58f599136c12d58163e6257b Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 25 Jun 2025 06:43:24 -0300 Subject: [PATCH 126/128] "Time Wizard" fix Fixed a bug where it would consider the ATK of monsters that were face-down when inflicting damage --- official/c71625222.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/official/c71625222.lua b/official/c71625222.lua index deb4231638..39bb21b072 100644 --- a/official/c71625222.lua +++ b/official/c71625222.lua @@ -2,7 +2,7 @@ --Time Wizard local s,id=GetID() function s.initial_effect(c) - --destroy + --Destroy monsters on the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN+CATEGORY_DAMAGE) @@ -19,6 +19,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) if Duel.CallCoin(tp) then @@ -28,8 +29,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) else local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) Duel.Destroy(g,REASON_EFFECT) - local dg=Duel.GetOperatedGroup() - local sum=dg:GetSum(Card.GetAttack) - Duel.Damage(tp,sum/2,REASON_EFFECT) + local dg=Duel.GetOperatedGroup():Filter(Card.IsPreviousPosition,nil,POS_FACEUP) + local sum=dg:GetSum(Card.GetPreviousAttackOnField) + if #sum>0 then + Duel.Damage(tp,sum/2,REASON_EFFECT) + end end end \ No newline at end of file From 59e11bae11818712c0de8d0625e25d0195286983 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 25 Jun 2025 12:59:26 -0300 Subject: [PATCH 127/128] Update c71625222.lua --- official/c71625222.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/official/c71625222.lua b/official/c71625222.lua index 39bb21b072..9990ba1cc0 100644 --- a/official/c71625222.lua +++ b/official/c71625222.lua @@ -31,8 +31,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) local dg=Duel.GetOperatedGroup():Filter(Card.IsPreviousPosition,nil,POS_FACEUP) local sum=dg:GetSum(Card.GetPreviousAttackOnField) - if #sum>0 then + if sum>0 then Duel.Damage(tp,sum/2,REASON_EFFECT) end end -end \ No newline at end of file +end From cd55ef40be0b935b6a006c2da70af384bfdbe37a Mon Sep 17 00:00:00 2001 From: yoshiduels Date: Wed, 25 Jun 2025 18:18:19 +0200 Subject: [PATCH 128/128] fixed Star Salvation Shield --- rush/c160015065.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rush/c160015065.lua b/rush/c160015065.lua index cfd561317a..1bee717327 100644 --- a/rush/c160015065.lua +++ b/rush/c160015065.lua @@ -24,7 +24,7 @@ function s.filter1(c,tp) return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.filter1,1,nil,tp) and Duel.IsTurnPlayer(1-tp) and Duel.GetFlagEffect(ep,id)==0 + return eg:IsExists(s.filter1,1,nil,tp) and Duel.IsTurnPlayer(1-tp) and Duel.GetFlagEffect(1-tp,id)==0 end function s.condition2(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and Duel.IsTurnPlayer(1-tp) and Duel.GetFlagEffect(ep,id)==0 @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) g=g:AddMaximumCheck() local ct=Duel.SendtoGrave(g,REASON_COST) if ct>0 then - Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) + Duel.RegisterFlagEffect(1-tp,id,RESET_PHASE|PHASE_END,0,1) --can attack once local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2))