From 25db5c14076e20e7d781d529693824434e52bf3f Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 5 Jan 2025 04:45:46 -0300 Subject: [PATCH 1/3] functions --- card_counter_constants.lua | 4 +++- cards_specific_functions.lua | 28 ++++++++++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/card_counter_constants.lua b/card_counter_constants.lua index 0012e19e0d..8f9072e0ef 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -138,7 +138,9 @@ TOKEN_WORLD_LEGACY = 46647145 --Specific Special Summons SUMMON_WITH_MONSTER_REBORN = 1010 -SUMMON_BY_NOUVELLES = 181 +SUMMON_BY_GLADIATOR_BEAST = 150 +SUMMON_BY_EVOLTILE = 180 +SUMMON_BY_NOUVELLES = 181 --Commonly used Rush Cards CARD_AMALILITH = 160428037 diff --git a/cards_specific_functions.lua b/cards_specific_functions.lua index 64751054c3..2296a56e8f 100644 --- a/cards_specific_functions.lua +++ b/cards_specific_functions.lua @@ -24,24 +24,32 @@ function Auxiliary.NecroValleyFilter(f) end end ---sp_summon condition for "Gladiator Beast" monsters -function Auxiliary.gbspcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) +--Checks if Card c was Special Summoned by the effect of a "Gladiator Beast" monster +function Card.IsGladiatorBeastSummoned(c) + return c:IsSummonType(SUMMON_BY_GLADIATOR_BEAST) end ---sp_summon condition for "Evolsaur" monsters -function Auxiliary.evospcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) +--Checks if Card c was Special Summoned by the effect of an "Evoltile" monster +function Card.IsEvoltileSummoned(c) + return c:IsSummonType(SUMMON_BY_EVOLTILE) end ---return if Card c was special summoned by the effect of a "Nouvelles" monster +--Checks if Card c was Special Summoned by the effect of a "Nouvelles" monster function Card.IsNouvellesSummoned(c) return c:IsSummonType(SUMMON_BY_NOUVELLES) end ---sp_summon condition for "Nouvellez" monsters +--Special Summon condition for cards that require a summon by the effect of a "Gladiator Beast" monster +function Auxiliary.gbspcon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsSummonType(SUMMON_BY_GLADIATOR_BEAST) +end + +--Special Summon condition for cards that require a summon by the effect of an "Evoltile" monster +function Auxiliary.evospcon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsEvoltileSummoned() +end + +--Special Summon condition for cards that require a summon by the effect of a "Nouvelles" monsters function Auxiliary.nouvspcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsNouvellesSummoned() end From 6ba07b16ce529e8951188dbc2f8721a1745d75be Mon Sep 17 00:00:00 2001 From: Naim Date: Sun, 5 Jan 2025 09:10:22 -0300 Subject: [PATCH 2/3] "Evo-" cards --- official/c13046291.lua | 46 +++++++------------ official/c14154221.lua | 24 ++++------ official/c16480084.lua | 64 +++++++++++++++----------- official/c17045014.lua | 1 + official/c20855340.lua | 16 +++---- official/c23234094.lua | 17 +++---- official/c28877602.lua | 16 +++---- official/c3283679.lua | 20 ++++---- official/c34026662.lua | 18 +++----- official/c39672388.lua | 24 +++++----- official/c5338223.lua | 24 ++++------ official/c54266211.lua | 25 +++++----- official/c55488859.lua | 16 +++---- official/c56240989.lua | 102 +++++++++++++++++------------------------ official/c69633792.lua | 15 ++++-- official/c80651316.lua | 39 +++++++++------- official/c81873903.lua | 10 ++-- official/c8632967.lua | 23 +++++----- official/c88095331.lua | 23 ++++------ 19 files changed, 252 insertions(+), 271 deletions(-) diff --git a/official/c13046291.lua b/official/c13046291.lua index 494edfb0a2..87081fd6e3 100644 --- a/official/c13046291.lua +++ b/official/c13046291.lua @@ -3,7 +3,7 @@ --scripted by Naim local s,id=GetID() function s.initial_effect(c) - --spsummon + --Special Summon 1 Level 4 or lower FIRE Dinosaur monster from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,72 +14,58 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --search + --Attach up to 2 Reptile/Dinosaur monsters to a Dragon Xyz monster you control with no material local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.atchcost) + e2:SetCost(aux.SelfBanishCost) e2:SetTarget(s.atchtg) e2:SetOperation(s.atchop) c:RegisterEffect(e2) end function s.spfilter(c,e,tp) - return c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,151,tp,false,false,POS_FACEUP) -end -function s.costfilter(c,e,tp,ft) - return c:IsRace(RACE_REPTILE) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + return c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false,POS_FACEUP) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,e,tp,ft) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,aux.ReleaseCheckMMZ,nil,RACE_REPTILE) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local sg=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,e,tp,ft) + local sg=Duel.SelectReleaseGroupCost(tp,Card.IsRace,1,1,false,aux.ReleaseCheckMMZ,nil,RACE_REPTILE) Duel.Release(sg,REASON_COST) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,151,tp,tp,false,false,POS_FACEUP) + if g then + Duel.SpecialSummon(g,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end end function s.xyzfilter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0 end -function s.atchcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,RACE_REPTILE+RACE_DINOSAUR) end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.atchtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,RACE_REPTILE+RACE_DINOSAUR) end + and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,e:GetHandler(),RACE_REPTILE|RACE_DINOSAUR) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) end function s.atchop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,RACE_REPTILE+RACE_DINOSAUR) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,RACE_REPTILE+RACE_DINOSAUR) - local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.dncheck,1,tp,HINTMSG_SPSUMMON) - if sg then + and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,RACE_REPTILE|RACE_DINOSAUR) then + local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,RACE_REPTILE|RACE_DINOSAUR) + local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.dncheck,1,tp,HINTMSG_XMATERIAL) + if #sg>0 then Duel.Overlay(tc,sg) end end -end +end \ No newline at end of file diff --git a/official/c14154221.lua b/official/c14154221.lua index b97ff6f5d3..b32aa51363 100644 --- a/official/c14154221.lua +++ b/official/c14154221.lua @@ -1,18 +1,19 @@ --進化の代償 +--Evo-Price local s,id=GetID() function s.initial_effect(c) - --activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --destroy + --Destroy 1 card on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) @@ -20,25 +21,20 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -function s.cfilter(c) - local st=c:GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end +s.listed_series={SET_EVOLTILE} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil) + return eg:IsExists(Card.IsEvoltileSummoned,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) - and 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.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16480084.lua b/official/c16480084.lua index 4207b57d33..29203652bb 100644 --- a/official/c16480084.lua +++ b/official/c16480084.lua @@ -2,63 +2,75 @@ --Evolsaur Pelta local s,id=GetID() function s.initial_effect(c) + --Gains 500 DEF local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetCategory(CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(aux.evospcon) - e1:SetOperation(s.evoop) + e1:SetTarget(s.deftg) + e1:SetOperation(s.defop) c:RegisterEffect(e1) - --check summon for battle destroy + --Check if it is summoned by the effect of an "Evoltile" monster before it leaves the field local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_LEAVE_FIELD_P) e2:SetOperation(s.checkop) c:RegisterEffect(e2) - --search + --Add 1 "Evoltile" monste from your Deck to your hand local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) + e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(s.schcon) - e3:SetTarget(s.schtg) - e3:SetOperation(s.schop) + e3:SetCondition(s.thcond) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x304e} -function s.evoop(e) +s.listed_series={SET_EVOLTILE} +function s.deftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,e:GetHandler(),1,tp,-500) +end +function s.defop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - --defup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) - c:RegisterEffect(e1) + if c:IsFaceup() and c:IsRelateToEffect(e) then + --This card loses 500 DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_DEFENSE) + e1:SetValue(-500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end end function s.checkop(e,tp,eg,ep,ev,re,r,rp) - if aux.evospcon(e) then e:SetLabel(1) else e:SetLabel(0) end + if e:GetHandler():IsEvoltileSummoned() then + e:SetLabel(1) + else + e:SetLabel(0) + end end -function s.schcon(e,tp,eg,ep,ev,re,r,rp) +function s.thcond(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) and e:GetLabelObject():GetLabel()==1 end -function s.sfilter(c) - return c:IsSetCard(0x304e) and c:IsMonster() and c:IsAbleToHand() +function s.thfilter(c) + return c:IsSetCard(SET_EVOLTILE) and c:IsMonster() and c:IsAbleToHand() end -function s.schtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.schop(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c17045014.lua b/official/c17045014.lua index 3a16db9766..6d67f19a0e 100644 --- a/official/c17045014.lua +++ b/official/c17045014.lua @@ -14,6 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end +s.listed_series={SET_EVOLTILE} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end if chk==0 then return true end diff --git a/official/c20855340.lua b/official/c20855340.lua index a368fca737..43476f92d3 100644 --- a/official/c20855340.lua +++ b/official/c20855340.lua @@ -2,7 +2,7 @@ --Evoltile Pleuro local s,id=GetID() function s.initial_effect(c) - --special summon + --Special Summon 1 "Evolsaur" monster from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,24 +14,24 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousControler(tp) and e:GetHandler():IsReason(REASON_DESTROY) end -function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,153,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,153,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(g,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23234094.lua b/official/c23234094.lua index b3fd89aa72..a37427de58 100644 --- a/official/c23234094.lua +++ b/official/c23234094.lua @@ -1,7 +1,8 @@ --エヴォルダー・エリアス +--Evolsaur Elias local s,id=GetID() function s.initial_effect(c) - --spsummon + --Special Summon 1 Level 6 or lower FIRE Dinosaur from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -13,20 +14,20 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.filter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_FIRE) - and c:IsCanBeSpecialSummoned(e,181,tp,false,false) +s.listed_series={SET_EVOLTILE} +function s.spfilter(c,e,tp) + return c:IsLevelBelow(6) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,181,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28877602.lua b/official/c28877602.lua index b9774a7f57..7de0cd146a 100644 --- a/official/c28877602.lua +++ b/official/c28877602.lua @@ -2,7 +2,7 @@ --Evoltile Odonto local s,id=GetID() function s.initial_effect(c) - --summon success + --Special Summon 1 "Evolsaur" monster from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -12,20 +12,20 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0x604e} -function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,152,tp,false,false) +s.listed_series={SET_EVOLSAUR} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,152,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(g,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3283679.lua b/official/c3283679.lua index 9c06ae572f..e84c18558c 100644 --- a/official/c3283679.lua +++ b/official/c3283679.lua @@ -2,16 +2,16 @@ --Evoltile Lagosucho local s,id=GetID() function s.initial_effect(c) - --send to grave + --Send 1 "Evolsaur" monster from your Deck to the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) c:RegisterEffect(e1) - --spsummon + --Special Summon 1 "Evoltile" monster from your Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -22,15 +22,15 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x604e,0x304e} +s.listed_series={SET_EVOLTILE,SET_EVOLSAUR} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x604e) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_EVOLSAUR) and c:IsAbleToGrave() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,156,tp,false,false) + return c:IsSetCard(SET_EVOLTILE) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,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 @@ -50,6 +50,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,156,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(g,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end end diff --git a/official/c34026662.lua b/official/c34026662.lua index e6a82e1a22..4e922daac7 100644 --- a/official/c34026662.lua +++ b/official/c34026662.lua @@ -1,27 +1,23 @@ --進化の奇跡 --Evo-Miracle - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot be destroyed by battle or card effect local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) c:RegisterEffect(e1) end -function s.filter(c) - local st=c:GetSummonType() - return c:IsFaceup() and st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsEvoltileSummoned() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsEvoltileSummoned),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsEvoltileSummoned),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -32,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) local e2=e1:Clone() diff --git a/official/c39672388.lua b/official/c39672388.lua index 5c30d945bd..2c749c56a1 100644 --- a/official/c39672388.lua +++ b/official/c39672388.lua @@ -1,9 +1,11 @@ --エヴォルダー・ダルウィノス +--Evolsaur Darwino local s,id=GetID() function s.initial_effect(c) - --lvup + --Increase the level of a target by up to 2 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -12,25 +14,25 @@ function s.initial_effect(c) e1:SetOperation(s.lvop) c:RegisterEffect(e1) end -function s.filter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end +s.listed_series={SET_EVOLTILE} function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:HasLevel() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + --Increase its level local e1=Effect.CreateEffect(e:GetHandler()) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(opt+1) - 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/c5338223.lua b/official/c5338223.lua index 6b4e749751..9bbff7210c 100644 --- a/official/c5338223.lua +++ b/official/c5338223.lua @@ -2,8 +2,9 @@ --Evo-Force local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 "Evolsaur" monster and treat it as summoned by the effect of an "Evoltile" monster local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -12,24 +13,19 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x304e,0x604e} -function s.cfilter(c,ft,tp) - return c:IsSetCard(0x304e) - and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) -end +s.listed_series={SET_EVOLTILE,SET_EVOLSAUR} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,ft,tp) end - local rg=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,ft,tp) + e:SetLabel(100) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,aux.ReleaseCheckMMZ,nil,SET_EVOLTILE) end + local rg=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,aux.ReleaseCheckMMZ,nil,SET_EVOLTILE) Duel.Release(rg,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,170,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - if e:GetLabel()==1 then + if e:GetLabel()==100 then e:SetLabel(0) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) else @@ -45,6 +41,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,170,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(g,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54266211.lua b/official/c54266211.lua index 763906832c..dd402e62bd 100644 --- a/official/c54266211.lua +++ b/official/c54266211.lua @@ -1,7 +1,8 @@ --エヴォルダー・ウルカノドン +--Evolsaur Vulcano local s,id=GetID() function s.initial_effect(c) - --spsummon + --Special Summon 1 "Evolsaur" monster from your GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -13,25 +14,25 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x604e} -function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,180,tp,false,false) +s.listed_series={SET_EVOLTILE,SET_EVOLSAUR} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,180,tp,tp,false,false,POS_FACEUP) + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then + --It cannot declare an attack local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - tc:RegisterEffect(e1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c55488859.lua b/official/c55488859.lua index f9467b7bd7..0cde9bdb04 100644 --- a/official/c55488859.lua +++ b/official/c55488859.lua @@ -2,7 +2,7 @@ --Evoltile Gephyro local s,id=GetID() function s.initial_effect(c) - --special summon + --Special Summon 1 "Evolsaur" monster from your GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,23 +14,23 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end -function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,150,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,150,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(tc,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56240989.lua b/official/c56240989.lua index 7cef65d1c6..3df1a8ebe7 100644 --- a/official/c56240989.lua +++ b/official/c56240989.lua @@ -1,94 +1,74 @@ --エヴォルド・カシネリア +--Evoltile Cansinerio local s,id=GetID() function s.initial_effect(c) - --destroy + --Register a flag when it destroys a monster by battle local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetOperation(s.regop) + e1:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end) c:RegisterEffect(e1) - --special summon + --Special Summon 2 Level 6 or lower FIRE Dinosaur monsters from your Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e2:SetCost(aux.SelfTributeCost) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) +function s.spfilter(c,e,tp) + return c:IsLevelBelow(6) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_DINOSAUR) + and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false) end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id)~=0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function s.filter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_FIRE) - and c:IsCanBeSpecialSummoned(e,154,tp,false,false) -end -function s.filter2(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) +function s.spcheck(sg,e,tp,mg) + return sg:GetClassCount(Card.GetCode)==1 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp) - return ft>1 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and g:IsExists(s.filter2,1,nil,g) - end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + if chk==0 then return #g>=2 and Duel.GetMZoneCount(tp,e:GetHandler())>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,0) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp) - local dg=g:Filter(s.filter2,nil,g) - if #dg>=1 then - local fid=c:GetFieldID() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=dg:Select(tp,1,1,nil) - local tc1=sg:GetFirst() - local tc2=dg:Filter(Card.IsCode,tc1,tc1:GetCode()):GetFirst() - Duel.SpecialSummonStep(tc1,154,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc2,154,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + if #g<2 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,1,tp,HINTMSG_SPSUMMON) + for tc in sg:Iter() do + Duel.SpecialSummonStep(tc,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + --Their effects are negated local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - tc1:RegisterEffect(e1,true) - local e2=e1:Clone() - tc2:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) - tc1:RegisterEffect(e3,true) - local e4=e3:Clone() - tc2:RegisterEffect(e4,true) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_DISABLE_EFFECT) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e2,true) Duel.SpecialSummonComplete() - sg:AddCard(tc2) - sg:KeepAlive() - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetCountLimit(1) - e5:SetLabel(fid) - e5:SetLabelObject(sg) - e5:SetCondition(s.rmcon) - e5:SetOperation(s.rmop) - Duel.RegisterEffect(e5,tp) end + sg:KeepAlive() + --Banish them during the End Phase + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e0:SetCode(EVENT_PHASE+PHASE_END) + e0:SetCountLimit(1) + e0:SetLabel(fid) + e0:SetLabelObject(sg) + e0:SetCondition(s.rmcon) + e0:SetOperation(s.rmop) + Duel.RegisterEffect(e0,tp) end function s.rmfilter(c,fid) return c:GetFlagEffectLabel(id)==fid @@ -105,4 +85,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.rmfilter,nil,e:GetLabel()) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69633792.lua b/official/c69633792.lua index db0208025e..4ce321a25c 100644 --- a/official/c69633792.lua +++ b/official/c69633792.lua @@ -1,25 +1,32 @@ --エヴォルダー・テリアス +--Evolsaur Terias local s,id=GetID() function s.initial_effect(c) - --atkdown + --This card loses 500 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(aux.evospcon) + e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end +s.listed_series={SET_EVOLTILE} +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,-500) +end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then - --atkup + --This card loses 500 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c80651316.lua b/official/c80651316.lua index 01b020516e..605cf0bae7 100644 --- a/official/c80651316.lua +++ b/official/c80651316.lua @@ -1,49 +1,56 @@ --エヴォルダー・ケラト +--Evolsaur Cerato local s,id=GetID() function s.initial_effect(c) - --atkup + --Gains effects when Summoned by the effect of an "Evoltile" monster local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(aux.evospcon) + e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0x304e} +s.listed_series={SET_EVOLTILE} +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,-500) +end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - --atkup + --Gains 200 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) - --search + --Add 1 "Evoltile" monster from your Deck to your hand local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetTarget(s.schtg) - e2:SetOperation(s.schop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end -function s.sfilter(c) - return c:IsSetCard(0x304e) and c:IsMonster() and c:IsAbleToHand() +function s.thfilter(c) + return c:IsSetCard(SET_EVOLTILE) and c:IsMonster() and c:IsAbleToHand() end -function s.schtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.schop(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c81873903.lua b/official/c81873903.lua index 1c3ac2e5af..58f68c6655 100644 --- a/official/c81873903.lua +++ b/official/c81873903.lua @@ -2,7 +2,7 @@ --Evoltile Westlo local s,id=GetID() function s.initial_effect(c) - --search + --Special Summon 1 "Evolsaur" monster from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,151,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -24,6 +24,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,151,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(g,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8632967.lua b/official/c8632967.lua index 32cf6122ca..015e87bfa2 100644 --- a/official/c8632967.lua +++ b/official/c8632967.lua @@ -1,4 +1,5 @@ --進化の宿命 +--Evo-Karma local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,35 +7,33 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --act limit + --Your opponent cannot activate cards and effect when a monster is summoned by the effect of an "Evoltile" monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(s.sucop) + e2:SetOperation(s.sumlimop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetRange(LOCATION_SZONE) e3:SetCode(EVENT_CHAIN_END) - e3:SetOperation(s.cedop) + e3:SetOperation(s.chainendop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end function s.chainlm(e,rp,tp) return tp==rp end -function s.sucfilter(c) - local st=c:GetSummonType() - return c:IsSetCard(0x304e) and st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function s.sucop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(s.sucfilter,1,nil) then +function s.sumlimop(e,tp,eg,ep,ev,re,r,rp) + if eg:IsExists(Card.IsEvoltileSummoned,1,nil) then e:SetLabel(1) - else e:SetLabel(0) end + else + e:SetLabel(0) + end end -function s.cedop(e,tp,eg,ep,ev,re,r,rp) +function s.chainendop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then Duel.SetChainLimitTillChainEnd(s.chainlm) end -end +end \ No newline at end of file diff --git a/official/c88095331.lua b/official/c88095331.lua index aae452602b..4a1ba4a5f9 100644 --- a/official/c88095331.lua +++ b/official/c88095331.lua @@ -2,35 +2,32 @@ --Evoltile Najasho local s,id=GetID() function s.initial_effect(c) - --search + --Special Summon 1 "Evolsaur" monster from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_RELEASE) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCode(EVENT_RELEASE) + e1:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,155,tp,false,false) +s.listed_series={SET_EVOLSAUR} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,SUMMON_BY_EVOLTILE,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,155,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(g,SUMMON_BY_EVOLTILE,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file From 4ee05324c2d70e2df7585c128562602e25244d38 Mon Sep 17 00:00:00 2001 From: Naim Date: Mon, 6 Jan 2025 05:24:36 -0300 Subject: [PATCH 3/3] Evolsaur Cerato --- official/c80651316.lua | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/official/c80651316.lua b/official/c80651316.lua index 605cf0bae7..74f6e6ac50 100644 --- a/official/c80651316.lua +++ b/official/c80651316.lua @@ -12,6 +12,16 @@ function s.initial_effect(c) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) + --Add 1 "Evoltile" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) end s.listed_series={SET_EVOLTILE} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -28,16 +38,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(200) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) - --Add 1 "Evoltile" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e2) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return aux.evospcon(e,tp,eg,ep,ev,re,r,rp) and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) end function s.thfilter(c) return c:IsSetCard(SET_EVOLTILE) and c:IsMonster() and c:IsAbleToHand()