From acfb24429be10a2ba3e17968cf9cb56a1c9b0a42 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 9 Feb 2026 13:30:13 +0200 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c100200284.lua | 81 -------------------- pre-release/c100451001.lua | 73 ------------------ pre-release/c100451002.lua | 97 ----------------------- pre-release/c100451004.lua | 74 ------------------ pre-release/c100451006.lua | 80 ------------------- pre-release/c100451007.lua | 89 --------------------- pre-release/c100451008.lua | 84 -------------------- pre-release/c100451010.lua | 104 ------------------------- pre-release/c100451011.lua | 71 ----------------- pre-release/c100451013.lua | 130 ------------------------------- pre-release/c100451014.lua | 121 ----------------------------- pre-release/c100451016.lua | 74 ------------------ pre-release/c100451017.lua | 119 ----------------------------- pre-release/c100451019.lua | 90 ---------------------- pre-release/c100451025.lua | 112 --------------------------- pre-release/c100451026.lua | 153 ------------------------------------- pre-release/c100452001.lua | 94 ----------------------- pre-release/c100452002.lua | 111 --------------------------- pre-release/c100452004.lua | 69 ----------------- pre-release/c100452006.lua | 87 --------------------- pre-release/c100452007.lua | 94 ----------------------- pre-release/c100452009.lua | 100 ------------------------ pre-release/c100452010.lua | 97 ----------------------- pre-release/c100452012.lua | 93 ---------------------- pre-release/c100452013.lua | 76 ------------------ pre-release/c100452014.lua | 80 ------------------- pre-release/c100452016.lua | 77 ------------------- pre-release/c100452017.lua | 94 ----------------------- pre-release/c100452024.lua | 76 ------------------ pre-release/c100452025.lua | 94 ----------------------- pre-release/c100454001.lua | 97 ----------------------- pre-release/c100454002.lua | 84 -------------------- pre-release/c101303081.lua | 113 --------------------------- pre-release/c101303082.lua | 99 ------------------------ pre-release/c101303083.lua | 69 ----------------- pre-release/c101303084.lua | 85 --------------------- pre-release/c101303085.lua | 84 -------------------- pre-release/c101303086.lua | 60 --------------- pre-release/c101303087.lua | 73 ------------------ pre-release/c101303088.lua | 97 ----------------------- pre-release/c101303089.lua | 88 --------------------- pre-release/c101303090.lua | 97 ----------------------- pre-release/c101303091.lua | 81 -------------------- pre-release/c101303092.lua | 80 ------------------- pre-release/c101303093.lua | 72 ----------------- pre-release/c101303094.lua | 107 -------------------------- pre-release/c101303095.lua | 104 ------------------------- pre-release/c101303096.lua | 52 ------------- 48 files changed, 4336 deletions(-) delete mode 100644 pre-release/c100200284.lua delete mode 100644 pre-release/c100451001.lua delete mode 100644 pre-release/c100451002.lua delete mode 100644 pre-release/c100451004.lua delete mode 100644 pre-release/c100451006.lua delete mode 100644 pre-release/c100451007.lua delete mode 100644 pre-release/c100451008.lua delete mode 100644 pre-release/c100451010.lua delete mode 100644 pre-release/c100451011.lua delete mode 100644 pre-release/c100451013.lua delete mode 100644 pre-release/c100451014.lua delete mode 100644 pre-release/c100451016.lua delete mode 100644 pre-release/c100451017.lua delete mode 100644 pre-release/c100451019.lua delete mode 100644 pre-release/c100451025.lua delete mode 100644 pre-release/c100451026.lua delete mode 100644 pre-release/c100452001.lua delete mode 100644 pre-release/c100452002.lua delete mode 100644 pre-release/c100452004.lua delete mode 100644 pre-release/c100452006.lua delete mode 100644 pre-release/c100452007.lua delete mode 100644 pre-release/c100452009.lua delete mode 100644 pre-release/c100452010.lua delete mode 100644 pre-release/c100452012.lua delete mode 100644 pre-release/c100452013.lua delete mode 100644 pre-release/c100452014.lua delete mode 100644 pre-release/c100452016.lua delete mode 100644 pre-release/c100452017.lua delete mode 100644 pre-release/c100452024.lua delete mode 100644 pre-release/c100452025.lua delete mode 100644 pre-release/c100454001.lua delete mode 100644 pre-release/c100454002.lua delete mode 100644 pre-release/c101303081.lua delete mode 100644 pre-release/c101303082.lua delete mode 100644 pre-release/c101303083.lua delete mode 100644 pre-release/c101303084.lua delete mode 100644 pre-release/c101303085.lua delete mode 100644 pre-release/c101303086.lua delete mode 100644 pre-release/c101303087.lua delete mode 100644 pre-release/c101303088.lua delete mode 100644 pre-release/c101303089.lua delete mode 100644 pre-release/c101303090.lua delete mode 100644 pre-release/c101303091.lua delete mode 100644 pre-release/c101303092.lua delete mode 100644 pre-release/c101303093.lua delete mode 100644 pre-release/c101303094.lua delete mode 100644 pre-release/c101303095.lua delete mode 100644 pre-release/c101303096.lua diff --git a/pre-release/c100200284.lua b/pre-release/c100200284.lua deleted file mode 100644 index e3d425e730..0000000000 --- a/pre-release/c100200284.lua +++ /dev/null @@ -1,81 +0,0 @@ ---憑依共鳴-ウィン ---Possessed Resonance - Wynn ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Spellcaster monster + 1 WIND monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WIND)) - --If this card is Fusion Summoned: You can place 1 WIND monster from your GY on the bottom of the Deck, then target 1 monster your opponent controls; take control of it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) - e1:SetCost(s.controlcost) - e1:SetTarget(s.controltg) - e1:SetOperation(s.controlop) - c:RegisterEffect(e1) - --During your opponent's turn (Quick Effect): You can target 2 cards on the field, including a WIND monster you control; place them on the bottom of the Deck in any order - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_FAMILIAR_POSSESSED} -function s.controlcostfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToDeckAsCost() -end -function s.controlcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.controlcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.controlcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST) -end -function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) -end -function s.controlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.GetControl(tc,tp) - end -end -function s.resconfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsControler(tp) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(s.resconfilter,1,nil,tp) -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end - local g=Duel.GetTargetGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TODECK) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,2,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)==2 - and tg:GetClassCount(Card.GetControler)==1 then - Duel.SortDeckbottom(tp,tg:GetFirst():GetControler(),2) - end -end \ No newline at end of file diff --git a/pre-release/c100451001.lua b/pre-release/c100451001.lua deleted file mode 100644 index 1aa75dcfbc..0000000000 --- a/pre-release/c100451001.lua +++ /dev/null @@ -1,73 +0,0 @@ ---王のしもべ-ブラック・マジシャン ---Dark Magician, the Pharaoh's Servant ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Change name - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e1:SetValue(CARD_DARK_MAGICIAN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.Reveal(function(c) return c:IsSpell() end)) - e2:SetTarget(s.hsptg) - e2:SetOperation(s.hspop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetCost(Cost.Discard(function(c) return c:IsSpell() end)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) - c:RegisterEffect(e3) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.setfilter(c) - return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and c:IsSSetable() -end -function s.hspop(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 then - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SSet(tp,sg) - end - end - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100451002.lua b/pre-release/c100451002.lua deleted file mode 100644 index 266435ccd2..0000000000 --- a/pre-release/c100451002.lua +++ /dev/null @@ -1,97 +0,0 @@ ---増殖するクリボー! ---Multiplying Kuriboh! ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect, or an opponent's monster declares an attack (Quick Effect): You can Special Summon this card from your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1a:SetType(EFFECT_TYPE_QUICK_O) - e1a:SetCode(EVENT_CHAINING) - e1a:SetRange(LOCATION_HAND) - e1a:SetCountLimit(1,id) - e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() end) - e1a:SetTarget(s.selfsptg) - e1a:SetOperation(s.selfspop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_ATTACK_ANNOUNCE) - e1b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - c:RegisterEffect(e1b) - --Once per turn, when your opponent activates a monster effect on the field, or during damage calculation, when an opponent's monster attacks (Quick Effect): You can add to your hand, or Special Summon, 1 "Dark Magician" or 1 monster with 300 ATK/200 DEF from your Deck or GY, then you can change that opponent's monster's ATK to 0 - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e2a:SetType(EFFECT_TYPE_QUICK_O) - e2a:SetCode(EVENT_CHAINING) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_MZONE>0 end) - e2a:SetTarget(s.thsptg) - e2a:SetOperation(s.thspop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - c:RegisterEffect(e2b) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thspfilter(c,e,tp,mmz_chk) - return (c:IsCode(CARD_DARK_MAGICIAN) or (c:IsAttack(300) and c:IsDefense(200))) and (c:IsAbleToHand() - or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,mmz_chk) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not sc then return end - local res=aux.ToHandOrElse(sc,tp, - function() return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function() return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,3) - ) - if res==0 then return end - if sc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end - local opp_card=nil - local relation_chk=false - if not Duel.IsDamageStep() then - opp_card=re:GetHandler() - relation_chk=opp_card:IsRelateToEffect(re) - else - opp_card=Duel.GetAttacker() - relation_chk=opp_card:IsRelateToBattle() - end - if relation_chk and opp_card:IsFaceup() and opp_card:IsControler(1-tp) and not opp_card:IsAttack(0) - and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.BreakEffect() - --Change that opponent's monster's ATK to 0 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - opp_card:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100451004.lua b/pre-release/c100451004.lua deleted file mode 100644 index 94070de536..0000000000 --- a/pre-release/c100451004.lua +++ /dev/null @@ -1,74 +0,0 @@ ---F・HERO シャイニング・フレア・ウィングマン ---Favorite HERO Shining Flare Wingman ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Fusion Monster + 1 face-up monster on the field - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),s.matfilter) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW|CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) - --Inflict damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdcon) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.matfilter(c) - return c:IsFaceup() and c:IsOnField() -end -function s.tdfilter(c) - return c:IsMonster() and c:IsAbleToDeck() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) - and Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) - if #g~=5 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 then - if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - Duel.BreakEffect() - if Duel.Draw(p,d,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then - c:UpdateAttack(1000) - end - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c100451006.lua b/pre-release/c100451006.lua deleted file mode 100644 index cd0c62ba51..0000000000 --- a/pre-release/c100451006.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ハネクリボー・サバティエル LV10 ---Winged Kuriboh Sabatiel LV10 ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand and pay half your LP; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck to your hand, and if you do, shuffle this card into the Deck, also you cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.AND(Cost.SelfReveal,Cost.PayLP(1/2))) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --During your opponent's turn, if your LP are 1000 or less (Quick Effect): You can Special Summon this card from your hand, then you can inflict damage to your opponent equal to the highest ATK among the monsters they control (your choice, if tied) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.GetLP(tp)<=1000 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.LVnum=10 -s.LVset=SET_WINGED_KURIBOH -s.listed_series={SET_FUSION,SET_HERO} -function s.thfilter(c) - return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -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 then - local _,dam=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) - if dam and dam>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451007.lua b/pre-release/c100451007.lua deleted file mode 100644 index 1f8566084b..0000000000 --- a/pre-release/c100451007.lua +++ /dev/null @@ -1,89 +0,0 @@ ---スターダスト・ドラゴン-ヴィクテム・サンクチュアリ ---Stardust Dragon - Victim Sanctuary ---scripted by pyrQ -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) - --When your opponent activates a card or effect in response to your card or effect activation (Quick Effect): You can Tribute this card; negate that opponent's effect, and if you do, destroy that card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.discon) - e1:SetCost(Cost.AND(aux.StardustCost,Cost.HardOncePerChain(id))) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --If a monster(s) in your possession was Tributed this turn (Quick Effect): You can banish this card from your GY; Special Summon 1 "Stardust" Synchro Monster from your Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id+100) end) - e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.HardOncePerChain(id))) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) - --Keep track of monsters being Tributed - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_RELEASE) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_STARDUST} -function s.checkfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(s.checkfilter,nil) - if g:IsExists(Card.IsPreviousControler,1,nil,0) then - Duel.RegisterFlagEffect(0,id+100,RESET_PHASE|PHASE_END,0,1) - end - if g:IsExists(Card.IsPreviousControler,1,nil,1) then - Duel.RegisterFlagEffect(1,id+100,RESET_PHASE|PHASE_END,0,1) - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local ch=Duel.GetCurrentChain()-1 - return ch>0 and ep==1-tp and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER)==tp and Duel.IsChainDisablable(ev) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_STARDUST) and c:IsSynchroMonster() 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 \ No newline at end of file diff --git a/pre-release/c100451008.lua b/pre-release/c100451008.lua deleted file mode 100644 index a32e949b6a..0000000000 --- a/pre-release/c100451008.lua +++ /dev/null @@ -1,84 +0,0 @@ ---スタージャンク・シンクロン ---Starjunk Synchron -local s,id=GetID() -function s.initial_effect(c) - --For a Synchro Summon, you can substitute this card for any 1 "Synchron" Tuner ("Quickdraw Synchron") - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(20932152) - c:RegisterEffect(e0) - --If this card is in your hand: You can target 1 Level 2 or lower monster in your GY; Special Summon this card, and if you do, Special Summon that monster, but negate its effects, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --You can banish this card from your GY; "Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SYNCHRON} -s.listed_names={CARD_JUNK_WARRIOR} -function s.spfilter(c,e,tp) - return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - local c=e:GetHandler() - if chk==0 then return Duel.GetMZoneCount(tp)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - 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:AddCard(c),2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(c) - end - Duel.SpecialSummonComplete() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --"Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(LOCATION_ONFIELD,0) - e1:SetTarget(function(e,c) return c:IsCode(CARD_JUNK_WARRIOR) and c:IsFaceup() end) - e1:SetValue(aux.indoval) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100451010.lua b/pre-release/c100451010.lua deleted file mode 100644 index 7df68f2449..0000000000 --- a/pre-release/c100451010.lua +++ /dev/null @@ -1,104 +0,0 @@ ---No.39 光の使者 希望皇ホープ ---Number 39: Utopia the Envoy of Light ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters - Xyz.AddProcedure(c,nil,4,2) - --Cannot be destroyed by battle, except with a "Number" monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) - c:RegisterEffect(e1) - --(Quick Effect): You can detach 1 material from this card, then target 1 monster you control; the first time it would be destroyed by battle or card effect this turn, it is not destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.DetachFromSelf(1)) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) - --When the second attack of this turn is declared: You can make this card gain 2500 ATK, and if you do, it gains this effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(function() return Duel.GetFlagEffect(0,id)==1 end) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) - --Keep track of attacks being declared - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_NUMBER} -s.xyz_number=39 -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - --The first time it would be destroyed by battle or card effect this turn, it is not destroyed - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3001) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(s.indesval) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.indesval(e,re,r,rp) - if r&(REASON_BATTLE|REASON_EFFECT)>0 then - e:Reset() - return true - end - return false -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --This card gains 2500 ATK - c:UpdateAttack(2500) - --When this card destroys a monster by battle and sends it to the GY: You can Special Summon it to your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdgcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100451011.lua b/pre-release/c100451011.lua deleted file mode 100644 index 06d2747b3e..0000000000 --- a/pre-release/c100451011.lua +++ /dev/null @@ -1,71 +0,0 @@ ---ガガガマジシャン-ガガガマジック ---Gagaga Magician - Gagaga Magic ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can Special Summon both it and 1 other "Zubaba", "Gagaga", "Gogogo", or "Dododo" monster from your hand or GY, except "Gagaga Magician - Gagaga Magic", and if you do, immediately after this effect resolves, Xyz Summon 1 "Zubaba", "Gagaga", "Gogogo", "Dododo", "Djinn", "Heroic Champion", "Number", "ZW -", or "ZS -" Xyz Monster using only those 2 monsters. When you do, treat the Level of 1 of the monsters the same as the other monster's - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS} -s.listed_names={id} -local function samexyzlevel(handler,mc,lv) - --When you do, treat the Level of 1 of the monsters the same as the other monster's - local e1=Effect.CreateEffect(handler) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - mc:RegisterEffect(e1,true) - return e1 -end -function s.handgyspfilter(c,e,tp,mc) - if c:IsCode(id) then return false end - if not (c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - local e1=samexyzlevel(c,c,mc:GetLevel()) - local e2=samexyzlevel(c,mc,c:GetLevel()) - local res=Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(mc,c)) - if e1 then e1:Reset() end - if e2 then e2:Reset() end - return res -end -function s.extraspfilter(c,e,tp,mg) - return c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS}) - and c:IsXyzMonster() and c:IsXyzSummonable(nil,mg,2,2) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetMZoneCount(tp)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.handgyspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,c,e,tp,c) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>=2) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.handgyspfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,c):GetFirst() - if not sc then return end - local g=Group.FromCards(c,sc) - if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then - local e1=samexyzlevel(c,c,sc:GetLevel()) - local e2=samexyzlevel(c,sc,c:GetLevel()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g):GetFirst() - if xyz then - Duel.XyzSummon(tp,xyz,g,nil,2,2) - else - if e1 then e1:Reset() end - if e2 then e2:Reset() end - end - end -end \ No newline at end of file diff --git a/pre-release/c100451013.lua b/pre-release/c100451013.lua deleted file mode 100644 index 5aa26c910d..0000000000 --- a/pre-release/c100451013.lua +++ /dev/null @@ -1,130 +0,0 @@ ---四天の龍 オッドアイズ・ペンデュラム・ドラゴン ---Odd-Eyes Pendulum Dragon of the Four Heavenly Dragons ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --search and destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY|CATEGORY_TOHAND|CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - e2:SetValue(s.atkval) - c:RegisterEffect(e2) - --double damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - c:RegisterEffect(e3) - --to hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.thcon2) - e4:SetTarget(s.thtg2) - e4:SetOperation(s.thop2) - c:RegisterEffect(e4) -end -function s.thfilter(c) - return c:IsPendulumMonster() and c:IsAttackBelow(1500) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetLabelObject(e1) - e0:SetOperation(s.checkop) - e0:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e0,tp) -end -function s.actlimit(e,re) - local rc=re:GetHandler() - return rc and rc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() -end -function s.psfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local ef=e:GetLabelObject() - if ef and eg and eg:IsExists(s.psfilter,1,nil,tp) then - ef:Reset() - e:Reset() - end -end -function s.atkval(e,c) - local pg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_PZONE,0) - if #pg~=2 then return 0 end - local pc1,pc2=pg:GetFirst(),pg:GetNext() - return math.abs(pc1:GetScale()-pc2:GetScale())*300 -end -function s.thcon2(e,tp,eg,ep,ev,re,r,rp) - return r&(REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - if rp==1-tp then - e:SetLabel(1) - else - e:SetLabel(0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - if e:GetLabel()==1 then - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) - end -end -function s.thop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 - and e:GetLabel()==1 and c:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451014.lua b/pre-release/c100451014.lua deleted file mode 100644 index 3b6209cf6f..0000000000 --- a/pre-release/c100451014.lua +++ /dev/null @@ -1,121 +0,0 @@ ---星読みの魔術師-ホロスコープ・マジシャン ---Horoscope Sorcerer, the Stargazer Magician ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --When a Spell Card or effect activated by your opponent resolves, if you control a "Magician" Pendulum Monster or "Odd-Eyes" monster, you can negate that effect, then destroy this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_PZONE) - e1:SetCondition(s.discon) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --You can discard 1 other "Magician" Pendulum Monster, "Performapal" monster, or "Odd-Eyes" monster; Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.Discard(s.spcostfilter,true)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --If this card is Special Summoned: You can add 1 Pendulum Monster with 2500 ATK from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.deckthtg) - e3:SetOperation(s.deckthop) - c:RegisterEffect(e3) - --You can target 1 Pendulum Monster Card you control; destroy it, then you can add 1 face-up Pendulum Monster from your Extra Deck to your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,2}) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_series={SET_MAGICIAN,SET_ODD_EYES,SET_PERFORMAPAL} -function s.disconfilter(c) - return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard(SET_ODD_EYES)) and c:IsFaceup() -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,3)) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.Hint(HINT_CARD,0,id) - if Duel.NegateEffect(ev) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end -function s.spcostfilter(c) - return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard({SET_ODD_EYES,SET_PERFORMAPAL})) and c:IsMonster() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.deckthfilter(c) - return c:IsPendulumMonster() and c:IsAttack(2500) and c:IsAbleToHand() -end -function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.deckthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsType(TYPE_PENDULUM) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) -end -function s.extrathfilter(c) - return c:IsPendulumMonster() and c:IsFaceup() and c:IsAbleToHand() -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(s.extrathfilter,tp,LOCATION_EXTRA,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.extrathfilter,tp,LOCATION_EXTRA,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451016.lua b/pre-release/c100451016.lua deleted file mode 100644 index ceef53244d..0000000000 --- a/pre-release/c100451016.lua +++ /dev/null @@ -1,74 +0,0 @@ ---デコード・トーカー・インテグレーション ---Decode Talker Integration ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_EMZONE) - e1:SetValue(s.atkval) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_EMZONE) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetCost(s.cost) - e3:SetTarget(s.target) - e3:SetOperation(s.operation) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsLinkMonster,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,e:GetHandler())*500 -end -function s.cfilter(c,g) - return g:IsContains(c) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local lg=e:GetHandler():GetLinkedGroup() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,lg) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,lg) - Duel.Release(g,REASON_COST) -end -function s.filter(c) - return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil) - if #g==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100451017.lua b/pre-release/c100451017.lua deleted file mode 100644 index 60c06594ae..0000000000 --- a/pre-release/c100451017.lua +++ /dev/null @@ -1,119 +0,0 @@ ---サイバース・コード・マジシャン ---Cyberse Code Magician ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --If a Link Monster you control would be used as Link Material for a Cyberse monster, this card in your hand can also be used as material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_EXTRA_MATERIAL) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(1,0) - e1:SetOperation(s.extracon) - e1:SetValue(s.extraval) - c:RegisterEffect(e1) - if s.flagmap1==nil then - s.flagmap1={} - end - if s.flagmap1[c]==nil then - s.flagmap1[c] = {} - end - --If this card is sent from the hand or field to the GY: You can send 1 Cyberse monster from your Deck to the GY, or if this Ritual Summoned card was sent to the GY, you can Special Summon that monster instead, also in either case, you cannot Special Summon for the rest of this turn, except Cyberse monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end) - e2:SetTarget(s.tgsptg) - e2:SetOperation(s.tgspop) - c:RegisterEffect(e2) -end -s.listed_names={34767865} --"Cynet Ritual" -function s.extrafilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function s.extracon(c,e,tp,sg,mg,lc,og,chk) - return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsLinkMonster,1,og) and - sg:FilterCount(Card.HasFlagEffect,nil,id)<2 -end -function s.extraval(chk,summon_type,e,...) - local c=e:GetHandler() - if chk==0 then - local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsRace(RACE_CYBERSE) or Duel.GetFlagEffect(tp,id)>0 then - return Group.CreateGroup() - else - table.insert(s.flagmap1[c],c:RegisterFlagEffect(id,0,0,1)) - return Group.FromCards(c) - end - elseif chk==1 then - local sg,sc,tp=... - if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then - Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - end - elseif chk==2 then - for _,eff in ipairs(s.flagmap1[c]) do - eff:Reset() - end - s.flagmap1[c]={} - end -end -function s.tgspfilter(c,e,tp,mmz_ritsum_chk) - return c:IsRace(RACE_CYBERSE) and (c:IsAbleToGrave() or (mmz_ritsum_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ritual_summoned_chk=e:GetHandler():IsRitualSummoned() - if chk==0 then - local mmz_ritsum_chk=ritual_summoned_chk and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.tgspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_ritsum_chk) - end - if not ritual_summoned_chk then - e:SetLabel(0) - e:SetCategory(CATEGORY_TOGRAVE) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - else - e:SetLabel(1) - e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - end -end -function s.tgspop(e,tp,eg,ep,ev,re,r,rp) - local mmz_ritsum_chk=e:GetLabel()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local hint=mmz_ritsum_chk and aux.Stringid(id,1) or HINTMSG_TOGRAVE - Duel.Hint(HINT_SELECTMSG,tp,hint) - local sc=Duel.SelectMatchingCard(tp,s.tgspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_ritsum_chk):GetFirst() - if sc then - local op=nil - if not mmz_ritsum_chk then - op=1 - else - local b1=sc:IsAbleToGrave() - local b2=sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - end - if op==1 then - Duel.SendtoGrave(sc,REASON_EFFECT) - elseif op==2 then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon for the rest of this turn, except Cyberse monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_CYBERSE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100451019.lua b/pre-release/c100451019.lua deleted file mode 100644 index d3ccd4dfdb..0000000000 --- a/pre-release/c100451019.lua +++ /dev/null @@ -1,90 +0,0 @@ ---黄泉天輪 ---Underworld Circle ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Allow each player to Special Summon 1 monster from their GY during the Standby Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,5,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_GRAVE,5,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spnormalfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - local rg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToRemove,Card.IsMonster),tp,LOCATION_DECK,LOCATION_DECK,nil) - if #rg==0 then return end - Duel.BreakEffect() - if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.ignoresumconsp(e,p) - if Duel.GetLocationCount(p,LOCATION_MZONE)==0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,p,LOCATION_GRAVE,0,nil,e,p) - if #g==0 or not Duel.SelectYesNo(p,aux.Stringid(id,3)) then return end - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) - local tc=g:Select(p,1,1,nil):GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,p,p,true,false,POS_FACEUP) then - --Banish it if it leaves the field - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - tc:RegisterEffect(e1,true) - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local turn_p=Duel.GetTurnPlayer() - s.ignoresumconsp(e,turn_p) - s.ignoresumconsp(e,1-turn_p) - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100451025.lua b/pre-release/c100451025.lua deleted file mode 100644 index 66b9443318..0000000000 --- a/pre-release/c100451025.lua +++ /dev/null @@ -1,112 +0,0 @@ ---大精霊機巧軍-ペンデュラム・ルーラー ---Master Spirit Tech Force - Pendulum Ruler ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c,false) - --Fusion Materials: 1 Level 7 or higher Pendulum Monster + 1 Pendulum Monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) - --During your Main Phase: You can return this card to the Extra Deck, then you can add 1 Level 7 Pendulum Monster from your Deck or face-up Extra Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.textg) - e1:SetOperation(s.texop) - c:RegisterEffect(e1) - --Cannot be destroyed by card effects - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Your opponent's monsters cannot attack, except Pendulum Monsters without a Level - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(function(e,c) return not (c:IsPendulumMonster() and not c:HasLevel()) end) - e3:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e3) - --You can Tribute 1 monster, then target 1 card your opponent controls; destroy it, and if you do, inflict 1600 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(2,{id,1}) - e4:SetCost(s.descost) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) - --Once per turn: You can place this card in your Pendulum Zone - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,2)) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e5:SetOperation(s.plop) - c:RegisterEffect(e5) -end -function s.matfilter(c,fc,sumtype,tp) - return c:IsLevelAbove(7) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) -end -function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.thfilter(c) - return c:IsLevel(7) and c:IsPendulumMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToHand() -end -function s.texop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.descostfilter(c,tp) - local exg=c:GetEquipGroup()+c - return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,exg) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,1,false,nil,nil,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,1,1,false,nil,nil,tp) - Duel.Release(g,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1600,REASON_EFFECT) - 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_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c100451026.lua b/pre-release/c100451026.lua deleted file mode 100644 index 012c754cab..0000000000 --- a/pre-release/c100451026.lua +++ /dev/null @@ -1,153 +0,0 @@ ---W:Pファンシーボール ---W:P Fancy Ball ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) - --When your opponent activates a monster effect on the field or GY (Quick Effect): You can banish this card that was Special Summoned this turn until the End Phase; negate that effect, and if you do, banish it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.discon) - e1:SetCost(s.discost) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --During your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Link Summon 1 Link Monster, and if this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) - e2:SetTarget(s.linktg) - e2:SetOperation(s.linkop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -function s.discon(e,tp,eg,ep,ev,re,r,rp,chk) - if not e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) then return false end - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_MZONE|LOCATION_GRAVE)>0 and Duel.IsChainDisablable(ev) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() end - --Banish this card until the End Phase - aux.RemoveUntil(c,nil,REASON_COST,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local rc=re:GetHandler() - local relation=rc:IsRelateToEffect(re) - if chk==0 then return rc:IsAbleToRemove(tp) - or (not relation and Duel.IsPlayerCanRemove(tp)) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - if relation then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,rc:GetPreviousLocation()) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end -function s.linktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_MATERIAL) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetOperation(s.extracon) - e1:SetValue(s.extraval) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - local res=Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil) - e1:Reset() - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetChainLimit(function(re,rp,tp) return not (re:IsMonsterEffect() and re:GetHandler():IsLinkMonster()) end) -end -function s.linkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=nil - if c:IsRelateToEffect(e) then - --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls - e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_MATERIAL) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetOperation(s.extracon) - e1:SetValue(s.extraval) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc then - Duel.LinkSummon(tp,sc) - if e1 then - local eff_code=Duel.GetCurrentChain()==1 and EVENT_SPSUMMON or EVENT_SPSUMMON_SUCCESS - --Reset e1 - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(eff_code) - e2:SetOperation(function(e) e1:Reset() e:Reset() end) - Duel.RegisterEffect(e2,tp) - end - elseif e1 then - e1:Reset() - end -end -function s.extracon(c,e,tp,sg,mg,lc,og,chk) - if not sg:IsContains(e:GetHandler()) then return false end - local g=Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) - if #g==0 then return true end - local max_count=1 - local must_include=Group.CreateGroup() - local effs={Duel.GetPlayerEffect(tp,EFFECT_EXTRA_MATERIAL)} - for _,eff in ipairs(effs) do - if not eff:GetOwner():IsCode(id) then - if #(eff:GetValue()(0,SUMMON_TYPE_LINK,eff,tp,lc))>0 then - local handler=eff:GetHandler() - must_include:Merge(handler) - if #(sg&must_include)>0 or lc==handler then - max_count=max_count+1 - end - end - end - end - return #(sg&g)>0 and #(sg&g)<=max_count -end -function s.extraval(chk,summon_type,e,...) - local c=e:GetHandler() - if chk==0 then - local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK then - return Group.CreateGroup() - else - return Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) - end - elseif chk==1 then - local sg,sc,tp=... - if summon_type&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK and #sg>0 then - Duel.Hint(HINT_CARD,tp,id) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452001.lua b/pre-release/c100452001.lua deleted file mode 100644 index 20708329b8..0000000000 --- a/pre-release/c100452001.lua +++ /dev/null @@ -1,94 +0,0 @@ ---白き幻獣-青眼の白龍 ---Blue-Eyes White Dragon, the White Phantom Beast ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When a card or effect is activated that targets this card on the field (Quick Effect): You can discard 1 card; negate that effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.discon) - e1:SetCost(Cost.Discard()) - e1:SetTarget(s.distg) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e1) - --When this card is added from the Deck to your hand, or your monster is destroyed by battle: You can reveal this card in your hand; Special Summon it - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_TO_HAND) - e2a:SetCountLimit(1,{id,0}) - e2a:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_DECK) end) - e2a:SetCost(Cost.SelfReveal) - e2a:SetTarget(s.sptg) - e2a:SetOperation(s.spop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2b:SetCode(EVENT_BATTLE_DESTROYED) - e2b:SetRange(LOCATION_HAND) - e2b:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsPreviousControler,1,nil,tp) end) - c:RegisterEffect(e2b) - --If this card is Special Summoned from the hand or Deck: You can destroy all monsters your opponent controls, also you cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND|LOCATION_DECK) end) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLUE_EYES} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(c) and Duel.IsChainDisablable(ev) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) - --You cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_BLUE_EYES) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100452002.lua b/pre-release/c100452002.lua deleted file mode 100644 index 63b89f84d8..0000000000 --- a/pre-release/c100452002.lua +++ /dev/null @@ -1,111 +0,0 @@ ---蒼の深淵 ディープアイズ・ホワイト・ドラゴン ---Deep-Eyes White Dragon, the Blue Abyss ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can discard this card; add 1 Level 1 LIGHT Tuner from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If a "Blue-Eyes" Ritual Monster(s) and/or "Blue-Eyes White Dragon" is sent to your GY: You can target 1 of them; Special Summon this card from your GY (if it was there when the monster was sent) or hand (even if not), and if you do, its ATK becomes that monster's, also banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_GRAVE|LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Keep track of "Blue-Eyes" Ritual Monsters and "Blue-Eyes White Dragon" sent to the GY - aux.GlobalCheck(s,function() - s.gygroup=Group.CreateGroup() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_TO_GRAVE) - ge1:SetOperation(s.regop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_BLUE_EYES} -s.listed_names={CARD_BLUEEYES_W_DRAGON} -function s.thfilter(c) - return c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.tgfilter(c,e) - return ((c:IsSetCard(SET_BLUE_EYES) and c:IsRitualMonster()) or c:IsCode(CARD_BLUEEYES_W_DRAGON)) - and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.tgfilter,nil,e) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - if Duel.GetCurrentChain()==0 then s.gygroup:Clear() end - s.gygroup:Merge(tg) - s.gygroup:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - Duel.RaiseEvent(s.gygroup,EVENT_CUSTOM+id,e,0,rp,ep,ev) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=s.gygroup:Filter(s.tgfilter,nil,e):Match(Card.IsControler,nil,tp) - if chkc then return g:IsContains(chkc) and chkc:IsControler(tp) and s.tgfilter(chkc,e) end - local c=e:GetHandler() - if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - --Its ATK becomes that monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - --Banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(3300) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetValue(LOCATION_REMOVED) - e2:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e2,true) - end -end \ No newline at end of file diff --git a/pre-release/c100452004.lua b/pre-release/c100452004.lua deleted file mode 100644 index d61e3dab89..0000000000 --- a/pre-release/c100452004.lua +++ /dev/null @@ -1,69 +0,0 @@ ---終撃竜-サイバー・エンド・ドラゴン ---Cyber End Dragon the Decisive Strike Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Machine monsters with 2100 or more ATK - Fusion.AddProcMixN(c,true,true,s.matfilter,3) - c:AddMustBeFusionSummoned() - --material check - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(s.valcheck) - c:RegisterEffect(e0) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e0:GetLabel()==1 end) - e1:SetCost(Cost.PayLP(4000)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --extra att - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EXTRA_ATTACK) - e3:SetCondition(s.atcon) - e3:SetValue(2) - c:RegisterEffect(e3) -end -s.listed_names={23171610} -function s.matfilter(c,sc,st,tp) - return c:IsRace(RACE_MACHINE,sc,st,tp) and c:IsAttackAbove(2100) -end -function s.valcheck(e,c) - local mg=c:GetMaterial() - e:SetLabel(mg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)==#mg and 1 or 0) -end -function s.thfilter(c) - return c:IsCode(23171610) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.atcon(e) - local c=e:GetHandler() - return c:GetAttack()>c:GetBaseAttack() -end \ No newline at end of file diff --git a/pre-release/c100452006.lua b/pre-release/c100452006.lua deleted file mode 100644 index 17bf1b8ee3..0000000000 --- a/pre-release/c100452006.lua +++ /dev/null @@ -1,87 +0,0 @@ ---未来融合-フューチャー・フュージョン・ノヴァ ---Future Fusion Nova ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: Fusion Summon 1 LIGHT Machine Fusion Monster from your Extra Deck, using monsters from your Deck, including "Cyber Dragon", also for the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters, also you cannot declare attacks, except with the Summoned monster - local fusion_params={ - handler=c, - fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) end, - matfilter=aux.FALSE, - extrafil=s.fextra, - extratg=s.extratg, - stage2=s.stage2 - } - local e1=Fusion.CreateSummonEff(fusion_params) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - c:RegisterEffect(e1) - --When this card leaves the field, destroy that monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_LEAVE_FIELD_P) - e2:SetOperation(function(e) e:SetLabel(e:GetHandler():IsDisabled() and 1 or 0) end) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(s.mondesop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --When that monster is destroyed, destroy this card - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(s.selfdescon) - e4:SetOperation(function(e) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end) - c:RegisterEffect(e4) -end -s.listed_names={CARD_CYBER_DRAGON} -function s.fcheck(tp,sg,fc) - return sg:IsExists(Card.IsCode,1,nil,CARD_CYBER_DRAGON) -end -function s.fextra(e,tp,mg1) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil),s.fcheck -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.stage2(e,fc,tp,sg,chk) - if chk==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then - local c=e:GetHandler() - c:SetCardTarget(fc) - --For the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_MACHINE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local fid=fc:GetFieldID() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --Also you cannot declare attacks, except with the Summoned monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(function(e,c) return c:GetFieldID()~=fid end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) - end -end -function s.mondesop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function s.selfdescon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end \ No newline at end of file diff --git a/pre-release/c100452007.lua b/pre-release/c100452007.lua deleted file mode 100644 index 75211ae5e5..0000000000 --- a/pre-release/c100452007.lua +++ /dev/null @@ -1,94 +0,0 @@ ---赤き竜-ケッツァーコアトル ---Crimson Dragon Quetzacoatl ---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) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.atkval) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOEXTRA|CATEGORY_NEGATE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.negcon) - e3:SetTarget(s.negtg) - e3:SetOperation(s.negop) - c:RegisterEffect(e3) -end -function s.spfilter(c,e,tp) - return c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),#g) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end - if ft>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.atkval(e,c) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()):GetSum(Card.GetBaseAttack) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and rp==1-tp and re:IsMonsterEffect() -end -function s.negfilter(c) - return c:IsFaceup() and c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.negfilter,tp,LOCATION_MZONE,0,1,1,exc) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then - Duel.NegateActivation(ev) - end -end \ No newline at end of file diff --git a/pre-release/c100452009.lua b/pre-release/c100452009.lua deleted file mode 100644 index 48f550cecd..0000000000 --- a/pre-release/c100452009.lua +++ /dev/null @@ -1,100 +0,0 @@ ---レッド・デーモンズ・チェーン ---Red Dragon Archfiend's Chain ---scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --You can activate this card the turn it was Set, by revealing 1 "Red Dragon Archfiend" in your Extra Deck - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e0:SetValue(function(e) e:SetLabel(1) end) - e0:SetCondition(function(e) return Duel.IsExistingMatchingCard(s.extracostfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,1,nil) end) - c:RegisterEffect(e0) - --Activate this card by revealing any number of monsters in your hand, then target Effect Monsters your opponent controls equal to the number of Tuners revealed +1; they lose 100 ATK for each card revealed, also their effects are negated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetLabelObject(e0) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --They lose 100 ATK for each card revealed - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.PersistentTargetFilter) - e2:SetValue(function() return e1:GetLabel()*-100 end) - c:RegisterEffect(e2) - --Also their effects are negated - local e3=e2:Clone() - e3:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.handcostfilter(c) - return c:IsMonster() and not c:IsPublic() -end -function s.rescon(max_target_count) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1<=max_target_count - end -end -function s.extracostfilter(c) - return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and not c:IsPublic() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local label_obj=e:GetLabelObject() - local hg=Duel.GetMatchingGroup(s.handcostfilter,tp,LOCATION_HAND,0,nil) - local max_target_count=Duel.GetTargetCount(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) - local rescon=s.rescon(max_target_count) - if chk==0 then label_obj:SetLabel(0) return #hg>0 and max_target_count>0 - and aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,0) end - if label_obj:GetLabel()>0 then - label_obj:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.extracostfilter,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleExtra(tp) - end - local sg=aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,1,tp,HINTMSG_CONFIRM,rescon) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - e:SetLabel(sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1,#sg) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsEffectMonster() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end - local target_count,reveal_count=e:GetLabel() - e:SetLabel(reveal_count) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,target_count,target_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) - if #tg>0 then - local c=e:GetHandler() - for tc in tg:Iter() do - c:SetCardTarget(tc) - end - --If the last of those monsters is not on the field, destroy this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(function(e) return #(e:GetHandler():GetCardTarget())==0 end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100452010.lua b/pre-release/c100452010.lua deleted file mode 100644 index b39ef063a8..0000000000 --- a/pre-release/c100452010.lua +++ /dev/null @@ -1,97 +0,0 @@ ---超銀河眼の光子龍-フォトン・ハウリング ---Neo Galaxy-Eyes Photon Dragon - Photon Howling ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 8 monsters OR 1 Rank 8 Xyz Monster - Xyz.AddProcedure(c,nil,8,3,s.altmatfilter,aux.Stringid(id,0),3,s.xyzop) - --Take 1 "Photon" monster from your Deck, and either Special Summon it in Defense Position or attach it to this card as material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetTarget(s.spattachtg) - e1:SetOperation(s.spattachop) - c:RegisterEffect(e1) - --Tribute 1 other Xyz Monster, and if you do, negate the effects of all other face-up cards currently on the field until the end of this turn. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.DetachFromSelf(3)) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_series={SET_PHOTON} -function s.altmatfilter(c,tp,xyzc) - return c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRank(8) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - return true -end -function s.spcheck(c,e,tp,mmz_chk) - return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.attachcheck(c,e,tp) - return c:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) -end -function s.spattachfilter(c,e,tp,mmz_chk) - return c:IsSetCard(SET_PHOTON) and c:IsMonster() and (s.spcheck(c,e,tp,mmz_chk) or s.attachcheck(c,e,tp)) -end -function s.spattachtg(e,tp,eg,ep,ev,re,r,rp,chk) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chk==0 then return Duel.IsExistingMatchingCard(s.spattachfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_chk) end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spattachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,s.spattachfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not sc then return end - local b1=s.spcheck(sc,e,tp,mmz_chk) - local b2=s.attachcheck(sc,e,tp) and c:IsRelateToEffect(e) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,4)}, --"Special Summon it in Defense Position" - {b2,aux.Stringid(id,5)}) --"Attach it to this card as material" - if op==1 then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - elseif op==2 then - Duel.Overlay(c,sc,true) - end -end -function s.xyzfilter(c,self_exc) - return c:IsXyzMonster() and c:IsReleasableByEffect() - and Duel.IsExistingMatchingCard(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,self_exc)) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,c,c) end - local g=Duel.GetMatchingGroup(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g-1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,exc,exc) - if not sc then return end - Duel.HintSelection(sc) - if Duel.Release(sc,REASON_EFFECT)>0 then - local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) - --Negate the effects of all other face-up cards currently on the field until the end of this turn - for tc in g:Iter() do - tc:NegateEffects(c,RESET_PHASE|PHASE_END) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452012.lua b/pre-release/c100452012.lua deleted file mode 100644 index 6ef4055a54..0000000000 --- a/pre-release/c100452012.lua +++ /dev/null @@ -1,93 +0,0 @@ ---GDロボ・オービタル 7 ---Galaxy Defense Robot Orbital 7 ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Tribute this card from your hand or field; take 1 "Photon" monster and 1 "Galaxy" monster from your Deck, add 1 of them to your hand, and send the other to the GY, also you cannot Special Summon for the rest of this turn, except LIGHT monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND|LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfTribute) - e1:SetTarget(s.thtgtg) - e1:SetOperation(s.thtgop) - c:RegisterEffect(e1) - --If a "Galaxy-Eyes" monster(s) is Special Summoned to your field: You can Special Summon this card from your GY, but banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_PHOTON,SET_GALAXY,SET_GALAXY_EYES} -function s.thtgfilter(c) - return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_PHOTON) and sg:IsExists(Card.IsSetCard,1,nil,SET_GALAXY) - and sg:IsExists(Card.IsAbleToHand,1,nil) and sg:IsExists(Card.IsAbleToGrave,1,nil) -end -function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then - local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) - return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.thtgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,2)) - if #sg==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg=sg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg) - Duel.SendtoGrave(sg-hg,REASON_EFFECT) - end - --You cannot Special Summon for the rest of this turn, except LIGHT monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsAttributeExcept(ATTRIBUTE_LIGHT) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spconfilter(c,tp) - return c:IsSetCard(SET_GALAXY_EYES) and c:IsControler(tp) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c100452013.lua b/pre-release/c100452013.lua deleted file mode 100644 index 8f7fb64afc..0000000000 --- a/pre-release/c100452013.lua +++ /dev/null @@ -1,76 +0,0 @@ ---四天の龍 スターヴ・ヴェノム・フュージョン・ドラゴン ---Starving Venom Fusion Dragon of the Four Heavenly Dragons ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 DARK monsters on the field - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - --atk to 0 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --fusion summon - local fusion_params={ - handler=c, - fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) end, - matfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsOnField() end, - extrafil=s.fextra, - gc=Fusion.ForcedHandler - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) -end -s.listed_series={SET_PREDAPLANT} -s.material_location=LOCATION_ONFIELD -function s.matfilter(c,fc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsOnField() -end -function s.atkfilter(c) - return c:IsFaceup() and (c:HasNonZeroAttack() or c:IsNegatableMonster() or c:IsAttributeExcept(ATTRIBUTE_DARK)) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:NegateEffects(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(ATTRIBUTE_DARK) - tc:RegisterEffect(e2) - end -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) -end \ No newline at end of file diff --git a/pre-release/c100452014.lua b/pre-release/c100452014.lua deleted file mode 100644 index 3a44abb117..0000000000 --- a/pre-release/c100452014.lua +++ /dev/null @@ -1,80 +0,0 @@ ---四天の龍 クリアウィング・シンクロ・ドラゴン ---Clear Wing Synchro Dragon of the Four Heavenly Dragons ---scripted by pyrQ -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) - --If this card is Special Summoned: You can destroy 1 Effect Monster your opponent controls, and if you do, this card gains ATK equal to that monster's original ATK - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --When your opponent activates a card or effect (Quick Effect): You can Special Summon 1 Level 4 or lower WIND Tuner from your hand or GY (but negate its effects), then immediately after this effect resolves, you can Synchro Summon 1 WIND Synchro Monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SPEEDROID} -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - local c=e:GetHandler() - local atk=g:GetFirst():GetBaseAttack() - if Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsFaceup() and atk>0 then - --This card gains ATK equal to that monster's original ATK - c:UpdateAttack(atk) - end -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_TUNER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.synchrofilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable() -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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(s.synchrofilter,tp,LOCATION_EXTRA,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local synchro=Duel.SelectMatchingCard(tp,s.synchrofilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if synchro then - Duel.SynchroSummon(tp,synchro) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452016.lua b/pre-release/c100452016.lua deleted file mode 100644 index 1e6cd93973..0000000000 --- a/pre-release/c100452016.lua +++ /dev/null @@ -1,77 +0,0 @@ ---ヴァレルロード・L・ドラゴン ---Borreload Liberator Dragon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 3+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) - --You can only Special Summon "Borreload Liberator Dragon(s)" once per turn - c:SetSPSummonOnce(id) - --Place 1 monster your opponent controls in a zone this card points to and take control of it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(function() return Duel.IsBattlePhase() end) - e1:SetTarget(s.controltg) - e1:SetOperation(s.controlop) - e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_PHASE|TIMING_BATTLE_END) - c:RegisterEffect(e1) - --Destroy 1 monster you control and Special Summon itself from the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) - c:RegisterEffect(e2) -end -function s.controlfilter(c,zones) - return c:IsControlerCanBeChanged(false,zones) -end -function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk) - local zones=e:GetHandler():GetLinkedZone()&ZONES_MMZ - if chk==0 then return Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil,zones) end - Duel.SetChainLimit(function(e,ep,tp) return tp==ep end) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function s.controlop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local zones=c:GetLinkedZone()&ZONES_MMZ - if not (c:IsRelateToEffect(e) and zones~=0) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil,zones) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp,0,0,zones) - end -end -function s.desfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100452017.lua b/pre-release/c100452017.lua deleted file mode 100644 index d698a1694b..0000000000 --- a/pre-release/c100452017.lua +++ /dev/null @@ -1,94 +0,0 @@ ---ヴァレット・バラージュ ---Rokket Barrage ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --You can send 1 DARK Dragon monster from your Deck to the GY, except a Level 5 monster; Special Summon this card from your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --When a Link Monster's effect is activated that targets this card on the field (Quick Effect): You can destroy this card, then Special Summon up to 1 "Rokket" monster each from your hand, Deck, GY, and/or banishment, except "Rokket Barrage" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_ROKKET} -function s.selfspcostfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and not c:IsLevel(5) and c:IsAbleToGraveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsAttributeExcept(ATTRIBUTE_DARK) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(e:GetHandler()) and re:GetHandler():IsLinkMonster() and re:IsMonsterEffect() -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) - and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) -end -local LOCATION_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND_DECK_GRAVE_REMOVED) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ft=Duel.GetMZoneCount(tp,c) - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and ft>0 then - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,nil,e,tp) - if #g==0 then return end - ft=math.min(ft,4) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLocation),1,tp,HINTMSG_SPSUMMON) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452024.lua b/pre-release/c100452024.lua deleted file mode 100644 index e41fcf7161..0000000000 --- a/pre-release/c100452024.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ガトリング・オーガ ---Gatling Ogre ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Inflict 800 damage to your damage for each facedow Spell/Trap Card sent to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(3,id) - e1:SetCost(s.damcost) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --When this card is targeted for an attack: Inflict 500 damage for each Attack Position monster they control, then end the Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.damendbptg) - e2:SetOperation(s.damendbpop) - c:RegisterEffect(e2) -end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,nil) - if chk==0 then return #g>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,1,#g,nil) - e:SetLabel(#g) - Duel.SendtoGrave(g,REASON_COST) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetLabel()*800 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - --Your opponent takes no damage from non-Fiend monsters' effects for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetTargetRange(0,1) - e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.damval(e,re,val,r,rp,rc) - if re and r&REASON_EFFECT>0 and re:IsMonsterEffect() and re:GetHandler():IsRaceExcept(RACE_FIEND) then - return 0 - else - return val - end -end -function s.damendbptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) - if chk==0 then return ct>0 end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) -end -function s.damendbpop(e,tp,eg,ep,ev,re,r,rp) - local dam=500*Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) - if dam>0 and Duel.Damage(1-tp,dam,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) - end -end \ No newline at end of file diff --git a/pre-release/c100452025.lua b/pre-release/c100452025.lua deleted file mode 100644 index c5bf946b79..0000000000 --- a/pre-release/c100452025.lua +++ /dev/null @@ -1,94 +0,0 @@ ---インフェルニティ・デス・ガンマン ---Infernity Doom Slinger ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --During your Main Phase: You can Special Summon 1 Fiend monster from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If you have no cards in your hand (Quick Effect): You can banish this card from your GY; your opponent chooses 1 of these effects for you to apply - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,4000) end) - e2:SetOperation(s.effop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local top_card=Duel.GetDecktopGroup(tp,1):GetFirst() - local b1=top_card - local b2=true - local op=Duel.SelectEffect(1-tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - local c=e:GetHandler() - if op==1 then - --Reveal the top card of your Deck, and if it is a monster, your opponent takes any effect damage you would have taken this turn instead. Otherwise, you take 4000 damage - Duel.ConfirmDecktop(tp,1) - if top_card:IsMonster() then - --Your opponent takes any effect damage you would have taken this turn instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(function(e,_,_,r) return (r&REASON_EFFECT)==REASON_EFFECT end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - else - Duel.Damage(tp,4000,REASON_EFFECT) - end - elseif op==2 then - --You take no effect damage this turn - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,5)) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2a:SetCode(EFFECT_CHANGE_DAMAGE) - e2a:SetTargetRange(1,0) - e2a:SetValue(s.damval) - e2a:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2a,tp) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_NO_EFFECT_DAMAGE) - Duel.RegisterEffect(e2b,tp) - end -end -function s.damval(e,re,val,r,rp,rc) - if (r&REASON_EFFECT)>0 then - return 0 - else - return val - end -end \ No newline at end of file diff --git a/pre-release/c100454001.lua b/pre-release/c100454001.lua deleted file mode 100644 index df9456a2d0..0000000000 --- a/pre-release/c100454001.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ブラック・ローズ・ドラゴン/バスター ---Black Rose Dragon/Assault Mode ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --If this card is destroyed: You can Special Summon 1 "Black Rose Dragon" 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_DELAY) - e1:SetCode(EVENT_DESTROYED) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --You can reveal this card in your hand; shuffle it into the Deck, and if you do, change the ATK of 1 face-up monster on the field to 0 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(s.tdatktg) - e2:SetOperation(s.tdatkop) - c:RegisterEffect(e2) - --If this card is Special Summoned, or a monster(s) is Special Summoned to your opponent's field: You can destroy all cards on the field - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,2)) - e3a:SetCategory(CATEGORY_DESTROY) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_SPSUMMON_SUCCESS) - e3a:SetCountLimit(1,{id,1}) - e3a:SetTarget(s.destg) - e3a:SetOperation(s.desop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3b:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3b:SetRange(LOCATION_MZONE) - e3b:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsControler,1,nil,1-tp) end) - c:RegisterEffect(e3b) -end -s.listed_names={CARD_ASSAULT_MODE,CARD_BLACK_ROSE_DRAGON} -s.assault_mode=CARD_BLACK_ROSE_DRAGON -function s.spfilter(c,e,tp) - return c:IsCode(CARD_BLACK_ROSE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.tdatktg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.tdatkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local sc=Duel.SelectMatchingCard(tp,Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - --Change its ATK to 0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100454002.lua b/pre-release/c100454002.lua deleted file mode 100644 index 33175c3a71..0000000000 --- a/pre-release/c100454002.lua +++ /dev/null @@ -1,84 +0,0 @@ ---捕食植物デェアデビル ---Predaplant Dheadevil ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Predaplant" monster + 1 Level 1 monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PREDAPLANT),aux.FilterBoolFunction(Card.IsLevel,1)) - c:AddMustFirstBeFusionSummoned() - --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 monster on either field with a Predator Counter and 1 "Predaplant" monster you control - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_EXTRA) - e0:SetCondition(s.selfspcon) - e0:SetTarget(s.selfsptg) - e0:SetOperation(s.selfspop) - c:RegisterEffect(e0) - --During the Main Phase, if this card was Special Summoned this turn (Quick Effect): You can target Spells/Traps on the field, up to the number of monsters with a Predator Counter; destroy them - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return Duel.IsMainPhase() and e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) -end -s.listed_series={SET_PREDAPLANT} -s.counter_list={COUNTER_PREDATOR} -s.material_setcode=SET_PREDAPLANT -function s.selfspcostfilter(c,tp,fc) - return ((c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp)) or c:HasCounter(COUNTER_PREDATOR)) and c:IsReleasable() - and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) -end -function s.rescon(sg,e,tp,mg) - return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 and sg:IsExists(s.predaplantchkfilter,1,nil,tp) - and sg:IsExists(Card.HasCounter,1,nil,COUNTER_PREDATOR) -end -function s.predaplantchkfilter(c,tp) - return c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp) -end -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) - if #sg==2 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g then - Duel.Release(g,REASON_COST|REASON_MATERIAL) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - local max_count=Duel.GetMatchingGroupCount(Card.HasCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,COUNTER_PREDATOR) - if chk==0 then return max_count>0 and Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,max_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303081.lua b/pre-release/c101303081.lua deleted file mode 100644 index 06f2fdcb3f..0000000000 --- a/pre-release/c101303081.lua +++ /dev/null @@ -1,113 +0,0 @@ ---JP name ---Mechanical Mechanic ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When an attack is declared involving your other Machine monster: You can increase or decrease the Level of that other monster you control by 1 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.lvcon) - e1:SetTarget(s.lvtg) - e1:SetOperation(s.lvop) - c:RegisterEffect(e1) - --If a card is in the Field Zone: You can Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --You can target 1 face-up Spell/Trap Card you control; destroy it, and if you do, add 1 WIND Machine monster with 0 ATK from your Deck to your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetBattleMonster(tp) - return bc and bc~=e:GetHandler() and bc:IsRace(RACE_MACHINE) and bc:HasLevel() and bc:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=Duel.GetBattleMonster(tp) - e:SetLabelObject(bc) - bc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,bc,1,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - if bc:IsRelateToEffect(e) and bc:IsFaceup() and bc:IsControler(tp) and bc:HasLevel() then - local op=bc:IsLevelAbove(2) and Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4)) or 0 - local lv=op==0 and 1 or -1 - --Increase or decrease its Level by 1 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - bc:RegisterEffect(e1) - end -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(nil,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsAttack(0) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsSpellTrap() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - --You cannot Special Summon from the extra Deck for the rest of this turn, except Machine monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,5)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_MACHINE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101303082.lua b/pre-release/c101303082.lua deleted file mode 100644 index 92116798d7..0000000000 --- a/pre-release/c101303082.lua +++ /dev/null @@ -1,99 +0,0 @@ ---JP name ---Jade Dragon Mech ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuners - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --If this card is Special Summoned: You can send 1 Machine Tuner from your Deck to the GY, or if you control a monster whose current Level is different from its original Level, you can Special Summon it instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.tgsptg) - e1:SetOperation(s.tgspop) - c:RegisterEffect(e1) - --If this Synchro Summoned card is destroyed by card effect and sent to the GY: You can banish any number of Tuners from your GY, then target that many cards on the field; destroy them - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(s.descon) - e2:SetCost(s.descost) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.difflvfilter(c) - return c:HasLevel() and c:IsFaceup() and not c:IsLevel(c:GetOriginalLevel()) -end -function s.tgspfilter(c,e,tp,mmz_extra_chk) - return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_TUNER) and (c:IsAbleToGrave() or (mmz_extra_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local mmz_extra_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.difflvfilter,tp,LOCATION_MZONE,0,1,nil) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_extra_chk) end - if not mmz_extra_chk then - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - else - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.tgspop(e,tp,eg,ep,ev,re,r,rp) - local mmz_extra_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.difflvfilter,tp,LOCATION_MZONE,0,1,nil) - local hint=mmz_extra_chk and aux.Stringid(id,2) or HINTMSG_TOGRAVE - Duel.Hint(HINT_SELECTMSG,tp,hint) - local sc=Duel.SelectMatchingCard(tp,s.tgspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_extra_chk):GetFirst() - if not sc then return end - local op=1 - if mmz_extra_chk then - local b1=sc:IsAbleToGrave() - local b2=sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - end - if op==1 then - Duel.SendtoGrave(sc,REASON_EFFECT) - elseif op==2 then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsSynchroSummoned() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) -end -function s.descostfilter(c) - return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_GRAVE,0,1,nil) end - local max_target_count=Duel.GetTargetCount(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_GRAVE,0,1,max_target_count,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(#g) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local target_count=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,target_count,target_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end diff --git a/pre-release/c101303083.lua b/pre-release/c101303083.lua deleted file mode 100644 index af00f80076..0000000000 --- a/pre-release/c101303083.lua +++ /dev/null @@ -1,69 +0,0 @@ ---JP name ---Mischief of the Wolves ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Apply these effects in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --During your Main Phase, if this card is in your GY because it was sent there this turn: You can target 1 face-up card you control; destroy it, and if you do, add this card to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():GetTurnID()==Duel.GetTurnCount() end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsLevelAbove,3),tp,0,LOCATION_MZONE,1,nil) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,nil,1,PLAYER_ALL,LOCATION_MZONE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local break_chk=false - local opp_g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelAbove,3),tp,0,LOCATION_MZONE,nil) - if #opp_g>0 then - break_chk=true - for opp_c in opp_g:Iter() do - --● Reduce the Levels of all monsters your opponent controls by 2 - opp_c:UpdateLevel(-2,nil,c) - end - end - local your_g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,nil) - if #your_g>0 then - if break_chk then Duel.BreakEffect() end - for your_c in your_g:Iter() do - --● Increase the Levels of all monsters you control by 2 - your_c:UpdateLevel(2,nil,c) - end - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303084.lua b/pre-release/c101303084.lua deleted file mode 100644 index 9d8a46a53d..0000000000 --- a/pre-release/c101303084.lua +++ /dev/null @@ -1,85 +0,0 @@ ---JP name ---Mercurium the Living Quicksilver ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2+ Level 10 monsters - Xyz.AddProcedure(c,nil,10,2,nil,nil,Xyz.InfiniteMats) - --If this card is Xyz Summoned: You can attach 1 monster from your Deck to this card as material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetTarget(s.attachtg) - e1:SetOperation(s.attachop) - c:RegisterEffect(e1) - --While this card has material, your opponent cannot activate the effects of monsters in their GY with the same Attribute as a monster in your GY - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) - e2:SetValue(s.cannotactval) - c:RegisterEffect(e2) - --Once per turn, during the End Phase: Detach 1 material from this card or take 3000 damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.detachtg) - e3:SetOperation(s.detachop) - c:RegisterEffect(e3) -end -function s.attachfilter(c,xyzc,tp) - return c:IsMonster() and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) -end -function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler(),tp) end -end -function s.attachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local sc=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_DECK,0,1,1,nil,c,tp):GetFirst() - if sc then - Duel.Overlay(c,sc) - end - end -end -function s.cannotactval(e,re,rp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsLocation(LOCATION_GRAVE) - and Duel.IsExistingMatchingCard(Card.IsAttribute,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,rc:GetAttribute()) -end -function s.detachtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - if c:GetOverlayCount()==0 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000) -end -function s.detachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return Duel.Damage(tp,3000,REASON_EFFECT) end - local b1=c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) - local b2=true - --Detach 1 material from this card or take 3000 damage - local op=b1 and Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) or 2 - if op==1 then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - elseif op==2 then - Duel.Damage(tp,3000,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303085.lua b/pre-release/c101303085.lua deleted file mode 100644 index 60788b2ca3..0000000000 --- a/pre-release/c101303085.lua +++ /dev/null @@ -1,84 +0,0 @@ ---JP name ---Vodnika the Fountain Spirit ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If a Level 10 monster(s) is sent to the GY, except "Vodnika the Fountain Spirit" (except during the Damage Step): You can Special Summon this card from your GY (if it was there when the monster was sent) or hand (even if not) in Defense Position, but banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_GRAVE|LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --You can target 1 Level 10 monster in your GY; Special Summon it to your opponent's field (but negate its effects), then draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.selfspconfilter(c) - return c:IsLevel(10) and not c:IsCode(id) -end -function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.selfspconfilter,1,nil) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end -function s.gyspfilter(c,e,tp) - return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) -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 - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsPlayerCanDraw(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_MZONE) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(e:GetHandler()) - end - if Duel.SpecialSummonComplete()>0 and Duel.IsPlayerCanDraw(tp) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303086.lua b/pre-release/c101303086.lua deleted file mode 100644 index 682deca7c9..0000000000 --- a/pre-release/c101303086.lua +++ /dev/null @@ -1,60 +0,0 @@ ---JP name ---Rain of Frogs -local s,id=GetID() -function s.initial_effect(c) - --If you control an Aqua monster with 2000 or more ATK: Send all monsters on the field to the GY, except Aqua monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --f this Set card is destroyed by card effect: You can Set this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.setcon) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -function s.confilter(c) - return c:IsRace(RACE_AQUA) and c:IsAttackAbove(2000) and c:IsFaceup() -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsRace,RACE_AQUA)),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsRace,RACE_AQUA)),tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_SET,c,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end \ No newline at end of file diff --git a/pre-release/c101303087.lua b/pre-release/c101303087.lua deleted file mode 100644 index 4908ffe477..0000000000 --- a/pre-release/c101303087.lua +++ /dev/null @@ -1,73 +0,0 @@ ---JP name ---Flux Ochsenfeld ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Level 5 or higher EARTH monster + 1 Rock monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_ROCK)) - --If this card is Fusion Summoned: You can Special Summon 1 Rock monster from your hand or GY, except "Flux Ochsenfeld" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) - e1:SetCost(Cost.HardOncePerChain(id)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --(Quick Effect): You can target 1 EARTH monster you control and 1 card your opponent controls; return them to the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.HardOncePerChain(id)) - e2:SetTarget(s.rthtg) - e2:SetOperation(s.rthop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.matfilter(c,fc,sumtype,tp) - return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_EARTH,fc,sumtype,tp) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_ROCK) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.rthfilter(c,opp) - return (c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()) or c:IsControler(opp) -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.rthfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp) - if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_RTOHAND) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,2,tp,0) -end -function s.rthop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303088.lua b/pre-release/c101303088.lua deleted file mode 100644 index 8758712866..0000000000 --- a/pre-release/c101303088.lua +++ /dev/null @@ -1,97 +0,0 @@ ---JP name ---Shipping Archfiend ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can target any number of face-up monsters on the field, and declare 1 Type or Attribute; they become that Type or Attribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.changetg) - e1:SetOperation(s.changeop) - c:RegisterEffect(e1) - --If a monster(s) is Special Summoned to your opponent's field, while this card is in your Monster Zone (except during the Damage Step): You can target 1 monster on each field with the same Type and Attribute from each other; return them to the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsControler,1,nil,1-tp) end) - e2:SetTarget(s.rthtg) - e2:SetOperation(s.rthop) - c:RegisterEffect(e2) -end -function s.single_property_filter(c,func) - local property=func(c) - return property&(property-1)==0 -end -function s.get_excluded_values(tg,func) - return tg:Filter(s.single_property_filter,nil,func):GetBitwiseOr(func) -end -function s.changetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if not (chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()) then return false end - local op,val=e:GetLabel() - return (op==1 and chkc:IsRaceExcept(val)) or (op==2 and chkc:IsAttributeExcept(val)) - end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local max_target_count=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,max_target_count,nil) - local excluded_races=s.get_excluded_values(tg,Card.GetRace) - local excluded_attributes=s.get_excluded_values(tg,Card.GetAttribute) - local b1=(excluded_races&RACE_ALL)~=RACE_ALL - local b2=(excluded_attributes&ATTRIBUTE_ALL)~=ATTRIBUTE_ALL - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - local decl_race_attr=0 - if op==1 then - decl_race_attr=Duel.AnnounceRace(tp,1,RACE_ALL&~excluded_races) - elseif op==2 then - decl_race_attr=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~excluded_attributes) - end - e:SetLabel(op,decl_race_attr) -end -function s.changeop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) - if #tg==0 then return end - local c=e:GetHandler() - local op,decl_race_attr=e:GetLabel() - local eff_code=op==1 and EFFECT_CHANGE_RACE or EFFECT_CHANGE_ATTRIBUTE - for tc in tg:Iter() do - --They become that Type or Attribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(eff_code) - e1:SetValue(decl_race_attr) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.rescon(sg,e,tp,mg) - return #sg==2 and sg:GetClassCount(Card.GetControler)==2 - and sg:GetClassCount(Card.GetRace)==1 - and sg:GetClassCount(Card.GetAttribute)==1 -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RTOHAND) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,2,tp,0) -end -function s.rthop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303089.lua b/pre-release/c101303089.lua deleted file mode 100644 index f81c0f5520..0000000000 --- a/pre-release/c101303089.lua +++ /dev/null @@ -1,88 +0,0 @@ ---JP name ---Storm-Bane Dragon Destorbim ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non Tuners - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Your opponent cannot target this card with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --You can banish any number of DARK monsters from your GY that cannot be Normal Summoned/Set; banish that many cards your opponent controls. This is a Quick Effect if your opponent controls more cards than you do - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_REMOVE) - e2a:SetType(EFFECT_TYPE_IGNITION) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,{id,0}) - e2a:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)<=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end) - e2a:SetCost(s.bancost) - e2a:SetTarget(s.bantg) - e2a:SetOperation(s.banop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetType(EFFECT_TYPE_QUICK_O) - e2b:SetCode(EVENT_FREE_CHAIN) - e2b:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end) - e2b:SetHintTiming(TIMING_SPSUMMON,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2b) - --If this card is sent to the GY: You can Special Summon 1 of your banished Dragon monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -function s.bancostfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsSummonableCard() and c:IsAbleToRemoveAsCost() -end -function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.bancostfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - local max_count=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.bancostfilter,tp,LOCATION_GRAVE,0,1,max_count,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(#g) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetLabel(),1-tp,LOCATION_ONFIELD) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local banish_count=e:GetLabel() - if Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) -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_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101303090.lua b/pre-release/c101303090.lua deleted file mode 100644 index d693e1b437..0000000000 --- a/pre-release/c101303090.lua +++ /dev/null @@ -1,97 +0,0 @@ ---JP name ---GMX Researcher Selande ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal Summoned: You can Special Summon 1 non-Warrior "GMX" monster or 1 Level 3 or lower Dinosaur monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Special Summoned by a monster effect: You can add 1 "GMX" Spell/Trap 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:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --If a Dinosaur Fusion Monster is on the field: You can shuffle this card from the field into the Deck, and if you do, negate the effects of 1 face-up card on the field until the end of this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.discon) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) -end -s.listed_series={SET_GMX} -function s.spfilter(c,e,tp) - return ((c:IsRaceExcept(RACE_WARRIOR) and c:IsSetCard(SET_GMX)) or (c:IsLevelBelow(3) 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) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_GMX) and c:IsSpellTrap() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.disconfilter(c) - return c:IsRace(RACE_DINOSAUR) and c:IsFusionMonster() and c:IsFaceup() -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --Negate its effects until the end of this turn - sc:NegateEffects(c,RESET_PHASE|PHASE_END,true) - end - end -end \ No newline at end of file diff --git a/pre-release/c101303091.lua b/pre-release/c101303091.lua deleted file mode 100644 index 0c926a3c5f..0000000000 --- a/pre-release/c101303091.lua +++ /dev/null @@ -1,81 +0,0 @@ ---JP name ---GMX Chairman Kimridge ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand; add 1 "GMX Applied Experiment #55" from your Deck or GY to your hand, and if you do, shuffle this card into the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If this card is Special Summoned by a monster effect: You can target 2 cards in your GY, that are "GMX" cards and/or Dinosaur monsters; place them on top of your Deck in any order, then you can destroy 1 Attack Position monster your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_names={101303096} --"GMX Applied Experiment #55" -s.listed_series={SET_GMX} -function s.thfilter(c) - return c:IsCode(101303096) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - end -end -function s.tdfilter(c) - return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) and c:IsAbleToDeck() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT)>0 - and tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then - if Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK)==2 then - Duel.SortDecktop(tp,tp,2) - end - if Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end - end -end diff --git a/pre-release/c101303092.lua b/pre-release/c101303092.lua deleted file mode 100644 index 5d51e57786..0000000000 --- a/pre-release/c101303092.lua +++ /dev/null @@ -1,80 +0,0 @@ ---JP name ---GMX Associate Noma ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is Special Summoned by a monster effect: You can target 1 card each from your GY and your opponent's GY; place each card on either the top or bottom of the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) - e1:SetTarget(s.tdtg) - e1:SetOperation(s.tdop) - c:RegisterEffect(e1) - --If a monster is Normal or Special Summoned to your opponent's field, while this card is in your Monster Zone (except during the Damage Step): You can Fusion Summon 1 "GMX" Fusion Monster from your Extra Deck, by shuffling its materials from your field, GY, and/or banishment into the Deck - local fusion_params={ - fusfilter=function(c) return c:IsSetCard(SET_GMX) end, - matfilter=Fusion.OnFieldMat(Card.IsAbleToDeck), - extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) end, - extraop=Fusion.ShuffleMaterial, - extratg=s.extratg - } - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_FUSION_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) - e2a:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2a:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_GMX} -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetTargetGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) - if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_TODECK) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,2,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - local op,sequence=nil - local your_g,opp_g=tg:Split(Card.IsControler,nil,tp) - if #your_g>0 then - s.place_on_top_or_bottom(your_g,tp,tp) - end - if #opp_g>0 then - s.place_on_top_or_bottom(opp_g,1-tp,tp) - end -end -function s.place_on_top_or_bottom(group,owner,trig_player) - local op=nil - if Duel.GetFieldGroupCount(owner,LOCATION_DECK,0)==0 then - op=1 - else - local offset=(owner~=trig_player) and 2 or 0 - op=Duel.SelectEffect(trig_player, - {true,aux.Stringid(id,2+offset)}, - {true,aux.Stringid(id,3+offset)}) - end - local sequence=op==1 and SEQ_DECKTOP or SEQ_DECKBOTTOM - Duel.SendtoDeck(group,nil,sequence,REASON_EFFECT) - if op==1 then Duel.ConfirmDecktop(owner,1) end -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED) -end \ No newline at end of file diff --git a/pre-release/c101303093.lua b/pre-release/c101303093.lua deleted file mode 100644 index 63cc1d0705..0000000000 --- a/pre-release/c101303093.lua +++ /dev/null @@ -1,72 +0,0 @@ ---JP name ---Returned Dino Daneen -local s,id=GetID() -function s.initial_effect(c) - --If this card is Special Summoned by a monster effect: You can add 1 "GMX" monster from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --During your Main Phase: You can Fusion Summon 1 Dinosaur Fusion Monster from your Extra Deck, using monsters from your hand or field - local fusion_params={fusfilter=function(c) return c:IsRace(RACE_DINOSAUR) end} - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) - --If this card is sent to the GY: You can make all Dinosaur monsters you currently control gain 400 ATK - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.atktg) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) -end -s.listeds_series={SET_GMX} -function s.thfilter(c) - return c:IsSetCard(SET_GMX) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_DINOSAUR),tp,LOCATION_MZONE,0,1,nil) end -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_DINOSAUR),tp,LOCATION_MZONE,0,nil) - for tc in g:Iter() do - --All Dinosaur monsters you currently control gain 400 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101303094.lua b/pre-release/c101303094.lua deleted file mode 100644 index e0149017d6..0000000000 --- a/pre-release/c101303094.lua +++ /dev/null @@ -1,107 +0,0 @@ ---JP name ---GMX - ALLOS ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "GMX" monster + 1 Dinosaur monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GMX),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR)) - --Each time your opponent Normal or Special Summons a monster(s), gain 200 LP - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e1a:SetOperation(s.lpop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --You can target 1 "GMX" monster or 1 Dinosaur monster in your GY or banishment; Special Summon it. This card cannot attack the turn this effect is activated - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --At the start of the Damage Step, if this card battles an opponent's monster: You can destroy that monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_BATTLE_START) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_series={SET_GMX} -s.material_setcode={SET_GMX} -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainSolving() then - Duel.Recover(tp,200,REASON_EFFECT) - else - local c=e:GetHandler() - --Gain 200 LP at the end of the Chain Link - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) return Duel.Recover(tp,200,REASON_EFFECT) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) - c:RegisterEffect(e1) - --Reset "e1" at the end of the Chain Link - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetOperation(function() e1:Reset() end) - e2:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e2,tp) - end -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetAttackAnnouncedCount()==0 end - --This card cannot attack the turn this effect is activated - local e1=Effect.CreateEffect(c) - e1:SetDescription(3206) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) -end -function s.spfilter(c,e,tp) - return (c:IsSetCard(SET_GMX) or 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 chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsControler(1-tp) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303095.lua b/pre-release/c101303095.lua deleted file mode 100644 index 167a0d475e..0000000000 --- a/pre-release/c101303095.lua +++ /dev/null @@ -1,104 +0,0 @@ ---JP name ---GMX - VELOX ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "GMX" monster + 1 Dinosaur monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GMX),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR)) - --Each time your opponent Normal or Special Summons a monster(s), gain 200 LP - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e1a:SetOperation(s.lpop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --During your opponent's turn (Quick Effect): You can target 1 card your opponent controls; excavate the top cards of your Deck until you excavate a "GMX" monster or a Dinosaur monster, lose 400 LP for each excavated card, add that "GMX" monster or Dinosaur monster to your hand or Special Summon it, and shuffle the rest into the Deck. Also, after that, destroy the targeted card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.excavtg) - e2:SetOperation(s.excavop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_GMX} -s.material_setcode={SET_GMX} -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainSolving() then - Duel.Recover(tp,200,REASON_EFFECT) - else - local c=e:GetHandler() - --Gain 200 LP at the end of the Chain Link - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) return Duel.Recover(tp,200,REASON_EFFECT) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) - c:RegisterEffect(e1) - --Reset "e1" at the end of the Chain Link - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetOperation(function() e1:Reset() end) - e2:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e2,tp) - end -end -function s.thspfilter(c,e,tp,mmz_chk) - return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) and c:IsMonster() and (c:IsAbleToHand() - or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.excavop(e,tp,eg,ep,ev,re,r,rp) - local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if deck_count>0 then - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local g=Duel.GetMatchingGroup(s.thspfilter,tp,LOCATION_DECK,0,nil,e,tp,mmz_chk) - if #g==0 then - Duel.ConfirmDecktop(tp,deck_count) - Duel.SetLP(tp,Duel.GetLP(tp)-deck_count*400) - else - local sc=g:GetMaxGroup(Card.GetSequence):GetFirst() - local sc_seq=sc:GetSequence() - local excav_count=deck_count-sc_seq - Duel.ConfirmDecktop(tp,excav_count) - Duel.SetLP(tp,Duel.GetLP(tp)-excav_count*400) - aux.ToHandOrElse(sc,tp, - function() - return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - end, - function() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end, - aux.Stringid(id,1) - ) - end - end - Duel.ShuffleDeck(tp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101303096.lua b/pre-release/c101303096.lua deleted file mode 100644 index 8ae2b45050..0000000000 --- a/pre-release/c101303096.lua +++ /dev/null @@ -1,52 +0,0 @@ ---JP name ---GMX Applied Experiment #55 ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Excavate the top cards of your Deck until you have excavated a "GMX" monster and a Dinosaur monster, lose 400 LP for each excavated card, then you can Fusion Summon 1 "GMX" Fusion Monster from your Extra Deck, using any excavated monsters as material, also shuffle the rest into the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_GMX} -function s.gmxfilter(c,tp) - return c:IsSetCard(SET_GMX) and c:IsMonster() and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_DECK,0,1,c,RACE_DINOSAUR) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.gmxfilter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if deck_count==0 then return end - local gmx_g=Duel.GetMatchingGroup(s.gmxfilter,tp,LOCATION_DECK,0,nil,tp) - local dino_g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_DECK,0,nil,RACE_DINOSAUR) - if #gmx_g==0 or #dino_g==0 then - Duel.ConfirmDecktop(tp,deck_count) - Duel.SetLP(tp,Duel.GetLP(tp)-deck_count*400) - else - local gmx_c=gmx_g:GetMaxGroup(Card.GetSequence):GetFirst() - local dino_c=dino_g:GetMaxGroup(Card.GetSequence):GetFirst() - local excav_count=deck_count-math.min(gmx_c:GetSequence(),dino_c:GetSequence()) - Duel.ConfirmDecktop(tp,excav_count) - Duel.SetLP(tp,Duel.GetLP(tp)-excav_count*400) - local excav_monsters=Duel.GetDecktopGroup(tp,excav_count):Match(Card.IsMonster,nil) - local fusion_params={ - fusfilter=function(c) return c:IsSetCard(SET_GMX) end, - matfilter=aux.FALSE, - extrafil=function(e,tp,mg) return excav_monsters end - } - if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - end - end - Duel.ShuffleDeck(tp) -end \ No newline at end of file From 6b21aa96ef30c502d36823faf7235c98228bb6a6 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 9 Feb 2026 13:31:19 +0200 Subject: [PATCH 2/2] Add files via upload --- archetype_setcode_constants.lua | 2 +- official/c18795635.lua | 52 +++++++++++ official/c20049870.lua | 97 ++++++++++++++++++++ official/c21861412.lua | 73 +++++++++++++++ official/c22106558.lua | 113 +++++++++++++++++++++++ official/c22984000.lua | 85 ++++++++++++++++++ official/c29927283.lua | 72 +++++++++++++++ official/c56034579.lua | 81 +++++++++++++++++ official/c56311997.lua | 107 ++++++++++++++++++++++ official/c57256127.lua | 97 ++++++++++++++++++++ official/c68378605.lua | 84 ++++++++++++++++++ official/c69191257.lua | 99 +++++++++++++++++++++ official/c82706696.lua | 104 ++++++++++++++++++++++ official/c83528184.lua | 80 +++++++++++++++++ official/c94467314.lua | 60 +++++++++++++ official/c94641726.lua | 88 ++++++++++++++++++ official/c95589901.lua | 69 ++++++++++++++ pre-release/c100200284.lua | 81 +++++++++++++++++ pre-release/c100451001.lua | 73 +++++++++++++++ pre-release/c100451002.lua | 97 ++++++++++++++++++++ pre-release/c100451004.lua | 74 +++++++++++++++ pre-release/c100451006.lua | 80 +++++++++++++++++ pre-release/c100451007.lua | 89 +++++++++++++++++++ pre-release/c100451008.lua | 84 ++++++++++++++++++ pre-release/c100451010.lua | 104 ++++++++++++++++++++++ pre-release/c100451011.lua | 71 +++++++++++++++ pre-release/c100451013.lua | 130 +++++++++++++++++++++++++++ pre-release/c100451014.lua | 121 +++++++++++++++++++++++++ pre-release/c100451016.lua | 74 +++++++++++++++ pre-release/c100451017.lua | 119 +++++++++++++++++++++++++ pre-release/c100451019.lua | 90 +++++++++++++++++++ pre-release/c100451025.lua | 112 +++++++++++++++++++++++ pre-release/c100451026.lua | 153 ++++++++++++++++++++++++++++++++ pre-release/c100452001.lua | 94 ++++++++++++++++++++ pre-release/c100452002.lua | 111 +++++++++++++++++++++++ pre-release/c100452004.lua | 69 ++++++++++++++ pre-release/c100452006.lua | 87 ++++++++++++++++++ pre-release/c100452007.lua | 94 ++++++++++++++++++++ pre-release/c100452009.lua | 100 +++++++++++++++++++++ pre-release/c100452010.lua | 97 ++++++++++++++++++++ pre-release/c100452012.lua | 93 +++++++++++++++++++ pre-release/c100452013.lua | 76 ++++++++++++++++ pre-release/c100452014.lua | 80 +++++++++++++++++ pre-release/c100452016.lua | 77 ++++++++++++++++ pre-release/c100452017.lua | 94 ++++++++++++++++++++ pre-release/c100452024.lua | 76 ++++++++++++++++ pre-release/c100452025.lua | 94 ++++++++++++++++++++ pre-release/c100454001.lua | 97 ++++++++++++++++++++ pre-release/c100454002.lua | 84 ++++++++++++++++++ 49 files changed, 4337 insertions(+), 1 deletion(-) create mode 100644 official/c18795635.lua create mode 100644 official/c20049870.lua create mode 100644 official/c21861412.lua create mode 100644 official/c22106558.lua create mode 100644 official/c22984000.lua create mode 100644 official/c29927283.lua create mode 100644 official/c56034579.lua create mode 100644 official/c56311997.lua create mode 100644 official/c57256127.lua create mode 100644 official/c68378605.lua create mode 100644 official/c69191257.lua create mode 100644 official/c82706696.lua create mode 100644 official/c83528184.lua create mode 100644 official/c94467314.lua create mode 100644 official/c94641726.lua create mode 100644 official/c95589901.lua create mode 100644 pre-release/c100200284.lua create mode 100644 pre-release/c100451001.lua create mode 100644 pre-release/c100451002.lua create mode 100644 pre-release/c100451004.lua create mode 100644 pre-release/c100451006.lua create mode 100644 pre-release/c100451007.lua create mode 100644 pre-release/c100451008.lua create mode 100644 pre-release/c100451010.lua create mode 100644 pre-release/c100451011.lua create mode 100644 pre-release/c100451013.lua create mode 100644 pre-release/c100451014.lua create mode 100644 pre-release/c100451016.lua create mode 100644 pre-release/c100451017.lua create mode 100644 pre-release/c100451019.lua create mode 100644 pre-release/c100451025.lua create mode 100644 pre-release/c100451026.lua create mode 100644 pre-release/c100452001.lua create mode 100644 pre-release/c100452002.lua create mode 100644 pre-release/c100452004.lua create mode 100644 pre-release/c100452006.lua create mode 100644 pre-release/c100452007.lua create mode 100644 pre-release/c100452009.lua create mode 100644 pre-release/c100452010.lua create mode 100644 pre-release/c100452012.lua create mode 100644 pre-release/c100452013.lua create mode 100644 pre-release/c100452014.lua create mode 100644 pre-release/c100452016.lua create mode 100644 pre-release/c100452017.lua create mode 100644 pre-release/c100452024.lua create mode 100644 pre-release/c100452025.lua create mode 100644 pre-release/c100454001.lua create mode 100644 pre-release/c100454002.lua diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index c000342ec0..71592f8c88 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -604,7 +604,7 @@ SET_ECCLESIA = 0x1cf SET_END_OF_THE_WORLD = 0x1d1 SET_FAIRY_TAIL = 0x1d2 SET_ELFNOTE = 0x1d0 +SET_GMX = 0x1d4 --Released but the official English name is unconfirmed SET_CLOWN_CREW = 0x1d3 --Pre-release archetypes -SET_GMX = 0x1d4 diff --git a/official/c18795635.lua b/official/c18795635.lua new file mode 100644 index 0000000000..8ae2b45050 --- /dev/null +++ b/official/c18795635.lua @@ -0,0 +1,52 @@ +--JP name +--GMX Applied Experiment #55 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Excavate the top cards of your Deck until you have excavated a "GMX" monster and a Dinosaur monster, lose 400 LP for each excavated card, then you can Fusion Summon 1 "GMX" Fusion Monster from your Extra Deck, using any excavated monsters as material, also shuffle the rest into the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_GMX} +function s.gmxfilter(c,tp) + return c:IsSetCard(SET_GMX) and c:IsMonster() and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_DECK,0,1,c,RACE_DINOSAUR) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.gmxfilter,tp,LOCATION_DECK,0,1,nil,tp) end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) + if deck_count==0 then return end + local gmx_g=Duel.GetMatchingGroup(s.gmxfilter,tp,LOCATION_DECK,0,nil,tp) + local dino_g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_DECK,0,nil,RACE_DINOSAUR) + if #gmx_g==0 or #dino_g==0 then + Duel.ConfirmDecktop(tp,deck_count) + Duel.SetLP(tp,Duel.GetLP(tp)-deck_count*400) + else + local gmx_c=gmx_g:GetMaxGroup(Card.GetSequence):GetFirst() + local dino_c=dino_g:GetMaxGroup(Card.GetSequence):GetFirst() + local excav_count=deck_count-math.min(gmx_c:GetSequence(),dino_c:GetSequence()) + Duel.ConfirmDecktop(tp,excav_count) + Duel.SetLP(tp,Duel.GetLP(tp)-excav_count*400) + local excav_monsters=Duel.GetDecktopGroup(tp,excav_count):Match(Card.IsMonster,nil) + local fusion_params={ + fusfilter=function(c) return c:IsSetCard(SET_GMX) end, + matfilter=aux.FALSE, + extrafil=function(e,tp,mg) return excav_monsters end + } + if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + end + end + Duel.ShuffleDeck(tp) +end \ No newline at end of file diff --git a/official/c20049870.lua b/official/c20049870.lua new file mode 100644 index 0000000000..d693e1b437 --- /dev/null +++ b/official/c20049870.lua @@ -0,0 +1,97 @@ +--JP name +--GMX Researcher Selande +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal Summoned: You can Special Summon 1 non-Warrior "GMX" monster or 1 Level 3 or lower Dinosaur monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Special Summoned by a monster effect: You can add 1 "GMX" Spell/Trap 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:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --If a Dinosaur Fusion Monster is on the field: You can shuffle this card from the field into the Deck, and if you do, negate the effects of 1 face-up card on the field until the end of this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.discon) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) +end +s.listed_series={SET_GMX} +function s.spfilter(c,e,tp) + return ((c:IsRaceExcept(RACE_WARRIOR) and c:IsSetCard(SET_GMX)) or (c:IsLevelBelow(3) 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) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_GMX) and c:IsSpellTrap() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.disconfilter(c) + return c:IsRace(RACE_DINOSAUR) and c:IsFusionMonster() and c:IsFaceup() +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --Negate its effects until the end of this turn + sc:NegateEffects(c,RESET_PHASE|PHASE_END,true) + end + end +end \ No newline at end of file diff --git a/official/c21861412.lua b/official/c21861412.lua new file mode 100644 index 0000000000..4908ffe477 --- /dev/null +++ b/official/c21861412.lua @@ -0,0 +1,73 @@ +--JP name +--Flux Ochsenfeld +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Level 5 or higher EARTH monster + 1 Rock monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_ROCK)) + --If this card is Fusion Summoned: You can Special Summon 1 Rock monster from your hand or GY, except "Flux Ochsenfeld" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) + e1:SetCost(Cost.HardOncePerChain(id)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --(Quick Effect): You can target 1 EARTH monster you control and 1 card your opponent controls; return them to the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.HardOncePerChain(id)) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.matfilter(c,fc,sumtype,tp) + return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_EARTH,fc,sumtype,tp) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ROCK) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.rthfilter(c,opp) + return (c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()) or c:IsControler(opp) +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.rthfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_RTOHAND) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,2,tp,0) +end +function s.rthop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c22106558.lua b/official/c22106558.lua new file mode 100644 index 0000000000..06f2fdcb3f --- /dev/null +++ b/official/c22106558.lua @@ -0,0 +1,113 @@ +--JP name +--Mechanical Mechanic +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When an attack is declared involving your other Machine monster: You can increase or decrease the Level of that other monster you control by 1 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_ATTACK_ANNOUNCE) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(s.lvcon) + e1:SetTarget(s.lvtg) + e1:SetOperation(s.lvop) + c:RegisterEffect(e1) + --If a card is in the Field Zone: You can Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --You can target 1 face-up Spell/Trap Card you control; destroy it, and if you do, add 1 WIND Machine monster with 0 ATK from your Deck to your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +function s.lvcon(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetBattleMonster(tp) + return bc and bc~=e:GetHandler() and bc:IsRace(RACE_MACHINE) and bc:HasLevel() and bc:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc=Duel.GetBattleMonster(tp) + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,bc,1,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + if bc:IsRelateToEffect(e) and bc:IsFaceup() and bc:IsControler(tp) and bc:HasLevel() then + local op=bc:IsLevelAbove(2) and Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4)) or 0 + local lv=op==0 and 1 or -1 + --Increase or decrease its Level by 1 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + bc:RegisterEffect(e1) + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(nil,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsAttack(0) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsSpellTrap() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end + --You cannot Special Summon from the extra Deck for the rest of this turn, except Machine monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,5)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_MACHINE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c22984000.lua b/official/c22984000.lua new file mode 100644 index 0000000000..9d8a46a53d --- /dev/null +++ b/official/c22984000.lua @@ -0,0 +1,85 @@ +--JP name +--Mercurium the Living Quicksilver +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2+ Level 10 monsters + Xyz.AddProcedure(c,nil,10,2,nil,nil,Xyz.InfiniteMats) + --If this card is Xyz Summoned: You can attach 1 monster from your Deck to this card as material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(s.attachtg) + e1:SetOperation(s.attachop) + c:RegisterEffect(e1) + --While this card has material, your opponent cannot activate the effects of monsters in their GY with the same Attribute as a monster in your GY + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,1) + e2:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>0 end) + e2:SetValue(s.cannotactval) + c:RegisterEffect(e2) + --Once per turn, during the End Phase: Detach 1 material from this card or take 3000 damage + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DAMAGE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.detachtg) + e3:SetOperation(s.detachop) + c:RegisterEffect(e3) +end +function s.attachfilter(c,xyzc,tp) + return c:IsMonster() and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler(),tp) end +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) + local sc=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_DECK,0,1,1,nil,c,tp):GetFirst() + if sc then + Duel.Overlay(c,sc) + end + end +end +function s.cannotactval(e,re,rp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsLocation(LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(Card.IsAttribute,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,rc:GetAttribute()) +end +function s.detachtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + if c:GetOverlayCount()==0 then + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000) +end +function s.detachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return Duel.Damage(tp,3000,REASON_EFFECT) end + local b1=c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) + local b2=true + --Detach 1 material from this card or take 3000 damage + local op=b1 and Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) or 2 + if op==1 then + c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) + elseif op==2 then + Duel.Damage(tp,3000,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c29927283.lua b/official/c29927283.lua new file mode 100644 index 0000000000..63cc1d0705 --- /dev/null +++ b/official/c29927283.lua @@ -0,0 +1,72 @@ +--JP name +--Returned Dino Daneen +local s,id=GetID() +function s.initial_effect(c) + --If this card is Special Summoned by a monster effect: You can add 1 "GMX" monster from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --During your Main Phase: You can Fusion Summon 1 Dinosaur Fusion Monster from your Extra Deck, using monsters from your hand or field + local fusion_params={fusfilter=function(c) return c:IsRace(RACE_DINOSAUR) end} + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) + --If this card is sent to the GY: You can make all Dinosaur monsters you currently control gain 400 ATK + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.atktg) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) +end +s.listeds_series={SET_GMX} +function s.thfilter(c) + return c:IsSetCard(SET_GMX) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_DINOSAUR),tp,LOCATION_MZONE,0,1,nil) end +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_DINOSAUR),tp,LOCATION_MZONE,0,nil) + for tc in g:Iter() do + --All Dinosaur monsters you currently control gain 400 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(400) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c56034579.lua b/official/c56034579.lua new file mode 100644 index 0000000000..6922a12b8c --- /dev/null +++ b/official/c56034579.lua @@ -0,0 +1,81 @@ +--JP name +--GMX Chairman Kimridge +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand; add 1 "GMX Applied Experiment #55" from your Deck or GY to your hand, and if you do, shuffle this card into the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card is Special Summoned by a monster effect: You can target 2 cards in your GY, that are "GMX" cards and/or Dinosaur monsters; place them on top of your Deck in any order, then you can destroy 1 Attack Position monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_names={18795635} --"GMX Applied Experiment #55" +s.listed_series={SET_GMX} +function s.thfilter(c) + return c:IsCode(18795635) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + if c:IsRelateToEffect(e) then + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end +end +function s.tdfilter(c) + return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) and c:IsAbleToDeck() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,2,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT)>0 + and tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then + if Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK)==2 then + Duel.SortDecktop(tp,tp,2) + end + if Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/official/c56311997.lua b/official/c56311997.lua new file mode 100644 index 0000000000..e0149017d6 --- /dev/null +++ b/official/c56311997.lua @@ -0,0 +1,107 @@ +--JP name +--GMX - ALLOS +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "GMX" monster + 1 Dinosaur monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GMX),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR)) + --Each time your opponent Normal or Special Summons a monster(s), gain 200 LP + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e1a:SetOperation(s.lpop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --You can target 1 "GMX" monster or 1 Dinosaur monster in your GY or banishment; Special Summon it. This card cannot attack the turn this effect is activated + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --At the start of the Damage Step, if this card battles an opponent's monster: You can destroy that monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_BATTLE_START) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_series={SET_GMX} +s.material_setcode={SET_GMX} +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsChainSolving() then + Duel.Recover(tp,200,REASON_EFFECT) + else + local c=e:GetHandler() + --Gain 200 LP at the end of the Chain Link + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVED) + e1:SetRange(LOCATION_MZONE) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) return Duel.Recover(tp,200,REASON_EFFECT) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) + c:RegisterEffect(e1) + --Reset "e1" at the end of the Chain Link + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVED) + e2:SetOperation(function() e1:Reset() end) + e2:SetReset(RESET_CHAIN) + Duel.RegisterEffect(e2,tp) + end +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:GetAttackAnnouncedCount()==0 end + --This card cannot attack the turn this effect is activated + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return (c:IsSetCard(SET_GMX) or 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 chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return bc and bc:IsControler(1-tp) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + if bc:IsRelateToBattle() then + Duel.Destroy(bc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c57256127.lua b/official/c57256127.lua new file mode 100644 index 0000000000..8758712866 --- /dev/null +++ b/official/c57256127.lua @@ -0,0 +1,97 @@ +--JP name +--Shipping Archfiend +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can target any number of face-up monsters on the field, and declare 1 Type or Attribute; they become that Type or Attribute + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.changetg) + e1:SetOperation(s.changeop) + c:RegisterEffect(e1) + --If a monster(s) is Special Summoned to your opponent's field, while this card is in your Monster Zone (except during the Damage Step): You can target 1 monster on each field with the same Type and Attribute from each other; return them to the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsControler,1,nil,1-tp) end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) + c:RegisterEffect(e2) +end +function s.single_property_filter(c,func) + local property=func(c) + return property&(property-1)==0 +end +function s.get_excluded_values(tg,func) + return tg:Filter(s.single_property_filter,nil,func):GetBitwiseOr(func) +end +function s.changetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + if not (chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()) then return false end + local op,val=e:GetLabel() + return (op==1 and chkc:IsRaceExcept(val)) or (op==2 and chkc:IsAttributeExcept(val)) + end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + local max_target_count=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,max_target_count,nil) + local excluded_races=s.get_excluded_values(tg,Card.GetRace) + local excluded_attributes=s.get_excluded_values(tg,Card.GetAttribute) + local b1=(excluded_races&RACE_ALL)~=RACE_ALL + local b2=(excluded_attributes&ATTRIBUTE_ALL)~=ATTRIBUTE_ALL + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + local decl_race_attr=0 + if op==1 then + decl_race_attr=Duel.AnnounceRace(tp,1,RACE_ALL&~excluded_races) + elseif op==2 then + decl_race_attr=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~excluded_attributes) + end + e:SetLabel(op,decl_race_attr) +end +function s.changeop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) + if #tg==0 then return end + local c=e:GetHandler() + local op,decl_race_attr=e:GetLabel() + local eff_code=op==1 and EFFECT_CHANGE_RACE or EFFECT_CHANGE_ATTRIBUTE + for tc in tg:Iter() do + --They become that Type or Attribute + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(eff_code) + e1:SetValue(decl_race_attr) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.rescon(sg,e,tp,mg) + return #sg==2 and sg:GetClassCount(Card.GetControler)==2 + and sg:GetClassCount(Card.GetRace)==1 + and sg:GetClassCount(Card.GetAttribute)==1 +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RTOHAND) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,2,tp,0) +end +function s.rthop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c68378605.lua b/official/c68378605.lua new file mode 100644 index 0000000000..60788b2ca3 --- /dev/null +++ b/official/c68378605.lua @@ -0,0 +1,84 @@ +--JP name +--Vodnika the Fountain Spirit +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If a Level 10 monster(s) is sent to the GY, except "Vodnika the Fountain Spirit" (except during the Damage Step): You can Special Summon this card from your GY (if it was there when the monster was sent) or hand (even if not) in Defense Position, but banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e1:SetCode(EVENT_TO_GRAVE) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --You can target 1 Level 10 monster in your GY; Special Summon it to your opponent's field (but negate its effects), then draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.selfspconfilter(c) + return c:IsLevel(10) and not c:IsCode(id) +end +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.selfspconfilter,1,nil) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() +end +function s.gyspfilter(c,e,tp) + return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) +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 + if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.IsPlayerCanDraw(tp,1) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_MZONE) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(e:GetHandler()) + end + if Duel.SpecialSummonComplete()>0 and Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c69191257.lua b/official/c69191257.lua new file mode 100644 index 0000000000..92116798d7 --- /dev/null +++ b/official/c69191257.lua @@ -0,0 +1,99 @@ +--JP name +--Jade Dragon Mech +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuners + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --If this card is Special Summoned: You can send 1 Machine Tuner from your Deck to the GY, or if you control a monster whose current Level is different from its original Level, you can Special Summon it instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.tgsptg) + e1:SetOperation(s.tgspop) + c:RegisterEffect(e1) + --If this Synchro Summoned card is destroyed by card effect and sent to the GY: You can banish any number of Tuners from your GY, then target that many cards on the field; destroy them + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCondition(s.descon) + e2:SetCost(s.descost) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.difflvfilter(c) + return c:HasLevel() and c:IsFaceup() and not c:IsLevel(c:GetOriginalLevel()) +end +function s.tgspfilter(c,e,tp,mmz_extra_chk) + return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_TUNER) and (c:IsAbleToGrave() or (mmz_extra_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local mmz_extra_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.difflvfilter,tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_extra_chk) end + if not mmz_extra_chk then + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + else + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.tgspop(e,tp,eg,ep,ev,re,r,rp) + local mmz_extra_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.difflvfilter,tp,LOCATION_MZONE,0,1,nil) + local hint=mmz_extra_chk and aux.Stringid(id,2) or HINTMSG_TOGRAVE + Duel.Hint(HINT_SELECTMSG,tp,hint) + local sc=Duel.SelectMatchingCard(tp,s.tgspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_extra_chk):GetFirst() + if not sc then return end + local op=1 + if mmz_extra_chk then + local b1=sc:IsAbleToGrave() + local b2=sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + end + if op==1 then + Duel.SendtoGrave(sc,REASON_EFFECT) + elseif op==2 then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsSynchroSummoned() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) +end +function s.descostfilter(c) + return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_GRAVE,0,1,nil) end + local max_target_count=Duel.GetTargetCount(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_GRAVE,0,1,max_target_count,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + e:SetLabel(#g) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + local target_count=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,target_count,target_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end diff --git a/official/c82706696.lua b/official/c82706696.lua new file mode 100644 index 0000000000..167a0d475e --- /dev/null +++ b/official/c82706696.lua @@ -0,0 +1,104 @@ +--JP name +--GMX - VELOX +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "GMX" monster + 1 Dinosaur monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GMX),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR)) + --Each time your opponent Normal or Special Summons a monster(s), gain 200 LP + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e1a:SetOperation(s.lpop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --During your opponent's turn (Quick Effect): You can target 1 card your opponent controls; excavate the top cards of your Deck until you excavate a "GMX" monster or a Dinosaur monster, lose 400 LP for each excavated card, add that "GMX" monster or Dinosaur monster to your hand or Special Summon it, and shuffle the rest into the Deck. Also, after that, destroy the targeted card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.excavtg) + e2:SetOperation(s.excavop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_GMX} +s.material_setcode={SET_GMX} +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsChainSolving() then + Duel.Recover(tp,200,REASON_EFFECT) + else + local c=e:GetHandler() + --Gain 200 LP at the end of the Chain Link + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVED) + e1:SetRange(LOCATION_MZONE) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) return Duel.Recover(tp,200,REASON_EFFECT) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) + c:RegisterEffect(e1) + --Reset "e1" at the end of the Chain Link + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVED) + e2:SetOperation(function() e1:Reset() end) + e2:SetReset(RESET_CHAIN) + Duel.RegisterEffect(e2,tp) + end +end +function s.thspfilter(c,e,tp,mmz_chk) + return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) and c:IsMonster() and (c:IsAbleToHand() + or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) + and Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.excavop(e,tp,eg,ep,ev,re,r,rp) + local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) + if deck_count>0 then + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local g=Duel.GetMatchingGroup(s.thspfilter,tp,LOCATION_DECK,0,nil,e,tp,mmz_chk) + if #g==0 then + Duel.ConfirmDecktop(tp,deck_count) + Duel.SetLP(tp,Duel.GetLP(tp)-deck_count*400) + else + local sc=g:GetMaxGroup(Card.GetSequence):GetFirst() + local sc_seq=sc:GetSequence() + local excav_count=deck_count-sc_seq + Duel.ConfirmDecktop(tp,excav_count) + Duel.SetLP(tp,Duel.GetLP(tp)-excav_count*400) + aux.ToHandOrElse(sc,tp, + function() + return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end, + aux.Stringid(id,1) + ) + end + end + Duel.ShuffleDeck(tp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.BreakEffect() + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c83528184.lua b/official/c83528184.lua new file mode 100644 index 0000000000..5d51e57786 --- /dev/null +++ b/official/c83528184.lua @@ -0,0 +1,80 @@ +--JP name +--GMX Associate Noma +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is Special Summoned by a monster effect: You can target 1 card each from your GY and your opponent's GY; place each card on either the top or bottom of the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) + e1:SetTarget(s.tdtg) + e1:SetOperation(s.tdop) + c:RegisterEffect(e1) + --If a monster is Normal or Special Summoned to your opponent's field, while this card is in your Monster Zone (except during the Damage Step): You can Fusion Summon 1 "GMX" Fusion Monster from your Extra Deck, by shuffling its materials from your field, GY, and/or banishment into the Deck + local fusion_params={ + fusfilter=function(c) return c:IsSetCard(SET_GMX) end, + matfilter=Fusion.OnFieldMat(Card.IsAbleToDeck), + extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) end, + extraop=Fusion.ShuffleMaterial, + extratg=s.extratg + } + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_FUSION_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) + e2a:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2a:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_GMX} +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetTargetGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,2,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + local op,sequence=nil + local your_g,opp_g=tg:Split(Card.IsControler,nil,tp) + if #your_g>0 then + s.place_on_top_or_bottom(your_g,tp,tp) + end + if #opp_g>0 then + s.place_on_top_or_bottom(opp_g,1-tp,tp) + end +end +function s.place_on_top_or_bottom(group,owner,trig_player) + local op=nil + if Duel.GetFieldGroupCount(owner,LOCATION_DECK,0)==0 then + op=1 + else + local offset=(owner~=trig_player) and 2 or 0 + op=Duel.SelectEffect(trig_player, + {true,aux.Stringid(id,2+offset)}, + {true,aux.Stringid(id,3+offset)}) + end + local sequence=op==1 and SEQ_DECKTOP or SEQ_DECKBOTTOM + Duel.SendtoDeck(group,nil,sequence,REASON_EFFECT) + if op==1 then Duel.ConfirmDecktop(owner,1) end +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED) +end \ No newline at end of file diff --git a/official/c94467314.lua b/official/c94467314.lua new file mode 100644 index 0000000000..682deca7c9 --- /dev/null +++ b/official/c94467314.lua @@ -0,0 +1,60 @@ +--JP name +--Rain of Frogs +local s,id=GetID() +function s.initial_effect(c) + --If you control an Aqua monster with 2000 or more ATK: Send all monsters on the field to the GY, except Aqua monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --f this Set card is destroyed by card effect: You can Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SET) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.setcon) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +function s.confilter(c) + return c:IsRace(RACE_AQUA) and c:IsAttackAbove(2000) and c:IsFaceup() +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsRace,RACE_AQUA)),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsRace,RACE_AQUA)),tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + Duel.SetOperationInfo(0,CATEGORY_SET,c,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/official/c94641726.lua b/official/c94641726.lua new file mode 100644 index 0000000000..f81c0f5520 --- /dev/null +++ b/official/c94641726.lua @@ -0,0 +1,88 @@ +--JP name +--Storm-Bane Dragon Destorbim +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non Tuners + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Your opponent cannot target this card with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --You can banish any number of DARK monsters from your GY that cannot be Normal Summoned/Set; banish that many cards your opponent controls. This is a Quick Effect if your opponent controls more cards than you do + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_REMOVE) + e2a:SetType(EFFECT_TYPE_IGNITION) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,{id,0}) + e2a:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)<=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end) + e2a:SetCost(s.bancost) + e2a:SetTarget(s.bantg) + e2a:SetOperation(s.banop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetType(EFFECT_TYPE_QUICK_O) + e2b:SetCode(EVENT_FREE_CHAIN) + e2b:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end) + e2b:SetHintTiming(TIMING_SPSUMMON,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2b) + --If this card is sent to the GY: You can Special Summon 1 of your banished Dragon monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.bancostfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsSummonableCard() and c:IsAbleToRemoveAsCost() +end +function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.bancostfilter,tp,LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end + local max_count=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.bancostfilter,tp,LOCATION_GRAVE,0,1,max_count,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + e:SetLabel(#g) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetLabel(),1-tp,LOCATION_ONFIELD) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local banish_count=e:GetLabel() + if Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) +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_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c95589901.lua b/official/c95589901.lua new file mode 100644 index 0000000000..af00f80076 --- /dev/null +++ b/official/c95589901.lua @@ -0,0 +1,69 @@ +--JP name +--Mischief of the Wolves +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --During your Main Phase, if this card is in your GY because it was sent there this turn: You can target 1 face-up card you control; destroy it, and if you do, add this card to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():GetTurnID()==Duel.GetTurnCount() end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsLevelAbove,3),tp,0,LOCATION_MZONE,1,nil) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,nil,1,PLAYER_ALL,LOCATION_MZONE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local break_chk=false + local opp_g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelAbove,3),tp,0,LOCATION_MZONE,nil) + if #opp_g>0 then + break_chk=true + for opp_c in opp_g:Iter() do + --● Reduce the Levels of all monsters your opponent controls by 2 + opp_c:UpdateLevel(-2,nil,c) + end + end + local your_g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,nil) + if #your_g>0 then + if break_chk then Duel.BreakEffect() end + for your_c in your_g:Iter() do + --● Increase the Levels of all monsters you control by 2 + your_c:UpdateLevel(2,nil,c) + end + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100200284.lua b/pre-release/c100200284.lua new file mode 100644 index 0000000000..e3d425e730 --- /dev/null +++ b/pre-release/c100200284.lua @@ -0,0 +1,81 @@ +--憑依共鳴-ウィン +--Possessed Resonance - Wynn +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Spellcaster monster + 1 WIND monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WIND)) + --If this card is Fusion Summoned: You can place 1 WIND monster from your GY on the bottom of the Deck, then target 1 monster your opponent controls; take control of it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) + e1:SetCost(s.controlcost) + e1:SetTarget(s.controltg) + e1:SetOperation(s.controlop) + c:RegisterEffect(e1) + --During your opponent's turn (Quick Effect): You can target 2 cards on the field, including a WIND monster you control; place them on the bottom of the Deck in any order + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_FAMILIAR_POSSESSED} +function s.controlcostfilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToDeckAsCost() +end +function s.controlcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.controlcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.controlcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST) +end +function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end + if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) +end +function s.controlop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.GetControl(tc,tp) + end +end +function s.resconfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsControler(tp) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(s.resconfilter,1,nil,tp) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end + local g=Duel.GetTargetGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,2,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)==2 + and tg:GetClassCount(Card.GetControler)==1 then + Duel.SortDeckbottom(tp,tg:GetFirst():GetControler(),2) + end +end \ No newline at end of file diff --git a/pre-release/c100451001.lua b/pre-release/c100451001.lua new file mode 100644 index 0000000000..1aa75dcfbc --- /dev/null +++ b/pre-release/c100451001.lua @@ -0,0 +1,73 @@ +--王のしもべ-ブラック・マジシャン +--Dark Magician, the Pharaoh's Servant +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Change name + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e1:SetValue(CARD_DARK_MAGICIAN) + c:RegisterEffect(e1) + --special summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.Reveal(function(c) return c:IsSpell() end)) + e2:SetTarget(s.hsptg) + e2:SetOperation(s.hspop) + c:RegisterEffect(e2) + --destroy + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCost(Cost.Discard(function(c) return c:IsSpell() end)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) + c:RegisterEffect(e3) +end +s.listed_names={CARD_DARK_MAGICIAN} +function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.setfilter(c) + return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and c:IsSSetable() +end +function s.hspop(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 then + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SSet(tp,sg) + end + end + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100451002.lua b/pre-release/c100451002.lua new file mode 100644 index 0000000000..266435ccd2 --- /dev/null +++ b/pre-release/c100451002.lua @@ -0,0 +1,97 @@ +--増殖するクリボー! +--Multiplying Kuriboh! +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect, or an opponent's monster declares an attack (Quick Effect): You can Special Summon this card from your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1a:SetType(EFFECT_TYPE_QUICK_O) + e1a:SetCode(EVENT_CHAINING) + e1a:SetRange(LOCATION_HAND) + e1a:SetCountLimit(1,id) + e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() end) + e1a:SetTarget(s.selfsptg) + e1a:SetOperation(s.selfspop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_ATTACK_ANNOUNCE) + e1b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + c:RegisterEffect(e1b) + --Once per turn, when your opponent activates a monster effect on the field, or during damage calculation, when an opponent's monster attacks (Quick Effect): You can add to your hand, or Special Summon, 1 "Dark Magician" or 1 monster with 300 ATK/200 DEF from your Deck or GY, then you can change that opponent's monster's ATK to 0 + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e2a:SetType(EFFECT_TYPE_QUICK_O) + e2a:SetCode(EVENT_CHAINING) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) + e2a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_MZONE>0 end) + e2a:SetTarget(s.thsptg) + e2a:SetOperation(s.thspop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e2b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + c:RegisterEffect(e2b) +end +s.listed_names={CARD_DARK_MAGICIAN} +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thspfilter(c,e,tp,mmz_chk) + return (c:IsCode(CARD_DARK_MAGICIAN) or (c:IsAttack(300) and c:IsDefense(200))) and (c:IsAbleToHand() + or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,mmz_chk) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not sc then return end + local res=aux.ToHandOrElse(sc,tp, + function() return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function() return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,3) + ) + if res==0 then return end + if sc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end + local opp_card=nil + local relation_chk=false + if not Duel.IsDamageStep() then + opp_card=re:GetHandler() + relation_chk=opp_card:IsRelateToEffect(re) + else + opp_card=Duel.GetAttacker() + relation_chk=opp_card:IsRelateToBattle() + end + if relation_chk and opp_card:IsFaceup() and opp_card:IsControler(1-tp) and not opp_card:IsAttack(0) + and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.BreakEffect() + --Change that opponent's monster's ATK to 0 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + opp_card:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c100451004.lua b/pre-release/c100451004.lua new file mode 100644 index 0000000000..94070de536 --- /dev/null +++ b/pre-release/c100451004.lua @@ -0,0 +1,74 @@ +--F・HERO シャイニング・フレア・ウィングマン +--Favorite HERO Shining Flare Wingman +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Fusion Monster + 1 face-up monster on the field + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),s.matfilter) + --to deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW|CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) + --Inflict damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCondition(aux.bdcon) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.matfilter(c) + return c:IsFaceup() and c:IsOnField() +end +function s.tdfilter(c) + return c:IsMonster() and c:IsAbleToDeck() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) + and Duel.IsPlayerCanDraw(tp,2) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(2) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) + if #g~=5 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 then + if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + Duel.BreakEffect() + if Duel.Draw(p,d,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then + c:UpdateAttack(1000) + end + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() + if dam<0 then dam=0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c100451006.lua b/pre-release/c100451006.lua new file mode 100644 index 0000000000..cd0c62ba51 --- /dev/null +++ b/pre-release/c100451006.lua @@ -0,0 +1,80 @@ +--ハネクリボー・サバティエル LV10 +--Winged Kuriboh Sabatiel LV10 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand and pay half your LP; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck to your hand, and if you do, shuffle this card into the Deck, also you cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.AND(Cost.SelfReveal,Cost.PayLP(1/2))) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --During your opponent's turn, if your LP are 1000 or less (Quick Effect): You can Special Summon this card from your hand, then you can inflict damage to your opponent equal to the highest ATK among the monsters they control (your choice, if tied) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.GetLP(tp)<=1000 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.LVnum=10 +s.LVset=SET_WINGED_KURIBOH +s.listed_series={SET_FUSION,SET_HERO} +function s.thfilter(c) + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + if c:IsRelateToEffect(e) then + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) +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 then + local _,dam=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) + if dam and dam>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.Damage(1-tp,dam,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c100451007.lua b/pre-release/c100451007.lua new file mode 100644 index 0000000000..1f8566084b --- /dev/null +++ b/pre-release/c100451007.lua @@ -0,0 +1,89 @@ +--スターダスト・ドラゴン-ヴィクテム・サンクチュアリ +--Stardust Dragon - Victim Sanctuary +--scripted by pyrQ +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) + --When your opponent activates a card or effect in response to your card or effect activation (Quick Effect): You can Tribute this card; negate that opponent's effect, and if you do, destroy that card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.discon) + e1:SetCost(Cost.AND(aux.StardustCost,Cost.HardOncePerChain(id))) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --If a monster(s) in your possession was Tributed this turn (Quick Effect): You can banish this card from your GY; Special Summon 1 "Stardust" Synchro Monster from your Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id+100) end) + e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.HardOncePerChain(id))) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) + --Keep track of monsters being Tributed + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_RELEASE) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_STARDUST} +function s.checkfilter(c) + return c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local g=eg:Filter(s.checkfilter,nil) + if g:IsExists(Card.IsPreviousControler,1,nil,0) then + Duel.RegisterFlagEffect(0,id+100,RESET_PHASE|PHASE_END,0,1) + end + if g:IsExists(Card.IsPreviousControler,1,nil,1) then + Duel.RegisterFlagEffect(1,id+100,RESET_PHASE|PHASE_END,0,1) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local ch=Duel.GetCurrentChain()-1 + return ch>0 and ep==1-tp and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER)==tp and Duel.IsChainDisablable(ev) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_STARDUST) and c:IsSynchroMonster() 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 \ No newline at end of file diff --git a/pre-release/c100451008.lua b/pre-release/c100451008.lua new file mode 100644 index 0000000000..a32e949b6a --- /dev/null +++ b/pre-release/c100451008.lua @@ -0,0 +1,84 @@ +--スタージャンク・シンクロン +--Starjunk Synchron +local s,id=GetID() +function s.initial_effect(c) + --For a Synchro Summon, you can substitute this card for any 1 "Synchron" Tuner ("Quickdraw Synchron") + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(20932152) + c:RegisterEffect(e0) + --If this card is in your hand: You can target 1 Level 2 or lower monster in your GY; Special Summon this card, and if you do, Special Summon that monster, but negate its effects, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --You can banish this card from your GY; "Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SYNCHRON} +s.listed_names={CARD_JUNK_WARRIOR} +function s.spfilter(c,e,tp) + return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local c=e:GetHandler() + if chk==0 then return Duel.GetMZoneCount(tp)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + 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:AddCard(c),2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(c) + end + Duel.SpecialSummonComplete() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --"Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetTargetRange(LOCATION_ONFIELD,0) + e1:SetTarget(function(e,c) return c:IsCode(CARD_JUNK_WARRIOR) and c:IsFaceup() end) + e1:SetValue(aux.indoval) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100451010.lua b/pre-release/c100451010.lua new file mode 100644 index 0000000000..7df68f2449 --- /dev/null +++ b/pre-release/c100451010.lua @@ -0,0 +1,104 @@ +--No.39 光の使者 希望皇ホープ +--Number 39: Utopia the Envoy of Light +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Cannot be destroyed by battle, except with a "Number" monster + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) + c:RegisterEffect(e1) + --(Quick Effect): You can detach 1 material from this card, then target 1 monster you control; the first time it would be destroyed by battle or card effect this turn, it is not destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.DetachFromSelf(1)) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) + --When the second attack of this turn is declared: You can make this card gain 2500 ATK, and if you do, it gains this effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function() return Duel.GetFlagEffect(0,id)==1 end) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) + --Keep track of attacks being declared + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_ATTACK_ANNOUNCE) + ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_NUMBER} +s.xyz_number=39 +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + --The first time it would be destroyed by battle or card effect this turn, it is not destroyed + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3001) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetCountLimit(1) + e1:SetValue(s.indesval) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.indesval(e,re,r,rp) + if r&(REASON_BATTLE|REASON_EFFECT)>0 then + e:Reset() + return true + end + return false +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 2500 ATK + c:UpdateAttack(2500) + --When this card destroys a monster by battle and sends it to the GY: You can Special Summon it to your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(aux.bdgcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetTargetCard(bc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100451011.lua b/pre-release/c100451011.lua new file mode 100644 index 0000000000..06d2747b3e --- /dev/null +++ b/pre-release/c100451011.lua @@ -0,0 +1,71 @@ +--ガガガマジシャン-ガガガマジック +--Gagaga Magician - Gagaga Magic +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can Special Summon both it and 1 other "Zubaba", "Gagaga", "Gogogo", or "Dododo" monster from your hand or GY, except "Gagaga Magician - Gagaga Magic", and if you do, immediately after this effect resolves, Xyz Summon 1 "Zubaba", "Gagaga", "Gogogo", "Dododo", "Djinn", "Heroic Champion", "Number", "ZW -", or "ZS -" Xyz Monster using only those 2 monsters. When you do, treat the Level of 1 of the monsters the same as the other monster's + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS} +s.listed_names={id} +local function samexyzlevel(handler,mc,lv) + --When you do, treat the Level of 1 of the monsters the same as the other monster's + local e1=Effect.CreateEffect(handler) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_XYZ_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + mc:RegisterEffect(e1,true) + return e1 +end +function s.handgyspfilter(c,e,tp,mc) + if c:IsCode(id) then return false end + if not (c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + local e1=samexyzlevel(c,c,mc:GetLevel()) + local e2=samexyzlevel(c,mc,c:GetLevel()) + local res=Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(mc,c)) + if e1 then e1:Reset() end + if e2 then e2:Reset() end + return res +end +function s.extraspfilter(c,e,tp,mg) + return c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS}) + and c:IsXyzMonster() and c:IsXyzSummonable(nil,mg,2,2) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetMZoneCount(tp)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.handgyspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,c,e,tp,c) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>=2) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.handgyspfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,c):GetFirst() + if not sc then return end + local g=Group.FromCards(c,sc) + if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then + local e1=samexyzlevel(c,c,sc:GetLevel()) + local e2=samexyzlevel(c,sc,c:GetLevel()) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xyz=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g):GetFirst() + if xyz then + Duel.XyzSummon(tp,xyz,g,nil,2,2) + else + if e1 then e1:Reset() end + if e2 then e2:Reset() end + end + end +end \ No newline at end of file diff --git a/pre-release/c100451013.lua b/pre-release/c100451013.lua new file mode 100644 index 0000000000..5aa26c910d --- /dev/null +++ b/pre-release/c100451013.lua @@ -0,0 +1,130 @@ +--四天の龍 オッドアイズ・ペンデュラム・ドラゴン +--Odd-Eyes Pendulum Dragon of the Four Heavenly Dragons +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --search and destroy + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY|CATEGORY_TOHAND|CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --atk up + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e2:SetValue(s.atkval) + c:RegisterEffect(e2) + --double damage + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e3:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) + c:RegisterEffect(e3) + --to hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.thcon2) + e4:SetTarget(s.thtg2) + e4:SetOperation(s.thop2) + c:RegisterEffect(e4) +end +function s.thfilter(c) + return c:IsPendulumMonster() and c:IsAttackBelow(1500) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.actlimit) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetLabelObject(e1) + e0:SetOperation(s.checkop) + e0:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e0,tp) +end +function s.actlimit(e,re) + local rc=re:GetHandler() + return rc and rc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() +end +function s.psfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local ef=e:GetLabelObject() + if ef and eg and eg:IsExists(s.psfilter,1,nil,tp) then + ef:Reset() + e:Reset() + end +end +function s.atkval(e,c) + local pg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_PZONE,0) + if #pg~=2 then return 0 end + local pc1,pc2=pg:GetFirst(),pg:GetNext() + return math.abs(pc1:GetScale()-pc2:GetScale())*300 +end +function s.thcon2(e,tp,eg,ep,ev,re,r,rp) + return r&(REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) +end +function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + if rp==1-tp then + e:SetLabel(1) + else + e:SetLabel(0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) + if e:GetLabel()==1 then + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) + end +end +function s.thop2(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 + and e:GetLabel()==1 and c:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(tp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100451014.lua b/pre-release/c100451014.lua new file mode 100644 index 0000000000..3b6209cf6f --- /dev/null +++ b/pre-release/c100451014.lua @@ -0,0 +1,121 @@ +--星読みの魔術師-ホロスコープ・マジシャン +--Horoscope Sorcerer, the Stargazer Magician +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --When a Spell Card or effect activated by your opponent resolves, if you control a "Magician" Pendulum Monster or "Odd-Eyes" monster, you can negate that effect, then destroy this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.discon) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --You can discard 1 other "Magician" Pendulum Monster, "Performapal" monster, or "Odd-Eyes" monster; Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.Discard(s.spcostfilter,true)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --If this card is Special Summoned: You can add 1 Pendulum Monster with 2500 ATK from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.deckthtg) + e3:SetOperation(s.deckthop) + c:RegisterEffect(e3) + --You can target 1 Pendulum Monster Card you control; destroy it, then you can add 1 face-up Pendulum Monster from your Extra Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,2}) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_series={SET_MAGICIAN,SET_ODD_EYES,SET_PERFORMAPAL} +function s.disconfilter(c) + return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard(SET_ODD_EYES)) and c:IsFaceup() +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,3)) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.Hint(HINT_CARD,0,id) + if Duel.NegateEffect(ev) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.spcostfilter(c) + return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard({SET_ODD_EYES,SET_PERFORMAPAL})) and c:IsMonster() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.deckthfilter(c) + return c:IsPendulumMonster() and c:IsAttack(2500) and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsType(TYPE_PENDULUM) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) +end +function s.extrathfilter(c) + return c:IsPendulumMonster() and c:IsFaceup() and c:IsAbleToHand() +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(s.extrathfilter,tp,LOCATION_EXTRA,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.extrathfilter,tp,LOCATION_EXTRA,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end \ No newline at end of file diff --git a/pre-release/c100451016.lua b/pre-release/c100451016.lua new file mode 100644 index 0000000000..ceef53244d --- /dev/null +++ b/pre-release/c100451016.lua @@ -0,0 +1,74 @@ +--デコード・トーカー・インテグレーション +--Decode Talker Integration +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) + --atk up + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_EMZONE) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --cannot be target + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetRange(LOCATION_EMZONE) + e2:SetValue(aux.tgoval) + c:RegisterEffect(e2) + --to grave + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCost(s.cost) + e3:SetTarget(s.target) + e3:SetOperation(s.operation) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +function s.atkval(e,c) + return Duel.GetMatchingGroupCount(Card.IsLinkMonster,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,e:GetHandler())*500 +end +function s.cfilter(c,g) + return g:IsContains(c) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local lg=e:GetHandler():GetLinkedGroup() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,lg) end + local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,lg) + Duel.Release(g,REASON_COST) +end +function s.filter(c) + return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil) + if #g==0 then return end + Duel.SendtoGrave(g,REASON_EFFECT) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c100451017.lua b/pre-release/c100451017.lua new file mode 100644 index 0000000000..60c06594ae --- /dev/null +++ b/pre-release/c100451017.lua @@ -0,0 +1,119 @@ +--サイバース・コード・マジシャン +--Cyberse Code Magician +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --If a Link Monster you control would be used as Link Material for a Cyberse monster, this card in your hand can also be used as material + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_EXTRA_MATERIAL) + e1:SetRange(LOCATION_HAND) + e1:SetTargetRange(1,0) + e1:SetOperation(s.extracon) + e1:SetValue(s.extraval) + c:RegisterEffect(e1) + if s.flagmap1==nil then + s.flagmap1={} + end + if s.flagmap1[c]==nil then + s.flagmap1[c] = {} + end + --If this card is sent from the hand or field to the GY: You can send 1 Cyberse monster from your Deck to the GY, or if this Ritual Summoned card was sent to the GY, you can Special Summon that monster instead, also in either case, you cannot Special Summon for the rest of this turn, except Cyberse monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end) + e2:SetTarget(s.tgsptg) + e2:SetOperation(s.tgspop) + c:RegisterEffect(e2) +end +s.listed_names={34767865} --"Cynet Ritual" +function s.extrafilter(c,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) +end +function s.extracon(c,e,tp,sg,mg,lc,og,chk) + return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsLinkMonster,1,og) and + sg:FilterCount(Card.HasFlagEffect,nil,id)<2 +end +function s.extraval(chk,summon_type,e,...) + local c=e:GetHandler() + if chk==0 then + local tp,sc=... + if summon_type~=SUMMON_TYPE_LINK or not sc:IsRace(RACE_CYBERSE) or Duel.GetFlagEffect(tp,id)>0 then + return Group.CreateGroup() + else + table.insert(s.flagmap1[c],c:RegisterFlagEffect(id,0,0,1)) + return Group.FromCards(c) + end + elseif chk==1 then + local sg,sc,tp=... + if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then + Duel.Hint(HINT_CARD,tp,id) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + end + elseif chk==2 then + for _,eff in ipairs(s.flagmap1[c]) do + eff:Reset() + end + s.flagmap1[c]={} + end +end +function s.tgspfilter(c,e,tp,mmz_ritsum_chk) + return c:IsRace(RACE_CYBERSE) and (c:IsAbleToGrave() or (mmz_ritsum_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ritual_summoned_chk=e:GetHandler():IsRitualSummoned() + if chk==0 then + local mmz_ritsum_chk=ritual_summoned_chk and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.tgspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_ritsum_chk) + end + if not ritual_summoned_chk then + e:SetLabel(0) + e:SetCategory(CATEGORY_TOGRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + else + e:SetLabel(1) + e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + end +end +function s.tgspop(e,tp,eg,ep,ev,re,r,rp) + local mmz_ritsum_chk=e:GetLabel()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local hint=mmz_ritsum_chk and aux.Stringid(id,1) or HINTMSG_TOGRAVE + Duel.Hint(HINT_SELECTMSG,tp,hint) + local sc=Duel.SelectMatchingCard(tp,s.tgspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_ritsum_chk):GetFirst() + if sc then + local op=nil + if not mmz_ritsum_chk then + op=1 + else + local b1=sc:IsAbleToGrave() + local b2=sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + end + if op==1 then + Duel.SendtoGrave(sc,REASON_EFFECT) + elseif op==2 then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except Cyberse monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_CYBERSE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100451019.lua b/pre-release/c100451019.lua new file mode 100644 index 0000000000..d3ccd4dfdb --- /dev/null +++ b/pre-release/c100451019.lua @@ -0,0 +1,90 @@ +--黄泉天輪 +--Underworld Circle +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Allow each player to Special Summon 1 monster from their GY during the Standby Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,5,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_GRAVE,5,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spnormalfilter(c,e,tp) + return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local rg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToRemove,Card.IsMonster),tp,LOCATION_DECK,LOCATION_DECK,nil) + if #rg==0 then return end + Duel.BreakEffect() + if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.ignoresumconsp(e,p) + if Duel.GetLocationCount(p,LOCATION_MZONE)==0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,p,LOCATION_GRAVE,0,nil,e,p) + if #g==0 or not Duel.SelectYesNo(p,aux.Stringid(id,3)) then return end + Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) + local tc=g:Select(p,1,1,nil):GetFirst() + if tc and Duel.SpecialSummonStep(tc,0,p,p,true,false,POS_FACEUP) then + --Banish it if it leaves the field + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + tc:RegisterEffect(e1,true) + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local turn_p=Duel.GetTurnPlayer() + s.ignoresumconsp(e,turn_p) + s.ignoresumconsp(e,1-turn_p) + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100451025.lua b/pre-release/c100451025.lua new file mode 100644 index 0000000000..66b9443318 --- /dev/null +++ b/pre-release/c100451025.lua @@ -0,0 +1,112 @@ +--大精霊機巧軍-ペンデュラム・ルーラー +--Master Spirit Tech Force - Pendulum Ruler +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c,false) + --Fusion Materials: 1 Level 7 or higher Pendulum Monster + 1 Pendulum Monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) + --During your Main Phase: You can return this card to the Extra Deck, then you can add 1 Level 7 Pendulum Monster from your Deck or face-up Extra Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.textg) + e1:SetOperation(s.texop) + c:RegisterEffect(e1) + --Cannot be destroyed by card effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(1) + c:RegisterEffect(e2) + --Your opponent's monsters cannot attack, except Pendulum Monsters without a Level + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_CANNOT_ATTACK) + e3:SetRange(LOCATION_MZONE) + e3:SetTarget(function(e,c) return not (c:IsPendulumMonster() and not c:HasLevel()) end) + e3:SetTargetRange(0,LOCATION_MZONE) + c:RegisterEffect(e3) + --You can Tribute 1 monster, then target 1 card your opponent controls; destroy it, and if you do, inflict 1600 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(2,{id,1}) + e4:SetCost(s.descost) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) + --Once per turn: You can place this card in your Pendulum Zone + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,2)) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e5:SetOperation(s.plop) + c:RegisterEffect(e5) +end +function s.matfilter(c,fc,sumtype,tp) + return c:IsLevelAbove(7) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) +end +function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToExtra() end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.thfilter(c) + return c:IsLevel(7) and c:IsPendulumMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToHand() +end +function s.texop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.descostfilter(c,tp) + local exg=c:GetEquipGroup()+c + return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,exg) +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,1,false,nil,nil,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,1,1,false,nil,nil,tp) + Duel.Release(g,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,1600,REASON_EFFECT) + 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_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c100451026.lua b/pre-release/c100451026.lua new file mode 100644 index 0000000000..012c754cab --- /dev/null +++ b/pre-release/c100451026.lua @@ -0,0 +1,153 @@ +--W:Pファンシーボール +--W:P Fancy Ball +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) + --When your opponent activates a monster effect on the field or GY (Quick Effect): You can banish this card that was Special Summoned this turn until the End Phase; negate that effect, and if you do, banish it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.discon) + e1:SetCost(s.discost) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --During your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Link Summon 1 Link Monster, and if this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) + e2:SetTarget(s.linktg) + e2:SetOperation(s.linkop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +function s.discon(e,tp,eg,ep,ev,re,r,rp,chk) + if not e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) then return false end + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_MZONE|LOCATION_GRAVE)>0 and Duel.IsChainDisablable(ev) +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() end + --Banish this card until the End Phase + aux.RemoveUntil(c,nil,REASON_COST,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local rc=re:GetHandler() + local relation=rc:IsRelateToEffect(re) + if chk==0 then return rc:IsAbleToRemove(tp) + or (not relation and Duel.IsPlayerCanRemove(tp)) end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + if relation then + Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,rc:GetPreviousLocation()) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) + end +end +function s.linktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EXTRA_MATERIAL) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(1,0) + e1:SetOperation(s.extracon) + e1:SetValue(s.extraval) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + local res=Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil) + e1:Reset() + return res + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetChainLimit(function(re,rp,tp) return not (re:IsMonsterEffect() and re:GetHandler():IsLinkMonster()) end) +end +function s.linkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local e1=nil + if c:IsRelateToEffect(e) then + --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls + e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EXTRA_MATERIAL) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(1,0) + e1:SetOperation(s.extracon) + e1:SetValue(s.extraval) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc then + Duel.LinkSummon(tp,sc) + if e1 then + local eff_code=Duel.GetCurrentChain()==1 and EVENT_SPSUMMON or EVENT_SPSUMMON_SUCCESS + --Reset e1 + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(eff_code) + e2:SetOperation(function(e) e1:Reset() e:Reset() end) + Duel.RegisterEffect(e2,tp) + end + elseif e1 then + e1:Reset() + end +end +function s.extracon(c,e,tp,sg,mg,lc,og,chk) + if not sg:IsContains(e:GetHandler()) then return false end + local g=Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) + if #g==0 then return true end + local max_count=1 + local must_include=Group.CreateGroup() + local effs={Duel.GetPlayerEffect(tp,EFFECT_EXTRA_MATERIAL)} + for _,eff in ipairs(effs) do + if not eff:GetOwner():IsCode(id) then + if #(eff:GetValue()(0,SUMMON_TYPE_LINK,eff,tp,lc))>0 then + local handler=eff:GetHandler() + must_include:Merge(handler) + if #(sg&must_include)>0 or lc==handler then + max_count=max_count+1 + end + end + end + end + return #(sg&g)>0 and #(sg&g)<=max_count +end +function s.extraval(chk,summon_type,e,...) + local c=e:GetHandler() + if chk==0 then + local tp,sc=... + if summon_type~=SUMMON_TYPE_LINK then + return Group.CreateGroup() + else + return Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) + end + elseif chk==1 then + local sg,sc,tp=... + if summon_type&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK and #sg>0 then + Duel.Hint(HINT_CARD,tp,id) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452001.lua b/pre-release/c100452001.lua new file mode 100644 index 0000000000..20708329b8 --- /dev/null +++ b/pre-release/c100452001.lua @@ -0,0 +1,94 @@ +--白き幻獣-青眼の白龍 +--Blue-Eyes White Dragon, the White Phantom Beast +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When a card or effect is activated that targets this card on the field (Quick Effect): You can discard 1 card; negate that effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(s.discon) + e1:SetCost(Cost.Discard()) + e1:SetTarget(s.distg) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) + c:RegisterEffect(e1) + --When this card is added from the Deck to your hand, or your monster is destroyed by battle: You can reveal this card in your hand; Special Summon it + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_TO_HAND) + e2a:SetCountLimit(1,{id,0}) + e2a:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_DECK) end) + e2a:SetCost(Cost.SelfReveal) + e2a:SetTarget(s.sptg) + e2a:SetOperation(s.spop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2b:SetCode(EVENT_BATTLE_DESTROYED) + e2b:SetRange(LOCATION_HAND) + e2b:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsPreviousControler,1,nil,tp) end) + c:RegisterEffect(e2b) + --If this card is Special Summoned from the hand or Deck: You can destroy all monsters your opponent controls, also you cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND|LOCATION_DECK) end) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLUE_EYES} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsContains(c) and Duel.IsChainDisablable(ev) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) + --You cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_BLUE_EYES) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100452002.lua b/pre-release/c100452002.lua new file mode 100644 index 0000000000..63b89f84d8 --- /dev/null +++ b/pre-release/c100452002.lua @@ -0,0 +1,111 @@ +--蒼の深淵 ディープアイズ・ホワイト・ドラゴン +--Deep-Eyes White Dragon, the Blue Abyss +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can discard this card; add 1 Level 1 LIGHT Tuner from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If a "Blue-Eyes" Ritual Monster(s) and/or "Blue-Eyes White Dragon" is sent to your GY: You can target 1 of them; Special Summon this card from your GY (if it was there when the monster was sent) or hand (even if not), and if you do, its ATK becomes that monster's, also banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetRange(LOCATION_GRAVE|LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Keep track of "Blue-Eyes" Ritual Monsters and "Blue-Eyes White Dragon" sent to the GY + aux.GlobalCheck(s,function() + s.gygroup=Group.CreateGroup() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_TO_GRAVE) + ge1:SetOperation(s.regop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_BLUE_EYES} +s.listed_names={CARD_BLUEEYES_W_DRAGON} +function s.thfilter(c) + return c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.tgfilter(c,e) + return ((c:IsSetCard(SET_BLUE_EYES) and c:IsRitualMonster()) or c:IsCode(CARD_BLUEEYES_W_DRAGON)) + and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.tgfilter,nil,e) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + if Duel.GetCurrentChain()==0 then s.gygroup:Clear() end + s.gygroup:Merge(tg) + s.gygroup:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + Duel.RaiseEvent(s.gygroup,EVENT_CUSTOM+id,e,0,rp,ep,ev) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=s.gygroup:Filter(s.tgfilter,nil,e):Match(Card.IsControler,nil,tp) + if chkc then return g:IsContains(chkc) and chkc:IsControler(tp) and s.tgfilter(chkc,e) end + local c=e:GetHandler() + if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + --Its ATK becomes that monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(tc:GetAttack()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + --Banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(3300) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e2:SetValue(LOCATION_REMOVED) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e2,true) + end +end \ No newline at end of file diff --git a/pre-release/c100452004.lua b/pre-release/c100452004.lua new file mode 100644 index 0000000000..d61e3dab89 --- /dev/null +++ b/pre-release/c100452004.lua @@ -0,0 +1,69 @@ +--終撃竜-サイバー・エンド・ドラゴン +--Cyber End Dragon the Decisive Strike Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Machine monsters with 2100 or more ATK + Fusion.AddProcMixN(c,true,true,s.matfilter,3) + c:AddMustBeFusionSummoned() + --material check + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --search + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e0:GetLabel()==1 end) + e1:SetCost(Cost.PayLP(4000)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --pierce + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_PIERCE) + c:RegisterEffect(e2) + --extra att + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_EXTRA_ATTACK) + e3:SetCondition(s.atcon) + e3:SetValue(2) + c:RegisterEffect(e3) +end +s.listed_names={23171610} +function s.matfilter(c,sc,st,tp) + return c:IsRace(RACE_MACHINE,sc,st,tp) and c:IsAttackAbove(2100) +end +function s.valcheck(e,c) + local mg=c:GetMaterial() + e:SetLabel(mg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)==#mg and 1 or 0) +end +function s.thfilter(c) + return c:IsCode(23171610) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.atcon(e) + local c=e:GetHandler() + return c:GetAttack()>c:GetBaseAttack() +end \ No newline at end of file diff --git a/pre-release/c100452006.lua b/pre-release/c100452006.lua new file mode 100644 index 0000000000..17bf1b8ee3 --- /dev/null +++ b/pre-release/c100452006.lua @@ -0,0 +1,87 @@ +--未来融合-フューチャー・フュージョン・ノヴァ +--Future Fusion Nova +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: Fusion Summon 1 LIGHT Machine Fusion Monster from your Extra Deck, using monsters from your Deck, including "Cyber Dragon", also for the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters, also you cannot declare attacks, except with the Summoned monster + local fusion_params={ + handler=c, + fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) end, + matfilter=aux.FALSE, + extrafil=s.fextra, + extratg=s.extratg, + stage2=s.stage2 + } + local e1=Fusion.CreateSummonEff(fusion_params) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + c:RegisterEffect(e1) + --When this card leaves the field, destroy that monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EVENT_LEAVE_FIELD_P) + e2:SetOperation(function(e) e:SetLabel(e:GetHandler():IsDisabled() and 1 or 0) end) + c:RegisterEffect(e2) + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_LEAVE_FIELD) + e3:SetOperation(s.mondesop) + e3:SetLabelObject(e2) + c:RegisterEffect(e3) + --When that monster is destroyed, destroy this card + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e4:SetCode(EVENT_LEAVE_FIELD) + e4:SetRange(LOCATION_SZONE) + e4:SetCondition(s.selfdescon) + e4:SetOperation(function(e) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end) + c:RegisterEffect(e4) +end +s.listed_names={CARD_CYBER_DRAGON} +function s.fcheck(tp,sg,fc) + return sg:IsExists(Card.IsCode,1,nil,CARD_CYBER_DRAGON) +end +function s.fextra(e,tp,mg1) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil),s.fcheck +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.stage2(e,fc,tp,sg,chk) + if chk==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then + local c=e:GetHandler() + c:SetCardTarget(fc) + --For the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_MACHINE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local fid=fc:GetFieldID() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --Also you cannot declare attacks, except with the Summoned monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return c:GetFieldID()~=fid end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + end +end +function s.mondesop(e,tp,eg,ep,ev,re,r,rp) + if e:GetLabelObject():GetLabel()~=0 then return end + local tc=e:GetHandler():GetFirstCardTarget() + if tc and tc:IsLocation(LOCATION_MZONE) then + Duel.Destroy(tc,REASON_EFFECT) + end +end +function s.selfdescon(e,tp,eg,ep,ev,re,r,rp) + local tc=e:GetHandler():GetFirstCardTarget() + return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) +end \ No newline at end of file diff --git a/pre-release/c100452007.lua b/pre-release/c100452007.lua new file mode 100644 index 0000000000..75211ae5e5 --- /dev/null +++ b/pre-release/c100452007.lua @@ -0,0 +1,94 @@ +--赤き竜-ケッツァーコアトル +--Crimson Dragon Quetzacoatl +--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) + --special summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --atk up + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(s.atkval) + c:RegisterEffect(e2) + --negate + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOEXTRA|CATEGORY_NEGATE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.negcon) + e3:SetTarget(s.negtg) + e3:SetOperation(s.negop) + c:RegisterEffect(e3) +end +function s.spfilter(c,e,tp) + return c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end + if ft>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,ft,ft,nil) + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.atkval(e,c) + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()):GetSum(Card.GetBaseAttack) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsChainNegatable(ev) and rp==1-tp and re:IsMonsterEffect() +end +function s.negfilter(c) + return c:IsFaceup() and c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.negfilter,tp,LOCATION_MZONE,0,1,1,exc) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + Duel.NegateActivation(ev) + end +end \ No newline at end of file diff --git a/pre-release/c100452009.lua b/pre-release/c100452009.lua new file mode 100644 index 0000000000..48f550cecd --- /dev/null +++ b/pre-release/c100452009.lua @@ -0,0 +1,100 @@ +--レッド・デーモンズ・チェーン +--Red Dragon Archfiend's Chain +--scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --You can activate this card the turn it was Set, by revealing 1 "Red Dragon Archfiend" in your Extra Deck + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e0:SetValue(function(e) e:SetLabel(1) end) + e0:SetCondition(function(e) return Duel.IsExistingMatchingCard(s.extracostfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,1,nil) end) + c:RegisterEffect(e0) + --Activate this card by revealing any number of monsters in your hand, then target Effect Monsters your opponent controls equal to the number of Tuners revealed +1; they lose 100 ATK for each card revealed, also their effects are negated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetLabelObject(e0) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --They lose 100 ATK for each card revealed + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetTarget(aux.PersistentTargetFilter) + e2:SetValue(function() return e1:GetLabel()*-100 end) + c:RegisterEffect(e2) + --Also their effects are negated + local e3=e2:Clone() + e3:SetCode(EFFECT_DISABLE) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.handcostfilter(c) + return c:IsMonster() and not c:IsPublic() +end +function s.rescon(max_target_count) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1<=max_target_count + end +end +function s.extracostfilter(c) + return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and not c:IsPublic() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local label_obj=e:GetLabelObject() + local hg=Duel.GetMatchingGroup(s.handcostfilter,tp,LOCATION_HAND,0,nil) + local max_target_count=Duel.GetTargetCount(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) + local rescon=s.rescon(max_target_count) + if chk==0 then label_obj:SetLabel(0) return #hg>0 and max_target_count>0 + and aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,0) end + if label_obj:GetLabel()>0 then + label_obj:SetLabel(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.extracostfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleExtra(tp) + end + local sg=aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,1,tp,HINTMSG_CONFIRM,rescon) + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + e:SetLabel(sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1,#sg) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsEffectMonster() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end + local target_count,reveal_count=e:GetLabel() + e:SetLabel(reveal_count) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,target_count,target_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) + if #tg>0 then + local c=e:GetHandler() + for tc in tg:Iter() do + c:SetCardTarget(tc) + end + --If the last of those monsters is not on the field, destroy this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_SELF_DESTROY) + e1:SetRange(LOCATION_SZONE) + e1:SetCondition(function(e) return #(e:GetHandler():GetCardTarget())==0 end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c100452010.lua b/pre-release/c100452010.lua new file mode 100644 index 0000000000..b39ef063a8 --- /dev/null +++ b/pre-release/c100452010.lua @@ -0,0 +1,97 @@ +--超銀河眼の光子龍-フォトン・ハウリング +--Neo Galaxy-Eyes Photon Dragon - Photon Howling +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 8 monsters OR 1 Rank 8 Xyz Monster + Xyz.AddProcedure(c,nil,8,3,s.altmatfilter,aux.Stringid(id,0),3,s.xyzop) + --Take 1 "Photon" monster from your Deck, and either Special Summon it in Defense Position or attach it to this card as material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(s.spattachtg) + e1:SetOperation(s.spattachop) + c:RegisterEffect(e1) + --Tribute 1 other Xyz Monster, and if you do, negate the effects of all other face-up cards currently on the field until the end of this turn. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.DetachFromSelf(3)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_series={SET_PHOTON} +function s.altmatfilter(c,tp,xyzc) + return c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRank(8) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) + return true +end +function s.spcheck(c,e,tp,mmz_chk) + return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.attachcheck(c,e,tp) + return c:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) +end +function s.spattachfilter(c,e,tp,mmz_chk) + return c:IsSetCard(SET_PHOTON) and c:IsMonster() and (s.spcheck(c,e,tp,mmz_chk) or s.attachcheck(c,e,tp)) +end +function s.spattachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if chk==0 then return Duel.IsExistingMatchingCard(s.spattachfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_chk) end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spattachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,s.spattachfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not sc then return end + local b1=s.spcheck(sc,e,tp,mmz_chk) + local b2=s.attachcheck(sc,e,tp) and c:IsRelateToEffect(e) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,4)}, --"Special Summon it in Defense Position" + {b2,aux.Stringid(id,5)}) --"Attach it to this card as material" + if op==1 then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + elseif op==2 then + Duel.Overlay(c,sc,true) + end +end +function s.xyzfilter(c,self_exc) + return c:IsXyzMonster() and c:IsReleasableByEffect() + and Duel.IsExistingMatchingCard(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,self_exc)) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,c,c) end + local g=Duel.GetMatchingGroup(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,c) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g-1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,exc,exc) + if not sc then return end + Duel.HintSelection(sc) + if Duel.Release(sc,REASON_EFFECT)>0 then + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) + --Negate the effects of all other face-up cards currently on the field until the end of this turn + for tc in g:Iter() do + tc:NegateEffects(c,RESET_PHASE|PHASE_END) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452012.lua b/pre-release/c100452012.lua new file mode 100644 index 0000000000..6ef4055a54 --- /dev/null +++ b/pre-release/c100452012.lua @@ -0,0 +1,93 @@ +--GDロボ・オービタル 7 +--Galaxy Defense Robot Orbital 7 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Tribute this card from your hand or field; take 1 "Photon" monster and 1 "Galaxy" monster from your Deck, add 1 of them to your hand, and send the other to the GY, also you cannot Special Summon for the rest of this turn, except LIGHT monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfTribute) + e1:SetTarget(s.thtgtg) + e1:SetOperation(s.thtgop) + c:RegisterEffect(e1) + --If a "Galaxy-Eyes" monster(s) is Special Summoned to your field: You can Special Summon this card from your GY, but banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_PHOTON,SET_GALAXY,SET_GALAXY_EYES} +function s.thtgfilter(c) + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_PHOTON) and sg:IsExists(Card.IsSetCard,1,nil,SET_GALAXY) + and sg:IsExists(Card.IsAbleToHand,1,nil) and sg:IsExists(Card.IsAbleToGrave,1,nil) +end +function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then + local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) + return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.thtgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,2)) + if #sg==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hg=sg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) + Duel.SendtoHand(hg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,hg) + Duel.SendtoGrave(sg-hg,REASON_EFFECT) + end + --You cannot Special Summon for the rest of this turn, except LIGHT monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsAttributeExcept(ATTRIBUTE_LIGHT) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spconfilter(c,tp) + return c:IsSetCard(SET_GALAXY_EYES) and c:IsControler(tp) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c100452013.lua b/pre-release/c100452013.lua new file mode 100644 index 0000000000..8f7fb64afc --- /dev/null +++ b/pre-release/c100452013.lua @@ -0,0 +1,76 @@ +--四天の龍 スターヴ・ヴェノム・フュージョン・ドラゴン +--Starving Venom Fusion Dragon of the Four Heavenly Dragons +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 DARK monsters on the field + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + --atk to 0 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --fusion summon + local fusion_params={ + handler=c, + fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) end, + matfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsOnField() end, + extrafil=s.fextra, + gc=Fusion.ForcedHandler + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_PREDAPLANT} +s.material_location=LOCATION_ONFIELD +function s.matfilter(c,fc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsOnField() +end +function s.atkfilter(c) + return c:IsFaceup() and (c:HasNonZeroAttack() or c:IsNegatableMonster() or c:IsAttributeExcept(ATTRIBUTE_DARK)) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + tc:NegateEffects(c) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(ATTRIBUTE_DARK) + tc:RegisterEffect(e2) + end +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) +end \ No newline at end of file diff --git a/pre-release/c100452014.lua b/pre-release/c100452014.lua new file mode 100644 index 0000000000..3a44abb117 --- /dev/null +++ b/pre-release/c100452014.lua @@ -0,0 +1,80 @@ +--四天の龍 クリアウィング・シンクロ・ドラゴン +--Clear Wing Synchro Dragon of the Four Heavenly Dragons +--scripted by pyrQ +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) + --If this card is Special Summoned: You can destroy 1 Effect Monster your opponent controls, and if you do, this card gains ATK equal to that monster's original ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --When your opponent activates a card or effect (Quick Effect): You can Special Summon 1 Level 4 or lower WIND Tuner from your hand or GY (but negate its effects), then immediately after this effect resolves, you can Synchro Summon 1 WIND Synchro Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SPEEDROID} +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + local c=e:GetHandler() + local atk=g:GetFirst():GetBaseAttack() + if Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsFaceup() and atk>0 then + --This card gains ATK equal to that monster's original ATK + c:UpdateAttack(atk) + end +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_TUNER) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.synchrofilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable() +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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(s.synchrofilter,tp,LOCATION_EXTRA,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local synchro=Duel.SelectMatchingCard(tp,s.synchrofilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if synchro then + Duel.SynchroSummon(tp,synchro) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452016.lua b/pre-release/c100452016.lua new file mode 100644 index 0000000000..1e6cd93973 --- /dev/null +++ b/pre-release/c100452016.lua @@ -0,0 +1,77 @@ +--ヴァレルロード・L・ドラゴン +--Borreload Liberator Dragon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 3+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) + --You can only Special Summon "Borreload Liberator Dragon(s)" once per turn + c:SetSPSummonOnce(id) + --Place 1 monster your opponent controls in a zone this card points to and take control of it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(s.controltg) + e1:SetOperation(s.controlop) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_PHASE|TIMING_BATTLE_END) + c:RegisterEffect(e1) + --Destroy 1 monster you control and Special Summon itself from the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) + c:RegisterEffect(e2) +end +function s.controlfilter(c,zones) + return c:IsControlerCanBeChanged(false,zones) +end +function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk) + local zones=e:GetHandler():GetLinkedZone()&ZONES_MMZ + if chk==0 then return Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil,zones) end + Duel.SetChainLimit(function(e,ep,tp) return tp==ep end) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) +end +function s.controlop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local zones=c:GetLinkedZone()&ZONES_MMZ + if not (c:IsRelateToEffect(e) and zones~=0) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil,zones) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp,0,0,zones) + end +end +function s.desfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100452017.lua b/pre-release/c100452017.lua new file mode 100644 index 0000000000..d698a1694b --- /dev/null +++ b/pre-release/c100452017.lua @@ -0,0 +1,94 @@ +--ヴァレット・バラージュ +--Rokket Barrage +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --You can send 1 DARK Dragon monster from your Deck to the GY, except a Level 5 monster; Special Summon this card from your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --When a Link Monster's effect is activated that targets this card on the field (Quick Effect): You can destroy this card, then Special Summon up to 1 "Rokket" monster each from your hand, Deck, GY, and/or banishment, except "Rokket Barrage" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_ROKKET} +function s.selfspcostfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and not c:IsLevel(5) and c:IsAbleToGraveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsAttributeExcept(ATTRIBUTE_DARK) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsContains(e:GetHandler()) and re:GetHandler():IsLinkMonster() and re:IsMonsterEffect() +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) +end +local LOCATION_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND_DECK_GRAVE_REMOVED) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ft=Duel.GetMZoneCount(tp,c) + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and ft>0 then + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,nil,e,tp) + if #g==0 then return end + ft=math.min(ft,4) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLocation),1,tp,HINTMSG_SPSUMMON) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452024.lua b/pre-release/c100452024.lua new file mode 100644 index 0000000000..e41fcf7161 --- /dev/null +++ b/pre-release/c100452024.lua @@ -0,0 +1,76 @@ +--ガトリング・オーガ +--Gatling Ogre +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Inflict 800 damage to your damage for each facedow Spell/Trap Card sent to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(3,id) + e1:SetCost(s.damcost) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --When this card is targeted for an attack: Inflict 500 damage for each Attack Position monster they control, then end the Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.damendbptg) + e2:SetOperation(s.damendbpop) + c:RegisterEffect(e2) +end +function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,nil) + if chk==0 then return #g>0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,1,#g,nil) + e:SetLabel(#g) + Duel.SendtoGrave(g,REASON_COST) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetLabel()*800 + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) + --Your opponent takes no damage from non-Fiend monsters' effects for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CHANGE_DAMAGE) + e1:SetTargetRange(0,1) + e1:SetValue(s.damval) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damval(e,re,val,r,rp,rc) + if re and r&REASON_EFFECT>0 and re:IsMonsterEffect() and re:GetHandler():IsRaceExcept(RACE_FIEND) then + return 0 + else + return val + end +end +function s.damendbptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) + if chk==0 then return ct>0 end + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) +end +function s.damendbpop(e,tp,eg,ep,ev,re,r,rp) + local dam=500*Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) + if dam>0 and Duel.Damage(1-tp,dam,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + end +end \ No newline at end of file diff --git a/pre-release/c100452025.lua b/pre-release/c100452025.lua new file mode 100644 index 0000000000..c5bf946b79 --- /dev/null +++ b/pre-release/c100452025.lua @@ -0,0 +1,94 @@ +--インフェルニティ・デス・ガンマン +--Infernity Doom Slinger +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --During your Main Phase: You can Special Summon 1 Fiend monster from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If you have no cards in your hand (Quick Effect): You can banish this card from your GY; your opponent chooses 1 of these effects for you to apply + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,4000) end) + e2:SetOperation(s.effop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local top_card=Duel.GetDecktopGroup(tp,1):GetFirst() + local b1=top_card + local b2=true + local op=Duel.SelectEffect(1-tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + local c=e:GetHandler() + if op==1 then + --Reveal the top card of your Deck, and if it is a monster, your opponent takes any effect damage you would have taken this turn instead. Otherwise, you take 4000 damage + Duel.ConfirmDecktop(tp,1) + if top_card:IsMonster() then + --Your opponent takes any effect damage you would have taken this turn instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_REFLECT_DAMAGE) + e1:SetTargetRange(1,0) + e1:SetValue(function(e,_,_,r) return (r&REASON_EFFECT)==REASON_EFFECT end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + else + Duel.Damage(tp,4000,REASON_EFFECT) + end + elseif op==2 then + --You take no effect damage this turn + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,5)) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e2a:SetCode(EFFECT_CHANGE_DAMAGE) + e2a:SetTargetRange(1,0) + e2a:SetValue(s.damval) + e2a:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2a,tp) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_NO_EFFECT_DAMAGE) + Duel.RegisterEffect(e2b,tp) + end +end +function s.damval(e,re,val,r,rp,rc) + if (r&REASON_EFFECT)>0 then + return 0 + else + return val + end +end \ No newline at end of file diff --git a/pre-release/c100454001.lua b/pre-release/c100454001.lua new file mode 100644 index 0000000000..df9456a2d0 --- /dev/null +++ b/pre-release/c100454001.lua @@ -0,0 +1,97 @@ +--ブラック・ローズ・ドラゴン/バスター +--Black Rose Dragon/Assault Mode +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --If this card is destroyed: You can Special Summon 1 "Black Rose Dragon" 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_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --You can reveal this card in your hand; shuffle it into the Deck, and if you do, change the ATK of 1 face-up monster on the field to 0 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.tdatktg) + e2:SetOperation(s.tdatkop) + c:RegisterEffect(e2) + --If this card is Special Summoned, or a monster(s) is Special Summoned to your opponent's field: You can destroy all cards on the field + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,2)) + e3a:SetCategory(CATEGORY_DESTROY) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SPSUMMON_SUCCESS) + e3a:SetCountLimit(1,{id,1}) + e3a:SetTarget(s.destg) + e3a:SetOperation(s.desop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3b:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3b:SetRange(LOCATION_MZONE) + e3b:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsControler,1,nil,1-tp) end) + c:RegisterEffect(e3b) +end +s.listed_names={CARD_ASSAULT_MODE,CARD_BLACK_ROSE_DRAGON} +s.assault_mode=CARD_BLACK_ROSE_DRAGON +function s.spfilter(c,e,tp) + return c:IsCode(CARD_BLACK_ROSE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tdatktg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.tdatkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local sc=Duel.SelectMatchingCard(tp,Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + --Change its ATK to 0 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100454002.lua b/pre-release/c100454002.lua new file mode 100644 index 0000000000..33175c3a71 --- /dev/null +++ b/pre-release/c100454002.lua @@ -0,0 +1,84 @@ +--捕食植物デェアデビル +--Predaplant Dheadevil +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Predaplant" monster + 1 Level 1 monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PREDAPLANT),aux.FilterBoolFunction(Card.IsLevel,1)) + c:AddMustFirstBeFusionSummoned() + --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 monster on either field with a Predator Counter and 1 "Predaplant" monster you control + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_EXTRA) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --During the Main Phase, if this card was Special Summoned this turn (Quick Effect): You can target Spells/Traps on the field, up to the number of monsters with a Predator Counter; destroy them + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return Duel.IsMainPhase() and e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) +end +s.listed_series={SET_PREDAPLANT} +s.counter_list={COUNTER_PREDATOR} +s.material_setcode=SET_PREDAPLANT +function s.selfspcostfilter(c,tp,fc) + return ((c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp)) or c:HasCounter(COUNTER_PREDATOR)) and c:IsReleasable() + and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) +end +function s.rescon(sg,e,tp,mg) + return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 and sg:IsExists(s.predaplantchkfilter,1,nil,tp) + and sg:IsExists(Card.HasCounter,1,nil,COUNTER_PREDATOR) +end +function s.predaplantchkfilter(c,tp) + return c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp) +end +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) + if #sg==2 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g then + Duel.Release(g,REASON_COST|REASON_MATERIAL) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end + local max_count=Duel.GetMatchingGroupCount(Card.HasCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,COUNTER_PREDATOR) + if chk==0 then return max_count>0 and Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,max_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end \ No newline at end of file