diff --git a/pre-release/c100200261.lua b/pre-release/c100200261.lua new file mode 100644 index 000000000..068d326b7 --- /dev/null +++ b/pre-release/c100200261.lua @@ -0,0 +1,66 @@ +--玲瓏竜 クンツァイド +--Dragolithia Kunzite +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Send 1 Level 7 or higher Normal Monster from your hand or Deck to the GY, and if you do, Special Summon this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetTarget(s.tgsptg) + e1:SetOperation(s.tgspop) + c:RegisterEffect(e1) + --Special Summon 1 Normal Monster from your GY in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(aux.selfbanishcost) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +function s.tgfilter(c) + return c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7) and c:IsAbleToGrave() +end +function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.tgspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,c):GetFirst() + if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) + and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.gyspfilter(c,e,tp) + return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.gyspfilter(chkc,e,tp) end + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file diff --git a/pre-release/c100306148.lua b/pre-release/c100306148.lua new file mode 100644 index 000000000..dfa5db72b --- /dev/null +++ b/pre-release/c100306148.lua @@ -0,0 +1,90 @@ +--Japanese name +--Theia, the Primal Being +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Neither player can Normal and/or Special Summon more than 4 times per turn while this card is face-up in the Monster Zone + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCode(EFFECT_CANNOT_SUMMON) + e2:SetTargetRange(1,1) + e2:SetTarget(function(e,c,tp) return e:GetHandler():GetFlagEffect(id+tp)>=4 end) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + c:RegisterEffect(e3) + --Register a flag to this card everytime Normal and Special Summons happen + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e4:SetCode(EVENT_SUMMON_SUCCESS) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetRange(LOCATION_MZONE) + e4:SetCondition(function(e,tp,eg) return eg and not eg:IsContains(e:GetHandler()) end) + e4:SetOperation(function(e,tp,eg,ep) e:GetHandler():RegisterFlagEffect(id+ep,RESETS_STANDARD_PHASE_END,0,1) end) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e5) + --Special Summon left count + local e6=Effect.CreateEffect(c) + e6:SetType(EFFECT_TYPE_FIELD) + e6:SetCode(EFFECT_LEFT_SPSUMMON_COUNT) + e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e6:SetRange(LOCATION_MZONE) + e6:SetTargetRange(1,1) + e6:SetValue(s.countval) + c:RegisterEffect(e6) +end +function s.spcheck(sg,tp) + return aux.ReleaseCheckMMZ(sg,tp) and sg:CheckWithSumGreater(Card.GetLevel,11,1,99) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.HasLevel,1,99,false,s.spcheck,nil) end + local g=Duel.SelectReleaseGroupCost(tp,Card.HasLevel,1,99,false,s.spcheck,nil) + Duel.Release(g,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 then + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + g=g:Select(tp,1,1,nil) + end + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.countval(e,re,sump) + local ct=e:GetHandler():GetFlagEffect(id+sump) + if ct>=4 then + return 0 + else + return 4-ct + end +end \ No newline at end of file diff --git a/pre-release/c100306149.lua b/pre-release/c100306149.lua new file mode 100644 index 000000000..8e7bf0193 --- /dev/null +++ b/pre-release/c100306149.lua @@ -0,0 +1,73 @@ +--Japanese name +--Mind Castlin +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Switch control of 1 opponent's face-up monster and this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.cttg1) + e1:SetOperation(s.ctop1) + c:RegisterEffect(e1) + --Switch control of 1 face-up monster on each field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_CONTROL) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.ctcon) + e2:SetTarget(s.cttg2) + e2:SetOperation(s.ctop2) + c:RegisterEffect(e2) +end +function s.ctfilter(c,tp,e) + return c:IsFaceup() and c:IsAbleToChangeControler() and Duel.GetMZoneCount(c:GetControler(),c,tp,LOCATION_REASON_CONTROL)>0 + and (not e or c:IsCanBeEffectTarget(e)) +end +function s.cttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.ctfilter(chkc,tp) end + if chk==0 then return c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 + and Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil,tp) + g:AddCard(c) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,tp,0) +end +function s.ctop1(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then + Duel.SwapControl(c,tc) + end +end +function s.ctcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) +end +function s.cttg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(s.ctfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp) end + local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,e) + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_CONTROL) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,tg,2,tp,0) +end +function s.ctop2(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + local c1,c2=tg:GetFirst(),tg:GetNext() + if c1:IsRelateToEffect(e) and c2:IsRelateToEffect(e) then + Duel.SwapControl(c1,c2) + end +end \ No newline at end of file diff --git a/pre-release/c100306150.lua b/pre-release/c100306150.lua new file mode 100644 index 000000000..c6f2a01f8 --- /dev/null +++ b/pre-release/c100306150.lua @@ -0,0 +1,39 @@ +--Japanese name +--Heavy Polymerization +--Scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + Fusion.RegisterSummonEff{handler=c,mincount=3,extrafil=s.fextra,extratg=s.extratg,extraop=s.extraop,stage2=s.stage2} +end +function s.fcheck(tp,sg,fc) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) +end +function s.fextra(e,tp,mg) + local eg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil) + if #eg>0 then + return eg,s.fcheck + end + return nil +end +function s.extraop(e,tc,tp,sg) + local rg=sg:Filter(Card.IsLocation,nil,LOCATION_EXTRA) + if #rg>0 then + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT|REASON_MATERIAL|REASON_FUSION) + e:SetLabel(rg:GetSum(Card.GetAttack)) + sg:Sub(rg) + else + e:SetLabel(0) + end +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA) +end +function s.stage2(e,tc,tp,sg,chk) + if chk==0 then + local ct=e:GetLabel() + if ct>0 then + Duel.SetLP(tp,Duel.GetLP(tp)-ct) + end + end +end \ No newline at end of file diff --git a/pre-release/c101207006.lua b/pre-release/c101207006.lua new file mode 100644 index 000000000..02e5d9471 --- /dev/null +++ b/pre-release/c101207006.lua @@ -0,0 +1,126 @@ +--SRクラッカーネル +--Speedroid Clackernel +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c) + --Place 1 "Speedroid" Pendulum Monster from your Deck in your Pendulum Zone + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.placecost) + e1:SetTarget(s.placetg) + e1:SetOperation(s.placeop) + c:RegisterEffect(e1) + --Special Summon 1 "Speedroid Clackernel" from your hand, Deck, or GY as a Tuner + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Banish this card and increase the ATK of a "Clear Wing" monster by 700 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e3:SetRange(LOCATION_EXTRA) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.atktg) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SPEEDROID,SET_CLEAR_WING} +s.listed_names={id} +function s.costfilter(c) + return c:IsSetCard(SET_SPEEDROID) and c:IsAbleToRemoveAsCost() +end +function s.placecost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.placefilter(c) + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() +end +function s.placetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckPendulumZones(tp) and Duel.IsExistingMatchingCard(s.placefilter,tp,LOCATION_DECK,0,1,nil) end +end +function s.placeop(e,tp,eg,ep,ev,re,r,rp) + --You cannot Special Summon for the rest of this turn, except WIND monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + if not Duel.CheckPendulumZones(tp) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local tc=Duel.SelectMatchingCard(tp,s.placefilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if tc then + Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end +function s.spfilter(c,e,tp) + if not c:IsCode(id) then return end + c:AssumeProperty(ASSUME_TYPE,c:GetType()|TYPE_TUNER) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if not tc then return end + tc:AssumeProperty(ASSUME_TYPE,tc:GetType()|TYPE_TUNER) + if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Treat it as a Tuner + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_ADD_TYPE) + e1:SetValue(TYPE_TUNER) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) + end + Duel.SpecialSummonComplete() +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local bc=Duel.GetBattleMonster(tp) + if chk==0 then return c:IsAbleToRemove() and bc and bc:IsSetCard(SET_CLEAR_WING) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,bc,1,tp,700) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local bc=Duel.GetBattleMonster(tp) + if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 + and bc and bc:IsRelateToBattle() then + --It gains 700 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(700) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + bc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101207007.lua b/pre-release/c101207007.lua new file mode 100644 index 000000000..51b8e4019 --- /dev/null +++ b/pre-release/c101207007.lua @@ -0,0 +1,101 @@ +--SRウィング・シンクロン +--Speedroid Wing Synchron +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Pendulum procedure + Pendulum.AddProcedure(c) + --Destroy both this card and 1 Level 2 WIND Pendulum Monster Card in your Pendulum Zone, and if you do, Special Summon 1 "Clear Wing Synchro Dragon" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Send 1 "Speedroid" Spell/Trap from your Deck to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_DECK) + e2:SetCountLimit(1,id) + e2:SetCondition(s.tgcon) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SPEEDROID} +s.listed_names={82044279} --"Clear Wing Synchro Dragon" +function s.desfilter(c) + return c:IsLevel(2) and c:IsAttribute(ATTRIBUTE_WIND) +end +function s.spfilter(c,e,tp) + return c:IsCode(82044279) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_PZONE,0,1,e:GetHandler()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end + local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,c):GetFirst() + if c:IsRelateToEffect(e) and pc and s.desfilter(pc) and Duel.Destroy(Group.FromCards(c,pc),REASON_EFFECT)==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end + end + --Cards in your Pendulum Zone cannot be destroyed by card effects for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetTargetRange(LOCATION_PZONE,0) + e1:SetValue(1) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) + --You cannot Special Summon, except WIND monsters, for the rest of this turn + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetDescription(aux.Stringid(id,3)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e2:SetTargetRange(1,0) + e2:SetTarget(function(e,c) return not c:IsAttribute(ATTRIBUTE_WIND) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end +function s.tgcon(e) + local c=e:GetHandler() + return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.windsynchrofilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() +end +function s.tgfilter(c) + return c:IsSetCard(SET_SPEEDROID) and c:IsSpellTrap() and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.windsynchrofilter,tp,LOCATION_MZONE,0,nil) + return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + and g:GetBinClassCount(Card.GetRace)>=2 + end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101207010.lua b/pre-release/c101207010.lua new file mode 100644 index 000000000..8f9fa7b9a --- /dev/null +++ b/pre-release/c101207010.lua @@ -0,0 +1,93 @@ +--ARG☆S-栄冠のアドラ +--ARG☆S - Adra the Laurels +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Change the ATK of 1 face-up monster on the field to 0 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsContinuousTrap),tp,LOCATION_ONFIELD,0,1,nil) end) + e1:SetCost(aux.selfbanishcost) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Apply "Your opponent cannot activate cards or effects in response to the activation of your Continuous Trap Cards and their effects effects this turn" effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) + --Place up to 2 "ARG☆S" Continuous Traps with different names from your hand and/or Deck face-up in your Spell & Trap Zone + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCost(aux.selfbanishcost) + e3:SetTarget(s.pltg) + e3:SetOperation(s.plop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ARGOSTARS} +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackAbove,1),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local tc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAttackAbove,1),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if tc then + Duel.HintSelection(tc) + --Change its ATK to 0 until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + local c=e:GetHandler() + --Your opponent cannot activate cards or effects in response to the activation of your Continuous Trap Cards and their effects this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAINING) + e1:SetOperation(s.actop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) +end +function s.actop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if ep==tp and re:IsActiveType(TYPE_CONTINUOUS) and re:IsTrapEffect() then + Duel.SetChainLimit(function(e,rp,tp) return tp==rp end) + end +end +function s.plfilter(c) + return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and not c:IsForbidden() +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,math.min(ft,2),aux.dncheck,1,tp,HINTMSG_TOFIELD) + if #sg==0 then return end + for tc in sg:Iter() do + Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101207039.lua b/pre-release/c101207039.lua new file mode 100644 index 000000000..5d53c98fb --- /dev/null +++ b/pre-release/c101207039.lua @@ -0,0 +1,102 @@ +--クリスタルクリアウィング・オーバー・シンクロ・ドラゴン +--Crystal Clear Wing Over Synchro Dragon +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 2+ Tuners or 1 Tuner Synchro Monster + "Clear Wing Synchro Dragon" + local synchro_proc0=Synchro.AddProcedure(c,nil,2,99,aux.FilterSummonCode(82044279),1,1) + local synchro_proc1=Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO),1,1,aux.FilterSummonCode(82044279),1,1) + synchro_proc0:SetDescription(aux.Stringid(id,0)) + synchro_proc1:SetDescription(aux.Stringid(id,1)) + c:AddMustBeSynchroSummoned() + --Negate the activation of another card or effect and destroy it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --Special Summon 1 "Clear Wing" monster from your Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,3)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_LEAVE_FIELD) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Multiple Tuner check + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_MATERIAL_CHECK) + e3:SetValue(s.valcheck) + c:RegisterEffect(e3) +end +s.material={82044279} +s.listed_names={82044279} --"Clear Wing Synchro Dragon" +s.listed_series={SET_CLEAR_WING} +s.synchro_nt_required=1 +s.synchro_tuner_required=1 +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + local rc=re:GetHandler() + if chk==0 then return rc~=e:GetHandler() end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then + local atk=rc:IsMonster() and rc:GetTextAttack() or 0 + if atk<0 then atk=0 end + local c=e:GetHandler() + if Duel.Destroy(rc,REASON_EFFECT)>0 and atk>0 and c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains ATK equal to that monster's original ATK until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(atk) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:RegisterEffect(e1) + end + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousPosition(POS_FACEUP) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsPreviousControler(tp) and rp==1-tp +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_CLEAR_WING) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 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.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.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_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.valcheck(e,c) + local g=c:GetMaterial() + if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_MULTIPLE_TUNERS) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD)|RESET_PHASE|PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101207040.lua b/pre-release/c101207040.lua new file mode 100644 index 000000000..693e3cd3d --- /dev/null +++ b/pre-release/c101207040.lua @@ -0,0 +1,76 @@ +--HSRグライダー2 +--Hi-Speedroid Glider 2 +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 WIND Machine Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,s.tunerfilter,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 non-Tuner Level 7 or lower WIND Synchro Monster from your 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_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Increase the Levels of all face-up monsters your opponent controls by 5 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e2:SetCost(aux.selfbanishcost) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLEAR_WING} +function s.tunerfilter(c,scard,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_WIND,scard,sumtype,tp) and c:IsRace(RACE_MACHINE,scard,sumtype,tp) +end +function s.spfilter(c,e,tp) + return not c:IsType(TYPE_TUNER) and c:IsLevelBelow(7) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.HasLevel),tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CLEAR_WING),tp,LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,5) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.HasLevel),tp,0,LOCATION_MZONE,nil) + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + --Increase its Level by 5 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(5) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101207058.lua b/pre-release/c101207058.lua new file mode 100644 index 000000000..dfdefc577 --- /dev/null +++ b/pre-release/c101207058.lua @@ -0,0 +1,96 @@ +--ARG☆S-HomeStadium +--ARG☆S - Home Stadium +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Add 1 "ARG☆S" card from your GY or banishment to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1) + e1:SetCost(s.thcost) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Each time a Continuous Trap(s) is Special Summoned from the Spell & Trap Zone to your field, inflict 500 damage to your opponent + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_FZONE) + e2:SetCondition(s.damcon) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) + --Negate the effects 1 face-up card your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e3:SetCondition(s.discon) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ARGOSTARS} +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckLPCost(tp,1000) end + Duel.PayLPCost(tp,1000) +end +function s.thfilter(c) + return c:IsSetCard(SET_ARGOSTARS) and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.damconfilter(c,tp) + return c:IsContinuousTrap() and c:IsFaceup() and c:IsControler(tp) +end +function s.damcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.damconfilter,1,nil,tp) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_CARD,0,id) + Duel.Damage(1-tp,500,REASON_EFFECT) +end +function s.disconfilter(c) + return c:IsSetCard(SET_ARGOSTARS) and c:IsMonster() and c:IsFaceup() +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local trig_ctrl,trig_type,trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_LOCATION) + return trig_ctrl==tp and trig_type&(TYPE_TRAP|TYPE_CONTINUOUS)>0 and trig_loc==LOCATION_MZONE + and Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_REMOVED,0,1,nil) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + --Negate its effects until the end of this turn + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END,true) + end +end \ No newline at end of file diff --git a/pre-release/c101207068.lua b/pre-release/c101207068.lua new file mode 100644 index 000000000..6d99cdb5d --- /dev/null +++ b/pre-release/c101207068.lua @@ -0,0 +1,66 @@ +--SR/CWW +--Speedroid Clear Wing Wander +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Destroy cards your opponent controls up to the number of different Monster Types among the WIND Synchro Monsters you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Banish 1 WIND Synchro monster you control, then return it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e2:SetCost(aux.selfbanishcost) + e2:SetTarget(s.rmvrettg) + e2:SetOperation(s.rmvretop) + c:RegisterEffect(e2) +end +function s.windsynchrofilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + local ct=Duel.GetMatchingGroup(s.windsynchrofilter,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace) + if chk==0 then return ct>0 and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetTargetCards(e) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end +function s.rmvretfilter(c,tp) + return s.windsynchrofilter(c) and c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0 +end +function s.rmvrettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.rmvretfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.rmvretfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,s.rmvretfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmvretop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Remove(tc,nil,REASON_EFFECT|REASON_TEMPORARY)>0 and tc:IsLocation(LOCATION_REMOVED) + and not tc:IsReason(REASON_REDIRECT) then + Duel.BreakEffect() + Duel.ReturnToField(tc) + end +end \ No newline at end of file diff --git a/pre-release/c101207071.lua b/pre-release/c101207071.lua new file mode 100644 index 000000000..8063fb32d --- /dev/null +++ b/pre-release/c101207071.lua @@ -0,0 +1,94 @@ +--ARG☆S-紫電のテュデル +--ARG☆S - Tydel the Purple Lightning +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e0) + --Warrior monsters you control gain 500 ATK/DEF + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_SZONE) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(function(e,c) return c:IsRace(RACE_WARRIOR) end) + e1a:SetValue(500) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --Special Summon this card as an Effect Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_ARGOSTARS} +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:HasFlagEffect(id) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,2000,2000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END&~(RESET_TOFIELD|RESET_LEAVE),0,1) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c) + return c:IsSetCard(SET_ARGOSTARS) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,2000,2000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT)) then return end + c:AddMonsterAttribute(TYPE_EFFECT|TYPE_TRAP) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + --You can place this card in your Spell & Trap Zone face-up + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + c:AddMonsterAttributeComplete() + if Duel.SpecialSummonComplete()<1 then return end + --You can add 1 "ARG☆S" card, except "ARG☆S - Tydel the Purple Lightning", from your Deck to your hand + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101207072.lua b/pre-release/c101207072.lua new file mode 100644 index 000000000..692d4eeec --- /dev/null +++ b/pre-release/c101207072.lua @@ -0,0 +1,80 @@ +--ARG☆S-飛燕のカパネ +--ARG☆S - Capane the Flying Swallow +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e0) + --Your Warrior monsters cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsRace(RACE_WARRIOR) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card as an Effect Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCost(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsContinuousTrap),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARGOSTARS} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:HasFlagEffect(id) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1800,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END&~(RESET_TOFIELD|RESET_LEAVE),0,1) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) +end +function s.argosfilter(c) + return c:IsSetCard(SET_ARGOSTARS) and c:IsMonster() and c:IsFaceup() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1800,4,RACE_WARRIOR,ATTRIBUTE_LIGHT)) then return end + c:AddMonsterAttribute(TYPE_EFFECT|TYPE_TRAP) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + --You can place this card in your Spell & Trap Zone face-up + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + c:AddMonsterAttributeComplete() + --Gain 500 LP + if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(s.argosfilter,tp,LOCATION_REMOVED,0,1,nil) then + Duel.BreakEffect() + Duel.Recover(tp,500,REASON_EFFECT) + end +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101207073.lua b/pre-release/c101207073.lua new file mode 100644 index 000000000..bd058df09 --- /dev/null +++ b/pre-release/c101207073.lua @@ -0,0 +1,85 @@ +--ARG☆S-屠龍のエテオ +--ARG☆S - Eteo the Dragon Slayer +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e0) + --Warrior monsters you control cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsRace(RACE_WARRIOR) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card as an Effect Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCost(function(e,tp,eg,ep) return ep==1-tp end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARGOSTARS} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:HasFlagEffect(id) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,800,800,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END&~(RESET_TOFIELD|RESET_LEAVE),0,1) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.argosfilter(c) + return c:IsSetCard(SET_ARGOSTARS) and c:IsMonster() and c:IsFaceup() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,800,800,4,RACE_WARRIOR,ATTRIBUTE_LIGHT)) then return end + c:AddMonsterAttribute(TYPE_EFFECT|TYPE_TRAP) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + --You can place this card in your Spell & Trap Zone face-up + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + c:AddMonsterAttributeComplete() + if Duel.SpecialSummonComplete()<1 or not Duel.IsExistingMatchingCard(s.argosfilter,tp,LOCATION_REMOVED,0,1,nil) then return end + --You can return 1 card on the field to the hand + local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.HintSelection(sg) + Duel.BreakEffect() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + end +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end \ No newline at end of file