From 664f9930fdf5e2220fb2acd2f96ccdaae11522a8 Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 3 Oct 2024 07:35:06 -0300 Subject: [PATCH 1/9] batch1 --- official/c15066114.lua | 17 ++++++++--------- official/c15629801.lua | 21 ++++++++++++--------- official/c1828513.lua | 27 ++++++++++++--------------- official/c19636995.lua | 24 ++++++++++++------------ official/c22996376.lua | 6 ++---- official/c23898021.lua | 11 ++++++----- official/c28423537.lua | 31 +++++++++++++++---------------- official/c29303524.lua | 27 +++++++++++---------------- official/c30312361.lua | 20 ++++++++++---------- 9 files changed, 88 insertions(+), 96 deletions(-) diff --git a/official/c15066114.lua b/official/c15066114.lua index f3a80cc369..958d2e13e1 100644 --- a/official/c15066114.lua +++ b/official/c15066114.lua @@ -2,7 +2,7 @@ --Segmental Dragon local s,id=GetID() function s.initial_effect(c) - --summon & set with no tribute + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE) @@ -14,7 +14,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EFFECT_SET_PROC) c:RegisterEffect(e2) - --destroy + --Destroy all monsters in the Main Monster Zones with ATK less than or equal to the ATK this card had on the field local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_QUICK_O) @@ -33,13 +33,12 @@ function s.ntcon(e,c,minc) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) + --ATK and DEF become halved local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetRange(LOCATION_MZONE) e1:SetValue(1300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -50,22 +49,22 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) end function s.desfilter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) and c:GetSequence()<5 + return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsInMainMZone() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) end local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack()) g:AddCard(c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then local atk=c:GetAttack() - if Duel.Destroy(c,REASON_EFFECT)~=0 then + if Duel.Destroy(c,REASON_EFFECT)>0 then local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,atk) Duel.Destroy(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c15629801.lua b/official/c15629801.lua index 06cc9e292e..e899732ce1 100644 --- a/official/c15629801.lua +++ b/official/c15629801.lua @@ -2,8 +2,9 @@ --Battle Waltz local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 "Waltz Token" local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -29,17 +30,18 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) + if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,tc:GetAttack(),tc:GetDefense(),tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) then local token=Duel.CreateToken(tp,id+1) - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TOFIELD) token:RegisterEffect(e1) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENSE) + e2:SetCode(EFFECT_SET_DEFENSE) e2:SetValue(tc:GetDefense()) token:RegisterEffect(e2) local e3=e1:Clone() @@ -55,15 +57,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetValue(tc:GetAttribute()) token:RegisterEffect(e5) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e6=Effect.CreateEffect(e:GetHandler()) + --Neither player takes any battle damage from attacks involving it + local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_NO_BATTLE_DAMAGE) e6:SetValue(1) - e6:SetReset(RESET_EVENT+RESETS_STANDARD) + e6:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e6) local e7=e6:Clone() e7:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) token:RegisterEffect(e7) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c1828513.lua b/official/c1828513.lua index 9d6f288fb7..39638a45e4 100644 --- a/official/c1828513.lua +++ b/official/c1828513.lua @@ -2,37 +2,34 @@ --Shadow of the Six Samurai - Shien local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3d),4,2) c:EnableReviveLimit() - --attack up + --Xyz Summon procedure: 2 Level 4 "Six Samurai" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SIX_SAMURAI),4,2) + --Make the original ATK of a "Six Samurai" monster become 2000 local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCost(s.cost) + e1:SetCost(aux.dxmcostgen(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x3d} -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 +s.listed_series={SET_SIX_SAMURAI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetAttack()<2000 + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetAttack()<2000 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) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g:GetFirst(),1,tp,math.abs(2000-g:GetFirst():GetAttack())) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -40,9 +37,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c19636995.lua b/official/c19636995.lua index a983cbdfed..4616f2f536 100644 --- a/official/c19636995.lua +++ b/official/c19636995.lua @@ -1,7 +1,6 @@ --急き兎馬 --Red Hared Hasty Horse --Scripted by edo9300 - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -21,6 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_MOVE) e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) @@ -29,17 +29,17 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) e3:SetTarget(s.dattg) e3:SetOperation(s.datop) c:RegisterEffect(e3) end function s.hspval(e,c) local tp=c:GetControler() - local zone=0x1f + local zone=ZONES_MMZ local lg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - for tc in aux.Next(lg) do + for tc in lg:Iter() do zone=zone&(~tc:GetColumnZone(LOCATION_MZONE,0,0,tp)) end return 0,zone @@ -48,9 +48,8 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return #(e:GetHandler():GetColumnGroup()&eg)>0 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then @@ -59,17 +58,18 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.dattg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,e:GetHandler():GetAttack()/2) end function s.datop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then + local base_atk=c:GetBaseAttack() --Halve its original ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(c:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e1:SetValue(base_atk/2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_DISABLE) c:RegisterEffect(e1) --Can attack directly local e2=Effect.CreateEffect(c) @@ -77,7 +77,7 @@ function s.datop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c22996376.lua b/official/c22996376.lua index 5daf1e0c52..6a3c64f2d6 100644 --- a/official/c22996376.lua +++ b/official/c22996376.lua @@ -21,9 +21,7 @@ function s.otop(g,e,tp,eg,ep,ev,re,r,rp,c,minc,zone,relzone,exeff) --Change original ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetRange(LOCATION_MZONE) e1:SetValue(2000) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) @@ -37,11 +35,11 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return ct>0 and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,ct,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,ct,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e):Match(Card.IsRace,nil,RACE_BEAST) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23898021.lua b/official/c23898021.lua index ecd72cdd1b..a5bebc0880 100644 --- a/official/c23898021.lua +++ b/official/c23898021.lua @@ -3,15 +3,16 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --atk + --Its original ATK becomes 1000 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetOperation(s.regop) c:RegisterEffect(e1) - --search + --Reveal 3 Normal Traps from your Deck and your opponent randomly chooses 1 for you to Set on your field local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) @@ -27,7 +28,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,7 +37,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.thfilter(c) - return c:GetType()==TYPE_TRAP and c:IsSSetable() + return c:IsNormalTrap() and c:IsSSetable() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -53,4 +54,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local tg=sg:Select(1-tp,1,1,nil) Duel.SSet(tp,tg:GetFirst(),tp,false) end -end +end \ No newline at end of file diff --git a/official/c28423537.lua b/official/c28423537.lua index 4c8743e226..2bfe0aa0fe 100644 --- a/official/c28423537.lua +++ b/official/c28423537.lua @@ -1,7 +1,8 @@ --戦慄の凶皇-ジェネシス・デーモン +--Archfiend Emperor, the First Lord of Horror local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --Can be Normal Summoned without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetCondition(s.ntcon) e1:SetOperation(s.ntop) c:RegisterEffect(e1) - -- + --You cannot Special Summon any monsters, except Fiend monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_MZONE) @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) c:RegisterEffect(e2) - --destroy + --Destroy 1 card on the field local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DESTROY) @@ -32,17 +33,15 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} 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 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK/DEF become halved local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1500) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) @@ -51,7 +50,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(1000) c:RegisterEffect(e2) - -- + --Destroy this card during the End Phase local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) @@ -69,24 +68,24 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.rfilter(c) - return c:IsSetCard(0x45) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) + return c:IsSetCard(SET_ARCHFIEND) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) 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(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) 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,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + 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 and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29303524.lua b/official/c29303524.lua index 60d41fa62f..5deb8b6c1b 100644 --- a/official/c29303524.lua +++ b/official/c29303524.lua @@ -1,9 +1,9 @@ --眩月龍セレグレア ---Dazzling Lunar Dragon Selegrea +--Seleglare the Luminous Lunar Dragon --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --no tribute + --Can be Normal Summoned/Set without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE) @@ -14,7 +14,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EFFECT_SET_PROC) c:RegisterEffect(e2) - --control + --Return this card to the hand and take control of that opponent's monster local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_CONTROL) e3:SetType(EFFECT_TYPE_QUICK_O) @@ -22,8 +22,8 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) - e3:SetCondition(s.concon) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) + e3:SetCondition(function() return Duel.IsMainPhase() end) e3:SetTarget(s.contg) e3:SetOperation(s.conop) c:RegisterEffect(e3) @@ -35,18 +35,13 @@ end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_DISABLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1500) c:RegisterEffect(e1) end -function s.concon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 -end function s.confilter(c,atk) - return c:IsFaceup() and c:GetAttack()<=atk and c:IsControlerCanBeChanged() + return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsControlerCanBeChanged() end function s.contg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -55,13 +50,13 @@ function s.contg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.confilter,tp,0,LOCATION_MZONE,1,nil,atk) and c:IsAbleToHand() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.confilter,tp,0,LOCATION_MZONE,1,1,nil,atk) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) end function s.conop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~0 and tc:IsRelateToEffect(e) then + if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c30312361.lua b/official/c30312361.lua index ce18f80d32..7bce5f5a84 100644 --- a/official/c30312361.lua +++ b/official/c30312361.lua @@ -21,17 +21,17 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if chk==0 then return not e:GetHandler():HasFlagEffect(id) end + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.filter(c) return c:IsType(TYPE_EFFECT) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -44,18 +44,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetLabelObject(e1) - e2:SetCode(EFFECT_SET_BASE_ATTACK) + e2:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e2:SetValue(ba) c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end +end \ No newline at end of file From df278a7d7c1d323611c9440421eeeb26c218508b Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 3 Oct 2024 16:05:35 -0300 Subject: [PATCH 2/9] batch2 --- official/c32298781.lua | 50 ++++++++++++++++++++++++------------------ official/c32752319.lua | 15 ++++++------- official/c33911264.lua | 22 ++++++++----------- official/c36029076.lua | 9 ++++---- official/c38030232.lua | 2 +- official/c38525760.lua | 17 +++++++------- official/c3897065.lua | 30 ++++++++++++------------- official/c4022819.lua | 34 ++++++++++++++-------------- official/c4068622.lua | 24 ++++++++++---------- official/c42155488.lua | 13 +++++------ 10 files changed, 107 insertions(+), 109 deletions(-) diff --git a/official/c32298781.lua b/official/c32298781.lua index 9ccff91f9e..a5ff095954 100644 --- a/official/c32298781.lua +++ b/official/c32298781.lua @@ -1,8 +1,10 @@ --トライアングルパワー +--Triangle Power local s,id=GetID() function s.initial_effect(c) - --Activate + --Increase the original ATK/DEF of Level 1 Normal Monsters by 2000 local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetCode(EVENT_FREE_CHAIN) @@ -12,39 +14,45 @@ function s.initial_effect(c) end function s.filter(c) local tpe=c:GetType() - return c:IsFaceup() and (tpe&TYPE_NORMAL)~=0 and (tpe&TYPE_TOKEN)==0 and c:GetLevel()==1 + return c:IsFaceup() and (tpe&TYPE_NORMAL)~=0 and (tpe&TYPE_TOKEN)==0 and c:IsLevel(1) 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 + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,2000) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,g,#g,tp,2000) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do + local base_atk=tc:GetBaseAttack() + local base_def=tc:GetBaseDefense() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(tc:GetBaseAttack()+2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e1:SetValue(base_atk+2000) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENSE) - e2:SetValue(tc:GetBaseDefense()+2000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL) + e2:SetValue(base_def+2000) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetCondition(s.descon) - de:SetOperation(s.desop) - de:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(de,tp) + --Destroy all Level 1 Normal Monsters you control + local e3=Effect.CreateEffect(e:GetHandler()) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCoe3(EVENT_PHASE+PHASE_END) + e3:SetCountLimit(1) + e3:SetCondition(s.descon) + e3:SetOperation(s.desop) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) end function s.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:GetLevel()==1 + return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevel(1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_MZONE,0,1,nil) @@ -52,4 +60,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,0,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32752319.lua b/official/c32752319.lua index 6f74b14412..115ba7e074 100644 --- a/official/c32752319.lua +++ b/official/c32752319.lua @@ -1,10 +1,11 @@ --ユーフォロイド・ファイター +--UFOroid Fighter local s,id=GetID() function s.initial_effect(c) - --fusion material c:EnableReviveLimit() + --Fusion materials: "UFOroid" + 1 Warrior monster Fusion.AddProcMix(c,false,false,7602840,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR)) - --atk + --This card's original ATK/DEF become the combined original ATK of the materials used for its Fusion Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -12,18 +13,16 @@ function s.initial_effect(c) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=c:GetMaterial() - local tc=g:GetFirst() local atk=0 - for tc in aux.Next(g) do + for tc in g:Iter() do local catk=tc:GetBaseAttack() - if catk<0 then catk=0 end atk=atk+catk end if atk~=0 then @@ -31,10 +30,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c33911264.lua b/official/c33911264.lua index 60ee5f8d8e..916c95b690 100644 --- a/official/c33911264.lua +++ b/official/c33911264.lua @@ -1,8 +1,10 @@ --太陽風帆船 +--Solar Wind Jammer local s,id=GetID() function s.initial_effect(c) + --There can only be 1 "Solar Wind Jammer" on the field. c:SetUniqueOnField(1,1,id) - --special summon + --Special Summon this card (from your hand) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -11,28 +13,25 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --level up + --Increase the Level of this card by 1 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(s.lvcon) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(400) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) @@ -42,9 +41,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e2:SetValue(1200) c:RegisterEffect(e2) end -function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFacedown() or not c:IsRelateToEffect(e) then return end @@ -52,6 +48,6 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c36029076.lua b/official/c36029076.lua index 28dc9a5f9f..eee724982a 100644 --- a/official/c36029076.lua +++ b/official/c36029076.lua @@ -1,7 +1,8 @@ --地獄大百足 +--Hundred-Footed Horror local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --You can Normal Summon this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) @@ -19,13 +20,11 @@ function s.ntcon(e,c,minc) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Original ATK becomes 1300 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1300) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c38030232.lua b/official/c38030232.lua index da69998040..bcb935ba23 100644 --- a/official/c38030232.lua +++ b/official/c38030232.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetTarget(s.tg) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) - --Special Summon + --Special Summon 1 "Tenyi Spirit Token" local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) diff --git a/official/c38525760.lua b/official/c38525760.lua index d9bb2e99ad..7a6cac721f 100644 --- a/official/c38525760.lua +++ b/official/c38525760.lua @@ -1,7 +1,8 @@ --陽炎獣 サーベラス +--Hazy Flame Cerbereus local s,id=GetID() function s.initial_effect(c) - --cannot be target + --Your opponent cannot target this card with card effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetValue(aux.tgoval) c:RegisterEffect(e1) - --summon + --You can Normal Summon this card without Tributing local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetCondition(s.ntcon) e2:SetOperation(s.ntop) c:RegisterEffect(e2) - --search + --Add 1 "Hazy" card from your Deck to your hand. local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -30,17 +31,15 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x7d} +s.listed_series={SET_HAZY} 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 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK becomes 1000 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1000) @@ -50,7 +49,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end function s.filter(c) - return c:IsSetCard(0x7d) and c:IsAbleToHand() + return c:IsSetCard(SET_HAZY) 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 @@ -63,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c3897065.lua b/official/c3897065.lua index 3228a399da..31ed4bd67a 100644 --- a/official/c3897065.lua +++ b/official/c3897065.lua @@ -2,10 +2,10 @@ --Super Vehicroid - Stealth Union local s,id=GetID() function s.initial_effect(c) - --fusion material c:EnableReviveLimit() + --Fusion materials: "Truckroid" + "Expressroid" + "Drillroid" + "Stealthroid" Fusion.AddProcMix(c,true,true,61538782,98049038,71218746,984114) - --equip + --Equip 1 non-Machine monster to this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) @@ -17,26 +17,26 @@ function s.initial_effect(c) e1:SetOperation(s.eqop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,aux.NOT(aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE)),s.equipop,e1) - --attack all + --Can attack all monsters your opponent controls local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetCondition(s.atcon) e2:SetValue(1) c:RegisterEffect(e2) - --pierce + --Inflict piercing battle damage local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_PIERCE) c:RegisterEffect(e3) - --atk + --Its original ATK is halved until the end of the Damage Step local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_ATTACK_ANNOUNCE) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID function s.eqfilter(c,tp) return c:IsFaceup() and not c:IsRace(RACE_MACHINE) and (c:IsControler(tp) or c:IsAbleToChangeControler()) end @@ -50,12 +50,12 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.equipop(c,e,tp,tc) if not c:EquipByEffectAndLimitRegister(e,tp,tc) then return end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(id) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) - tc:RegisterEffect(e2) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(id) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -72,8 +72,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local atk=c:GetBaseAttack() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(atk/2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c4022819.lua b/official/c4022819.lua index 6854a03f81..e42aae0dde 100644 --- a/official/c4022819.lua +++ b/official/c4022819.lua @@ -1,7 +1,8 @@ --聖刻龍-アセトドラゴン +--Hieratic Dragon of Eset local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --You can Normal Summon this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetCondition(s.ntcon) e1:SetOperation(s.ntop) c:RegisterEffect(e1) - --lvchange + --Change the Levels of all face-up "Hieratic" monsters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) - --spsummon + --Special Summon 1 Dragon Normal Monster from your hand, Deck, or GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) @@ -30,18 +31,16 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} 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 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK becomes 1000 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1000) c:RegisterEffect(e1) @@ -56,22 +55,21 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end function s.lvfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x69) and not c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_HIERATIC) and not c:IsType(TYPE_XYZ) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - local g=Duel.GetMatchingGroup(s.lvfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc) - local lc=g:GetFirst() local lv=tc:GetLevel() - while lc~=nil do + local g=Duel.GetMatchingGroup(s.lvfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc) + if #g==0 then return end + for lc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) lc:RegisterEffect(e1) - lc=g:GetNext() end end function s.spfilter(c,e,tp) @@ -79,23 +77,23 @@ function s.spfilter(c,e,tp) 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,0x13) + 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=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and 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) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c4068622.lua b/official/c4068622.lua index 2c3cc86cf9..2317ddef2a 100644 --- a/official/c4068622.lua +++ b/official/c4068622.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon + --Special Summoned by banishing 1 "Blackwing" Tuner and 1 non-Tuner local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -13,10 +13,10 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --special summon + --Banish 1 1 "Blackwing" Synchro Monster from your Extra Deck and this card's name and ATK/effect becomes the same as that monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_REMOVE) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) @@ -31,6 +31,7 @@ function s.initial_effect(c) e3:SetValue(aux.FALSE) c:RegisterEffect(e3) end +s.listed_series={SET_BLACKWING} function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.spfilter1,1,nil,sg) and sg:IsExists(s.spfilter2,1,nil,sg) end @@ -38,7 +39,7 @@ function s.spfilter1(c,tp) return not c:IsType(TYPE_TUNER) end function s.spfilter2(c,tp) - return c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) + return c:IsSetCard(SET_BLACKWING) and c:IsType(TYPE_TUNER) end function s.spcon(e,c) if c==nil then return true end @@ -48,8 +49,7 @@ function s.spcon(e,c) local g2=rg:Filter(s.spfilter2,nil) local g=g1:Clone() g:Merge(g2) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #g1>0 and #g2>0 and #g>1 - and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + return #g1>0 and #g2>0 and #g>1 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local rg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) @@ -71,11 +71,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.filter(c) - return c:IsSetCard(0x33) and c:IsAbleToRemove() + return c:IsSetCard(SET_BLACKWING) and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),0,tp,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) @@ -85,20 +86,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and c:IsFaceup() and c:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then local code=tc:GetOriginalCode() local ba=tc:GetBaseAttack() - local reset_flag=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END - c:CopyEffect(code, reset_flag, 1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(reset_flag) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(reset_flag) - e2:SetCode(EFFECT_SET_BASE_ATTACK) + e2:SetReset(RESETS_STANDARD_PHASE_END) + e2:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e2:SetValue(ba) c:RegisterEffect(e2) end diff --git a/official/c42155488.lua b/official/c42155488.lua index f07d100a47..96bab45361 100644 --- a/official/c42155488.lua +++ b/official/c42155488.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCondition(s.ntcon) e1:SetOperation(s.ntop) c:RegisterEffect(e1) - --declear + --Treat this card as another monster type if it is used for a Synchro Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) @@ -26,15 +26,14 @@ function s.ntcon(e,c,minc) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK is halved local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1100) c:RegisterEffect(e1) + --Its Level becomes 3 local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetValue(3) @@ -51,8 +50,8 @@ function s.dectg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) e1:SetLabel(rc) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -72,7 +71,7 @@ function s.decop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SYNCHRO_CHECK) e1:SetValue(s.syncheck) - e1:SetReset(RESET_EVENT|RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetLabel(rc) c:RegisterEffect(e1) end @@ -80,4 +79,4 @@ end function s.syncheck(e,c) c:AssumeProperty(ASSUME_RACE,e:GetLabel()) return true -end +end \ No newline at end of file From dabf65e0ab162d4c940bf231b916b3abafa0c76b Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 4 Oct 2024 07:25:38 -0300 Subject: [PATCH 3/9] batch3 --- official/c32298781.lua | 7 +++--- official/c43530283.lua | 27 +++++++++++---------- official/c47387961.lua | 23 +++++++++--------- official/c51126152.lua | 7 +++--- official/c51632798.lua | 9 ++++--- official/c55713623.lua | 13 ++++++---- official/c5703682.lua | 54 ++++++++++++++++++++++++------------------ official/c58270977.lua | 4 ++-- official/c60025883.lua | 13 +++++----- official/c62325062.lua | 13 ++++++---- official/c63442604.lua | 40 +++++++++++++++---------------- official/c6442944.lua | 29 ++++++++++------------- official/c64599569.lua | 45 ++++++++++++++++++++++------------- official/c65384019.lua | 19 ++++++++------- 14 files changed, 165 insertions(+), 138 deletions(-) diff --git a/official/c32298781.lua b/official/c32298781.lua index a5ff095954..8a97ef3063 100644 --- a/official/c32298781.lua +++ b/official/c32298781.lua @@ -24,16 +24,17 @@ 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.filter,tp,LOCATION_MZONE,0,nil) + local c=e:GetHandler() for tc in g:Iter() do local base_atk=tc:GetBaseAttack() local base_def=tc:GetBaseDefense() - local e1=Effect.CreateEffect(e:GetHandler()) + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(base_atk+2000) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) + local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL) e2:SetValue(base_def+2000) @@ -41,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end --Destroy all Level 1 Normal Monsters you control - local e3=Effect.CreateEffect(e:GetHandler()) + local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCoe3(EVENT_PHASE+PHASE_END) diff --git a/official/c43530283.lua b/official/c43530283.lua index de092c6e12..9e47d833f2 100644 --- a/official/c43530283.lua +++ b/official/c43530283.lua @@ -1,36 +1,39 @@ --勇気の砂時計 +--Hourglass of Courage local s,id=GetID() function s.initial_effect(c) - --atkup + --Original ATK and DEF are halved local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(s.adop) + e1:SetTarget(s.atkdeftg) + e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e2) end -function s.adop(e,tp,eg,ep,ev,re,r,rp) +function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,e:GetHandler(),1,0,0) +end +function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENSE) + e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL) e2:SetValue(s.defval) c:RegisterEffect(e2) - if Duel.GetTurnPlayer()==tp then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2) - else - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) - end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,Duel.IsTurnPlayer(tp) and 3 or 2) end end function s.atkval(e,c) @@ -46,4 +49,4 @@ function s.defval(e,c) else return c:GetBaseDefense()/2 end -end +end \ No newline at end of file diff --git a/official/c47387961.lua b/official/c47387961.lua index 9cf4dd8ed4..d4faacedce 100644 --- a/official/c47387961.lua +++ b/official/c47387961.lua @@ -2,9 +2,9 @@ --Number 8: Heraldic King Genom-Heritage local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x76),4,2) c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 "Heraldic Beast" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERALDIC_BEAST),4,2) --attack up local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} s.xyz_number=8 function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) @@ -33,33 +33,34 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then local code=tc:GetOriginalCode() + local atk=tc:GetAttack() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(tc:GetAttack()) + e2:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e2:SetValue(atk) c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DISABLE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_DISABLE_EFFECT) - e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e5:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e5) end -end +end \ No newline at end of file diff --git a/official/c51126152.lua b/official/c51126152.lua index c71e185bf0..e1b3fd892b 100644 --- a/official/c51126152.lua +++ b/official/c51126152.lua @@ -1,4 +1,5 @@ --深夜急行騎士ナイト・エクスプレス・ナイト +--Night Express Knight local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -26,10 +27,8 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) --change base attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(0) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c51632798.lua b/official/c51632798.lua index c86af92fc8..d974e4d45b 100644 --- a/official/c51632798.lua +++ b/official/c51632798.lua @@ -1,4 +1,5 @@ --可変機獣 ガンナードラゴン +--Fusilier Dragon, the Dual-Mode Beast local s,id=GetID() function s.initial_effect(c) --summon & set with no tribute @@ -19,12 +20,10 @@ function s.ntcon(e,c,minc) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK and DEF become halved local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1400) c:RegisterEffect(e1) @@ -32,4 +31,4 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(1000) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c55713623.lua b/official/c55713623.lua index 8d180483f1..af38cd5b9a 100644 --- a/official/c55713623.lua +++ b/official/c55713623.lua @@ -1,8 +1,10 @@ --収縮 +--Shrink local s,id=GetID() function s.initial_effect(c) - --Activate + --The original ATK of a monster becomes halved local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetHintTiming(TIMING_DAMAGE_STEP) @@ -20,16 +22,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g:GetFirst(),1,tp,g:GetFirst():GetBaseAttack()/2) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetBaseAttack()/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c5703682.lua b/official/c5703682.lua index 4045475114..5ab4cecfcb 100644 --- a/official/c5703682.lua +++ b/official/c5703682.lua @@ -1,8 +1,10 @@ --サウザンドエナジー +--Thousand Energy local s,id=GetID() function s.initial_effect(c) - --Activate + --Increase the original ATK/DEF of all Level 2 Normal Monsters by 1000 points local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetCode(EVENT_FREE_CHAIN) @@ -12,39 +14,45 @@ function s.initial_effect(c) end function s.filter(c) local tpe=c:GetType() - return c:IsFaceup() and (tpe&TYPE_NORMAL)~=0 and (tpe&TYPE_TOKEN)==0 and c:GetLevel()==2 + return c:IsFaceup() and (tpe&TYPE_NORMAL)~=0 and (tpe&TYPE_TOKEN)==0 and c:IsLevel(2) 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 + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,1000) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,g,#g,tp,1000) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do - local e1=Effect.CreateEffect(e:GetHandler()) + local c=e:GetHandler() + for tc in g:Iter() do + local base_atk=tc:GetBaseAttack() + local base_def=tc:GetBaseDefense() + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(tc:GetBaseAttack()+1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e1:SetValue(base_atk+1000) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) + local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENSE) - e2:SetValue(tc:GetBaseDefense()+1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL) + e2:SetValue(base_def+1000) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetCondition(s.descon) - de:SetOperation(s.desop) - de:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(de,tp) + --Destroy all Level 2 Normal Monsters you control + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetCountLimit(1) + e3:SetCondition(s.descon) + e3:SetOperation(s.desop) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) end function s.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:GetLevel()==2 + return c:IsFaceup() and c:IsType(TYPE_NORMAL) and and c:IsLevel(2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_MZONE,0,1,nil) @@ -52,4 +60,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,0,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58270977.lua b/official/c58270977.lua index bd237ee1d9..1db5b37d4e 100644 --- a/official/c58270977.lua +++ b/official/c58270977.lua @@ -3,7 +3,7 @@ --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 "HERO" monster from the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DISABLE) @@ -71,4 +71,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c60025883.lua b/official/c60025883.lua index 7e67798f73..c34fca3c14 100644 --- a/official/c60025883.lua +++ b/official/c60025883.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Link Summon procedure + --Link Summon procedure: 2+ monsters, including a Synchro monster Link.AddProcedure(c,nil,2,4,s.lcheck) --Special Summon 1 "Duel Dragon Token" local e1=Effect.CreateEffect(c) @@ -36,7 +36,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_POWER_TOOL} -s.listed_names={60025884} +s.listed_names={60025884} --"Duel Dragon Token" function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO,lc,sumtype,tp) end @@ -46,7 +46,7 @@ function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.cfilter(c,e,tp,zone) local lv=c:GetLevel() - return (c:IsSetCard(SET_POWER_TOOL) or ((c:GetLevel()==7 or c:GetLevel()==8) and c:IsRace(RACE_DRAGON))) + return (c:IsSetCard(SET_POWER_TOOL) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON))) and c:IsType(TYPE_SYNCHRO) and lv>0 and c:IsAbleToRemoveAsCost() and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,c:GetAttack(),c:GetDefense(),lv,c:GetRace(),c:GetAttribute()) and Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_TOFIELD,zone)>0 end @@ -72,14 +72,15 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,tc:GetAttack(),tc:GetDefense(),tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) and Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_TOFIELD,zone)>0 then local token=Duel.CreateToken(tp,id+1) + Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP,zone) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(tc:GetAttack()) e1:SetReset(RESET_EVENT|RESETS_REDIRECT) token:RegisterEffect(e1) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENSE) + e2:SetCode(EFFECT_SET_DEFENSE) e2:SetValue(tc:GetDefense()) token:RegisterEffect(e2) local e3=e1:Clone() @@ -94,7 +95,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) e5:SetValue(tc:GetAttribute()) token:RegisterEffect(e5) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP,zone) + Duel.SpecialSummonComplete() end end function s.tgcon(e) diff --git a/official/c62325062.lua b/official/c62325062.lua index 981d6249c5..bb7417d00b 100644 --- a/official/c62325062.lua +++ b/official/c62325062.lua @@ -2,8 +2,9 @@ --Adhesion Trap Hole local s,id=GetID() function s.initial_effect(c) - --Activate + --Halve the original ATK of a monster(s) summoned by your opponent local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_SUMMON_SUCCESS) @@ -23,16 +24,18 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.filter,1,nil,tp) end Duel.SetTargetCard(eg) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,eg,#g,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e):Match(s.filter,nil,tp) - for tc in aux.Next(tg) do + if #g==0 then return end + for tc in tg:Iter() do --Halve its original ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c63442604.lua b/official/c63442604.lua index 74ba55343f..80984f3d1b 100644 --- a/official/c63442604.lua +++ b/official/c63442604.lua @@ -2,22 +2,20 @@ --Physical Double local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 "Mirage Token" local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e1:SetCondition(s.condition) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={63442605} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsTurnPlayer(tp) -end +s.listed_names={63442605} --"Mirage Token" function s.cfilter(c,tp) return c:IsFaceup() and c:HasLevel() and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,c:GetAttack(),c:GetDefense(),c:GetLevel(),c:GetRace(),c:GetAttribute()) @@ -33,19 +31,18 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not tc or not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end + if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,tc:GetAttack(),tc:GetDefense(), - tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,tc:GetAttack(),tc:GetDefense(),tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) then return end local token=Duel.CreateToken(tp,id+1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TOFIELD) token:RegisterEffect(e1) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENSE) + e2:SetCode(EFFECT_SET_DEFENSE) e2:SetValue(tc:GetDefense()) token:RegisterEffect(e2) local e3=e1:Clone() @@ -61,15 +58,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetValue(tc:GetAttribute()) token:RegisterEffect(e5) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetRange(LOCATION_MZONE) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetOperation(s.desop) - de:SetReset(RESET_EVENT+RESETS_STANDARD) - token:RegisterEffect(de) + --Destroy the token during the End Phase + local e6=Effect.CreateEffect(e:GetHandler()) + e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e6:SetRange(LOCATION_MZONE) + e6:SetCode(EVENT_PHASE+PHASE_END) + e6:SetCountLimit(1) + e6:SetOperation(s.desop) + e6:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e6) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c6442944.lua b/official/c6442944.lua index 746cc0f94f..c14f209635 100644 --- a/official/c6442944.lua +++ b/official/c6442944.lua @@ -2,7 +2,7 @@ --Kaiser Sea Snake local s,id=GetID() function s.initial_effect(c) - --special summon + --Special Summon this card from your hand local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.hspcon) c:RegisterEffect(e1) - --special summon + --Special Summon 1 Level 8 Sea Serpent monster from your hand or GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -39,47 +39,44 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.spfilter(c,e,tp) - return c:IsRace(RACE_SEASERPENT) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsRace(RACE_SEASERPENT) and c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + 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) 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) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc and 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_FINAL) + e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENSE_FINAL) + e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() + --Its level becomes 4 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) + --Its original ATK becomes 0 local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) e2:SetValue(0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c64599569.lua b/official/c64599569.lua index 1bbe0d1112..13c8d60c7e 100644 --- a/official/c64599569.lua +++ b/official/c64599569.lua @@ -1,36 +1,41 @@ --キメラテック・オーバー・ドラゴン +--Chimeratech Overdragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --fusion material + --Fusion materials: "Cyber Dragon" + 1+ Machine monsters Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),1,99,CARD_CYBER_DRAGON) - --spsummon condition + --Special Summon condition + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_CONDITION) + e1:SetValue(aux.fuslimit) + c:RegisterEffect(e1) + --The original ATK/DEF of this card become equal to the number of Fusion Materials used for its Fusion Summon x 800 local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(aux.fuslimit) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetOperation(s.sucop) c:RegisterEffect(e2) - --spsummon success + --Send all other cards you control to the GY local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(s.sucop) + e3:SetTarget(s.tgtg) + e3:SetOperation(s.tgop) c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetOperation(s.tgop) - c:RegisterEffect(e4) end -s.material_setcode={0x93,0x1093} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} function s.sucop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(c:GetMaterialCount()*800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -38,9 +43,15 @@ function s.sucop(e,tp,eg,ep,ev,re,r,rp) local e3=e1:Clone() e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e3:SetValue(c:GetMaterialCount()-1) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler()) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,tp,0) +end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler()) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65384019.lua b/official/c65384019.lua index b6c2fb2200..36f9bad8f1 100644 --- a/official/c65384019.lua +++ b/official/c65384019.lua @@ -1,4 +1,5 @@ --アルケミー・サイクル +--Alchemy Cycle local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,24 +21,26 @@ function s.filter(c) return c:IsFaceup() and c:GetBaseAttack()~=0 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 + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) local c=e:GetHandler() local fid=c:GetFieldID() - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do if not tc:IsImmuneToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END,0,1,fid) end end + --Draw 1 card each time a monster affected by this effect is destroyed by battle and sent to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DRAW) @@ -47,8 +50,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.drcon) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) - e2:SetReset(RESET_PHASE+PHASE_END) e2:SetLabel(fid) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.drfilter(c,fid) @@ -66,4 +69,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file From 9387c09c3ab2541fa01f69cb54294aa583665b34 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 4 Oct 2024 09:20:10 -0300 Subject: [PATCH 4/9] Guardragon Andrake - was using field effects for the trigger effects that would not work in case it was summoned at the same time as other monsters --- official/c6990577.lua | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/official/c6990577.lua b/official/c6990577.lua index 3e2a458c93..c67f00625a 100644 --- a/official/c6990577.lua +++ b/official/c6990577.lua @@ -1,32 +1,34 @@ --守護竜アンドレイク ---Andrake the Guardragon +--Guardragon Andrake --scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() - --spsummon + --Must be Special Summoned by a card effect local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(s.splimit) c:RegisterEffect(e1) - --ATK/DEF up + --Double this card's original ATK/DEF local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.atkcon) e2:SetOperation(s.atkop) c:RegisterEffect(e2) - --destroy + --Destroy 1 monster your opponent controls local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.descon) e3:SetTarget(s.destg) @@ -37,39 +39,36 @@ function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return eg:GetFirst()==c and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,2) c:RegisterEffect(e1) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENSE) + e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL) e2:SetValue(c:GetBaseDefense()*2) c:RegisterEffect(e2) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return eg:GetFirst()==c and c:IsPreviousLocation(LOCATION_GRAVE+LOCATION_REMOVED) + return return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE|LOCATION_REMOVED) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end + 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,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file From 82968b2284fc9a37dcc0dc29954e0a884aa87fe7 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 4 Oct 2024 10:12:40 -0300 Subject: [PATCH 5/9] batch4 --- official/c67136033.lua | 29 +++++++++++++++------------- official/c69838761.lua | 12 +++++------- official/c70899775.lua | 13 +++++++------ official/c71278040.lua | 2 -- official/c71544954.lua | 6 ++---- official/c74003290.lua | 14 +++++++------- official/c75198893.lua | 8 ++++---- official/c7841921.lua | 18 +++++++++-------- official/c78651105.lua | 20 +++++++++---------- official/c79229522.lua | 25 ++++++++++++------------ official/c81325903.lua | 20 ++++++++++--------- official/c8198620.lua | 31 ++++++++++++++--------------- official/c82377606.lua | 7 ++++--- official/c83274244.lua | 15 +++++++------- official/c86271510.lua | 13 +++++++------ official/c86605184.lua | 15 +++++++------- official/c91392974.lua | 18 ++++++++--------- official/c94538053.lua | 14 ++++++++------ official/c95685352.lua | 44 +++++++++++++++++++++++------------------- 19 files changed, 165 insertions(+), 159 deletions(-) diff --git a/official/c67136033.lua b/official/c67136033.lua index f16c2647fb..9757e0d8af 100644 --- a/official/c67136033.lua +++ b/official/c67136033.lua @@ -1,4 +1,5 @@ --熱血獣王ベアーマン +--Coach Captain Bearman local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -10,16 +11,17 @@ function s.initial_effect(c) e1:SetCondition(s.ntcon) e1:SetOperation(s.ntop) c:RegisterEffect(e1) - --lvchange + --Make all Level 4 Beast-warrior monsters you control become Level 8 local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) - --xyz limit + --Cannot be used as material for an Xyz Summon, except for the summon of FIRE Warrior monsters local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) @@ -32,37 +34,38 @@ function s.ntcon(e,c,minc) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK becomes 1300 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1300) c:RegisterEffect(e1) end function s.filter(c) - return c:IsRace(RACE_BEASTWARRIOR) and c:GetLevel()==4 + return c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(4) and c:IsFaceup() end function s.lvtg(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 + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,8) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + --Level becomes 8 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.xyzlimit(e,c) if not c then return false end return not c:IsAttribute(ATTRIBUTE_FIRE) or not c:IsRace(RACE_WARRIOR) -end +end \ No newline at end of file diff --git a/official/c69838761.lua b/official/c69838761.lua index c829310445..da6f16cf24 100644 --- a/official/c69838761.lua +++ b/official/c69838761.lua @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetCondition(s.ntcon) e1:SetOperation(s.ntop) c:RegisterEffect(e1) - --to hand + --Reveal 3 EARTH Machine monsters from your Deck, then your opponent randomly adds 1 of them to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SUMMON_SUCCESS) @@ -32,12 +32,10 @@ function s.ntcon(e,c,minc) return minc==0 and c:IsLevelAbove(5) and not Duel.IsExistingMatchingCard(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK becomes 1800 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1800) c:RegisterEffect(e1) @@ -59,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local tg=sg:RandomSelect(1-tp,1) Duel.SendtoHand(tg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70899775.lua b/official/c70899775.lua index af9766ab6f..41939982b6 100644 --- a/official/c70899775.lua +++ b/official/c70899775.lua @@ -1,10 +1,10 @@ --ピアニッシモ --Pianissimo - local s,id=GetID() function s.initial_effect(c) --Targeted monster's original ATK becomes 100, also cannot be destroyed by battle or card effect 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) @@ -25,18 +25,19 @@ 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_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g:GetFirst(),1,tp,100) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsMonster() and tc:GetFlagEffect(id)==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) --Original ATK becomes 100 local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot be destroyed by battle or card effect local e2=Effect.CreateEffect(e:GetHandler()) @@ -45,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c71278040.lua b/official/c71278040.lua index 07617a4c35..b9ae316fe3 100644 --- a/official/c71278040.lua +++ b/official/c71278040.lua @@ -84,13 +84,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetRange(LOCATION_MZONE) e1:SetValue(4) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) --ATK/DEF becomes halved local e2=e1:Clone() - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetValue(c:GetBaseAttack()/2) c:RegisterEffect(e2) diff --git a/official/c71544954.lua b/official/c71544954.lua index b6a010c80e..9241f80b60 100644 --- a/official/c71544954.lua +++ b/official/c71544954.lua @@ -51,9 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local val=#g*700 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(val) c:RegisterEffect(e1) @@ -61,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e2:SetCode(EFFECT_SET_BASE_DEFENSE) c:RegisterEffect(e2) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c74003290.lua b/official/c74003290.lua index 106e0e704d..e8d9b2949e 100644 --- a/official/c74003290.lua +++ b/official/c74003290.lua @@ -1,6 +1,5 @@ --迷い風 --Lost Wind - local s,id=GetID() function s.initial_effect(c) --Targeted monster has its effects negated, also halve its original ATK @@ -37,17 +36,18 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,g:GetFirst():GetBaseAttack()/2) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -55,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) Duel.AdjustInstantly(tc) local e3=e1:Clone() - e3:SetCode(EFFECT_SET_BASE_ATTACK) + e3:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e3:SetValue(tc:GetBaseAttack()/2) tc:RegisterEffect(e3) end @@ -68,7 +68,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,0) end function s.setop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -80,7 +80,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c75198893.lua b/official/c75198893.lua index f2a8ff5a34..e31d490763 100644 --- a/official/c75198893.lua +++ b/official/c75198893.lua @@ -32,15 +32,15 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(tc:GetOriginalCode()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Change ATK/DEF local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_ATTACK) + e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(tc:GetBaseAttack()) c:RegisterEffect(e2) local e3=e1:Clone() - e3:SetCode(EFFECT_SET_BASE_DEFENSE) + e3:SetCode(EFFECT_SET_DEFENSE_FINAL) e3:SetValue(tc:GetBaseDefense()) c:RegisterEffect(e3) --Change Attribute @@ -59,7 +59,7 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e6:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e6:SetReset(RESET_EVENT+RESETS_REDIRECT+RESET_PHASE+PHASE_END) + e6:SetReset(RESET_EVENT|RESETS_REDIRECT|RESET_PHASE|PHASE_END) e6:SetValue(LOCATION_REMOVED) c:RegisterEffect(e6) end \ No newline at end of file diff --git a/official/c7841921.lua b/official/c7841921.lua index 27ee00d0d1..5c744b30ea 100644 --- a/official/c7841921.lua +++ b/official/c7841921.lua @@ -1,7 +1,8 @@ --疾走の暗黒騎士ガイア +--Charging Gaia the Fierce Knight local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --Can be Normal Summoned without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE) @@ -9,14 +10,15 @@ function s.initial_effect(c) e1:SetCode(EFFECT_SUMMON_PROC) e1:SetCondition(s.ntcon) c:RegisterEffect(e1) - --atk + --Original ATK becomes 1800 local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SUMMON_COST) e2:SetOperation(s.atkop) c:RegisterEffect(e2) - --tohand + --Add 1 "Black Luster Soldier" monster from your Deck to your hand local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_RELEASE) @@ -26,6 +28,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end +s.listed_series={SET_BLACK_LUSTER_SOLDIER} 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 @@ -35,18 +38,17 @@ function s.atkcon(e) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() + --Its original ATK becomes 1800 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) e1:SetValue(1900) - e1:SetReset(RESET_EVENT+0xff0000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) end function s.thfilter(c) - return c:IsSetCard(0x10cf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -59,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c78651105.lua b/official/c78651105.lua index 11bbe9b175..590adfa481 100644 --- a/official/c78651105.lua +++ b/official/c78651105.lua @@ -2,7 +2,7 @@ --Beast King Barbaros local s,id=GetID() function s.initial_effect(c) - --summon & set with no tribute + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE) @@ -13,9 +13,9 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EFFECT_SET_PROC) c:RegisterEffect(e2) - --summon with 3 tribute + --You can Tribute 3 monsters to Tribute Summon this card local e3=aux.AddNormalSummonProcedure(c,true,true,3,3,SUMMON_TYPE_TRIBUTE+1,aux.Stringid(id,1)) - --destroy + --Destroy all cards your opponent controls. local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetCategory(CATEGORY_DESTROY) @@ -31,12 +31,10 @@ function s.ntcon(e,c,minc) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK becomes 1900 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1900) c:RegisterEffect(e1) @@ -46,10 +44,10 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) + local sg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) + local sg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79229522.lua b/official/c79229522.lua index a93a1321f0..faad5dd3b7 100644 --- a/official/c79229522.lua +++ b/official/c79229522.lua @@ -1,19 +1,20 @@ --キメラテック・フォートレス・ドラゴン +--Chimeratech Fortress Dragon local s,id=GetID() function s.initial_effect(c) - --fusion material c:EnableReviveLimit() + --Fusion Materials: "Cyber Dragon" + 1+ Machine monsters Fusion.AddProcMixRep(c,true,true,s.fil,1,99,CARD_CYBER_DRAGON) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) - --cannot be fusion material - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) + --Cannot be used as Fusion Material + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) + e1:SetValue(1) + c:RegisterEffect(e1) end -s.material_setcode={0x93,0x1093} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} function s.fil(c,fc,sumtype,tp,sub,mg,sg,contact) if contact then sumtype=0 end return c:IsRace(RACE_MACHINE,fc,sumtype,tp) and (not contact or c:IsType(TYPE_MONSTER,fc,sumtype,tp)) @@ -29,11 +30,11 @@ function s.cfilter(c,tp) end function s.contactop(g,tp,c) Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL) - --spsummon condition + --The original ATK of this card becomes 1000x the number of materials used for its Special Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetValue(#g*1000) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c81325903.lua b/official/c81325903.lua index c7ec85d120..d207ac01ac 100644 --- a/official/c81325903.lua +++ b/official/c81325903.lua @@ -1,8 +1,10 @@ --アマゾネスの呪詛師 +--Amazoness Spellcaster local s,id=GetID() function s.initial_effect(c) - --Activate + --Switch the original ATK of 2 monsters local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -11,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x4),tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_AMAZONESS),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x4),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_AMAZONESS),tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) end @@ -30,15 +32,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local atk2=tc2:GetBaseAttack() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(atk2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc1:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) + e2:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e2:SetValue(atk1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc2:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c8198620.lua b/official/c8198620.lua index ca22e6267c..7fbb63d573 100644 --- a/official/c8198620.lua +++ b/official/c8198620.lua @@ -2,19 +2,19 @@ --Dragonecro Nethersoul Dragon local s,id=GetID() function s.initial_effect(c) - c:SetUniqueOnField(1,0,id) - --fusion material c:EnableReviveLimit() + --You can only control 1 "Dragonecro Nethersoul Dragon". + c:SetUniqueOnField(1,0,id) + --Fusion materials: 2 Zombie monsters Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_ZOMBIE),2) - --spsummon condition + --Must first be Fusion Summoned local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetRange(LOCATION_EXTRA) - e1:SetValue(s.splimit) + e1:SetValue(aux.fuslimit) c:RegisterEffect(e1) - --battle + --Change the ATK of a monster that battles this cards to 0 and Special Summon 1 "Dark Soul Token" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetTarget(s.attg) e2:SetOperation(s.atop) c:RegisterEffect(e2) - --indes + --Monsters cannot be destroyed by battle with this card local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -33,14 +33,11 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_names={8198621} -function s.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION -end +s.listed_names={8198621} --"Dark Soul Token" function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) local bc=e:GetHandler():GetBattleTarget() if chk==0 then return bc and bc:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.atop(e,tp,eg,ep,ev,re,r,rp) @@ -53,7 +50,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) local lv=bc:GetOriginalLevel() if lv>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,9 +59,9 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_LEVEL) @@ -76,4 +73,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) end function s.indestg(e,c) return c==e:GetHandler():GetBattleTarget() -end +end \ No newline at end of file diff --git a/official/c82377606.lua b/official/c82377606.lua index af4bece26a..29ad1c4ddd 100644 --- a/official/c82377606.lua +++ b/official/c82377606.lua @@ -23,7 +23,8 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_ALLY_OF_JUSTICE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_ALLY_OF_JUSTICE),tp,LOCATION_MZONE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_ALLY_OF_JUSTICE),tp,LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_ALLY_OF_JUSTICE),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g1,tp,0) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -32,8 +33,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetTextAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetValue(tc:GetBaseAttack()*2) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c83274244.lua b/official/c83274244.lua index 7889b037d3..512e3333ea 100644 --- a/official/c83274244.lua +++ b/official/c83274244.lua @@ -1,7 +1,8 @@ --ドドドウォリアー +--Dododo Warrior local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --You can Normal Summon this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetCondition(s.ntcon) e1:SetOperation(s.ntop) c:RegisterEffect(e1) - --negate + --Negate all card effects that activate in the opponent's Graveyard local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_ATTACK_ANNOUNCE) @@ -22,11 +23,9 @@ function s.ntcon(e,c,minc) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK becomes 1800. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1800) @@ -38,12 +37,12 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.negop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE) e:GetHandler():RegisterEffect(e1) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if ep~=tp and loc==LOCATION_GRAVE then + if ep==1-tp and loc==LOCATION_GRAVE then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c86271510.lua b/official/c86271510.lua index 32492c612a..8f80810eb6 100644 --- a/official/c86271510.lua +++ b/official/c86271510.lua @@ -1,10 +1,11 @@ -- 機怪獣ダレトン --- Mechabeast Dareton +-- Darton the Mechanical Monstrosity -- Scripted by Hatter local s,id=GetID() function s.initial_effect(c) -- Change original 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) @@ -25,14 +26,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if #g<1 then return end local sum=0 - for tc in aux.Next(g) do + for tc in g:Iter() do sum=sum+(math.abs(tc:GetBaseAttack()-tc:GetAttack())) end - -- Change original ATK + --Change original ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(sum) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,Duel.IsTurnPlayer(tp) and 1 or 2) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c86605184.lua b/official/c86605184.lua index dc5eca3201..74231a90ad 100644 --- a/official/c86605184.lua +++ b/official/c86605184.lua @@ -1,11 +1,11 @@ --ファイアウォール・ガーディアン --Firewall Guardian --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) @@ -17,13 +17,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) --Negate attack, and if you do, opponent's monster's ATK becomes 0 local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atkcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(aux.selfbanishcost) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end @@ -34,7 +35,7 @@ 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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -45,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -66,9 +67,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) --ATK becomes 0 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Unaffected by other card effects local e2=Effect.CreateEffect(e:GetHandler()) @@ -78,7 +79,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetValue(s.efilter) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c91392974.lua b/official/c91392974.lua index 53f6396799..0474fc6d9b 100644 --- a/official/c91392974.lua +++ b/official/c91392974.lua @@ -16,16 +16,16 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x5008} +s.listed_series={SET_HERO,SET_VISION_HERO} function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) - and c:GetPreviousControler()==tp and c:IsPreviousSetCard(0x8) and c:IsPreviousPosition(POS_FACEUP) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + and c:IsPreviousControler(tp) and c:IsPreviousSetCard(SET_HERO) and c:IsPreviousPosition(POS_FACEUP) 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) - return c:IsSetCard(0x5008) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VISION_HERO) and c:IsLevelBelow(4) 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 @@ -43,15 +43,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetBaseAttack()/2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENSE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(tc:GetBaseDefense()/2) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c94538053.lua b/official/c94538053.lua index f4956f83bb..d0dcddb818 100644 --- a/official/c94538053.lua +++ b/official/c94538053.lua @@ -1,6 +1,8 @@ --マックス・ウォリアー +--Maxx Warrior local s,id=GetID() function s.initial_effect(c) + --Gains 400 ATK during the Damage Step only local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -9,11 +11,11 @@ function s.initial_effect(c) e1:SetCondition(s.condtion) e1:SetValue(400) c:RegisterEffect(e1) - --addown + --This card becomes Level 2 and its original ATK/DEF are halve local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_LVCHANGE) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) @@ -33,12 +35,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToBattle() and c:IsFaceup() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY,Duel.IsTurnPlayer(tp) and 2 or 1) c:RegisterEffect(e1) local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENSE) + e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL) e2:SetValue(c:GetBaseDefense()/2) c:RegisterEffect(e2) local e3=e1:Clone() @@ -46,4 +48,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e3:SetValue(2) c:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c95685352.lua b/official/c95685352.lua index cf7c8c3a79..6a7043e3b8 100644 --- a/official/c95685352.lua +++ b/official/c95685352.lua @@ -3,24 +3,26 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,7,2) c:EnableReviveLimit() - --pendulum summon + --Xyz Summon procedure: 2 Level 7 monsters + Xyz.AddProcedure(c,nil,7,2) + --Pendulum attributes Pendulum.AddProcedure(c,false) - --halve base atk + --Halve the original ATK of a monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1) - e1:SetTarget(s.target) + e1:SetTarget(s.atktg) e1:SetOperation(s.atkop1) c:RegisterEffect(e1) - --halve and gain + --Halve the original ATK of a monster and increase this card's ATK by the same amount local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) @@ -28,12 +30,14 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) e2:SetCondition(s.atkcon2) - e2:SetCost(s.cost) - e2:SetTarget(s.target) + e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetTarget(s.atktg) e2:SetOperation(s.atkop2) + e2:SetLabel(1) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) - --place in pendulum zone + --Place this card in the Pendulum Zone local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DESTROYED) e3:SetProperty(EFFECT_FLAG_DELAY) @@ -43,15 +47,15 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.pendulum_level=7 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) + if e:GetLabel()==1 then + g:AddCard(e:GetHandler()) + end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,0) end function s.atkop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -60,8 +64,8 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) local atk=tc:GetBaseAttack() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(atk/2)) tc:RegisterEffect(e1) end @@ -77,7 +81,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(atk/2)) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -85,7 +89,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(math.ceil(atk/2)) c:RegisterEffect(e2) end From 09ced7ad282f0486dc0162c23b18456b6161adcd Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 4 Oct 2024 10:22:59 -0300 Subject: [PATCH 6/9] comments --- official/c28423537.lua | 2 +- official/c29303524.lua | 2 +- official/c33911264.lua | 2 +- official/c42155488.lua | 2 +- official/c47387961.lua | 4 ++-- official/c51126152.lua | 4 ++-- official/c51632798.lua | 2 +- official/c67136033.lua | 2 +- official/c69838761.lua | 2 +- official/c7841921.lua | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/official/c28423537.lua b/official/c28423537.lua index 2bfe0aa0fe..18505a4e0e 100644 --- a/official/c28423537.lua +++ b/official/c28423537.lua @@ -2,7 +2,7 @@ --Archfiend Emperor, the First Lord of Horror local s,id=GetID() function s.initial_effect(c) - --Can be Normal Summoned without Tributing + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) diff --git a/official/c29303524.lua b/official/c29303524.lua index 5deb8b6c1b..78848db364 100644 --- a/official/c29303524.lua +++ b/official/c29303524.lua @@ -3,7 +3,7 @@ --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) - --Can be Normal Summoned/Set without Tributing + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/official/c33911264.lua b/official/c33911264.lua index 916c95b690..2dcb04dcf7 100644 --- a/official/c33911264.lua +++ b/official/c33911264.lua @@ -2,7 +2,7 @@ --Solar Wind Jammer local s,id=GetID() function s.initial_effect(c) - --There can only be 1 "Solar Wind Jammer" on the field. + --There can only be 1 "Solar Wind Jammer" on the field c:SetUniqueOnField(1,1,id) --Special Summon this card (from your hand) local e1=Effect.CreateEffect(c) diff --git a/official/c42155488.lua b/official/c42155488.lua index 96bab45361..fda9f6e077 100644 --- a/official/c42155488.lua +++ b/official/c42155488.lua @@ -2,7 +2,7 @@ --Genomix Fighter local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) diff --git a/official/c47387961.lua b/official/c47387961.lua index d4faacedce..a538f59ff0 100644 --- a/official/c47387961.lua +++ b/official/c47387961.lua @@ -5,7 +5,7 @@ function s.initial_effect(c) c:EnableReviveLimit() --Xyz Summon procedure: 2 Level 4 "Heraldic Beast" monsters Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERALDIC_BEAST),4,2) - --attack up + --Make this card's name and effect become the ones of another monster local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetDescription(aux.Stringid(id,0)) @@ -31,7 +31,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then local code=tc:GetOriginalCode() local atk=tc:GetAttack() local e1=Effect.CreateEffect(c) diff --git a/official/c51126152.lua b/official/c51126152.lua index e1b3fd892b..02072616e9 100644 --- a/official/c51126152.lua +++ b/official/c51126152.lua @@ -2,14 +2,14 @@ --Night Express Knight local s,id=GetID() function s.initial_effect(c) - --cannot special summon + --Cannot be Special Summoned local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_DECK) e1:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e1) - --summon with no tribute + --You can Normal Summon/Set this card without Tributing local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) diff --git a/official/c51632798.lua b/official/c51632798.lua index d974e4d45b..97ac9faa09 100644 --- a/official/c51632798.lua +++ b/official/c51632798.lua @@ -2,7 +2,7 @@ --Fusilier Dragon, the Dual-Mode Beast local s,id=GetID() function s.initial_effect(c) - --summon & set with no tribute + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) diff --git a/official/c67136033.lua b/official/c67136033.lua index 9757e0d8af..7bb30e5380 100644 --- a/official/c67136033.lua +++ b/official/c67136033.lua @@ -2,7 +2,7 @@ --Coach Captain Bearman local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) diff --git a/official/c69838761.lua b/official/c69838761.lua index da6f16cf24..3cfe8ae203 100644 --- a/official/c69838761.lua +++ b/official/c69838761.lua @@ -3,7 +3,7 @@ --scripted by Hatter local s,id=GetID() function s.initial_effect(c) - --normal summon + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) diff --git a/official/c7841921.lua b/official/c7841921.lua index 5c744b30ea..ac627939fb 100644 --- a/official/c7841921.lua +++ b/official/c7841921.lua @@ -2,7 +2,7 @@ --Charging Gaia the Fierce Knight local s,id=GetID() function s.initial_effect(c) - --Can be Normal Summoned without Tributing + --You can Normal Summon/Set this card without Tributing local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE) From c28d44354a81246a0446378d4d3916ea5be510d6 Mon Sep 17 00:00:00 2001 From: Naim Date: Fri, 4 Oct 2024 10:25:49 -0300 Subject: [PATCH 7/9] fix --- official/c5703682.lua | 2 +- official/c6990577.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/official/c5703682.lua b/official/c5703682.lua index 5ab4cecfcb..97851cadc2 100644 --- a/official/c5703682.lua +++ b/official/c5703682.lua @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e3,tp) end function s.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and and c:IsLevel(2) + return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevel(2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_MZONE,0,1,nil) diff --git a/official/c6990577.lua b/official/c6990577.lua index c67f00625a..53e7722ad6 100644 --- a/official/c6990577.lua +++ b/official/c6990577.lua @@ -57,7 +57,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE|LOCATION_REMOVED) + return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE|LOCATION_REMOVED) 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 From 624542f6f4ff9c173bf6547073dbf62acb9e89de Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 7 Oct 2024 06:46:41 -0300 Subject: [PATCH 8/9] "Chimeratech Overdragon" fix Its effect should only trigger when it is Fusion Summoned --- official/c64599569.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/official/c64599569.lua b/official/c64599569.lua index 13c8d60c7e..56f5e91694 100644 --- a/official/c64599569.lua +++ b/official/c64599569.lua @@ -24,6 +24,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) c:RegisterEffect(e3) From 26402742a26b623042faaa6eb64a6eb05d07fa8a Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 7 Oct 2024 06:50:53 -0300 Subject: [PATCH 9/9] Revert ""Chimeratech Overdragon" fix" This reverts commit 624542f6f4ff9c173bf6547073dbf62acb9e89de. --- official/c64599569.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/official/c64599569.lua b/official/c64599569.lua index 56f5e91694..13c8d60c7e 100644 --- a/official/c64599569.lua +++ b/official/c64599569.lua @@ -24,7 +24,6 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) c:RegisterEffect(e3)